000-orion_git_sync.patch 520 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752
  1. --- a/MAINTAINERS
  2. +++ b/MAINTAINERS
  3. @@ -2690,12 +2690,10 @@
  4. S: Maintained
  5. MARVELL MV643XX ETHERNET DRIVER
  6. -P: Dale Farnsworth
  7. -M: [email protected]
  8. -P: Manish Lachwani
  9. -M: [email protected]
  10. +P: Lennert Buytenhek
  11. +M: [email protected]
  12. L: [email protected]
  13. -S: Odd Fixes for 2.4; Maintained for 2.6.
  14. +S: Supported
  15. MATROX FRAMEBUFFER DRIVER
  16. P: Petr Vandrovec
  17. --- a/arch/arm/Kconfig
  18. +++ b/arch/arm/Kconfig
  19. @@ -84,6 +84,11 @@
  20. bool
  21. default y
  22. +config HAVE_LATENCYTOP_SUPPORT
  23. + bool
  24. + depends on !SMP
  25. + default y
  26. +
  27. config LOCKDEP_SUPPORT
  28. bool
  29. default y
  30. @@ -347,6 +352,16 @@
  31. If you have any questions or comments about the Linux kernel port
  32. to this board, send e-mail to <[email protected]>.
  33. +config ARCH_KIRKWOOD
  34. + bool "Marvell Kirkwood"
  35. + select PCI
  36. + select GENERIC_TIME
  37. + select GENERIC_CLOCKEVENTS
  38. + select PLAT_ORION
  39. + help
  40. + Support for the following Marvell Kirkwood series SoCs:
  41. + 88F6180, 88F6192 and 88F6281.
  42. +
  43. config ARCH_KS8695
  44. bool "Micrel/Kendin KS8695"
  45. select GENERIC_GPIO
  46. @@ -365,6 +380,24 @@
  47. <http://www.digi.com/products/microprocessors/index.jsp>
  48. +config ARCH_LOKI
  49. + bool "Marvell Loki (88RC8480)"
  50. + select GENERIC_TIME
  51. + select GENERIC_CLOCKEVENTS
  52. + select PLAT_ORION
  53. + help
  54. + Support for the Marvell Loki (88RC8480) SoC.
  55. +
  56. +config ARCH_MV78XX0
  57. + bool "Marvell MV78xx0"
  58. + select PCI
  59. + select GENERIC_TIME
  60. + select GENERIC_CLOCKEVENTS
  61. + select PLAT_ORION
  62. + help
  63. + Support for the following Marvell MV78xx0 series SoCs:
  64. + MV781x0, MV782x0.
  65. +
  66. config ARCH_MXC
  67. bool "Freescale MXC/iMX-based"
  68. select ARCH_MTD_XIP
  69. @@ -381,7 +414,8 @@
  70. select PLAT_ORION
  71. help
  72. Support for the following Marvell Orion 5x series SoCs:
  73. - Orion-1 (5181), Orion-NAS (5182), Orion-2 (5281.)
  74. + Orion-1 (5181), Orion-VoIP (5181L), Orion-NAS (5182),
  75. + Orion-2 (5281).
  76. config ARCH_PNX4008
  77. bool "Philips Nexperia PNX4008 Mobile"
  78. @@ -502,6 +536,10 @@
  79. source "arch/arm/mach-ixp23xx/Kconfig"
  80. +source "arch/arm/mach-loki/Kconfig"
  81. +
  82. +source "arch/arm/mach-mv78xx0/Kconfig"
  83. +
  84. source "arch/arm/mach-pxa/Kconfig"
  85. source "arch/arm/mach-sa1100/Kconfig"
  86. @@ -514,6 +552,8 @@
  87. source "arch/arm/mach-orion5x/Kconfig"
  88. +source "arch/arm/mach-kirkwood/Kconfig"
  89. +
  90. source "arch/arm/plat-s3c24xx/Kconfig"
  91. source "arch/arm/plat-s3c/Kconfig"
  92. --- a/arch/arm/Makefile
  93. +++ b/arch/arm/Makefile
  94. @@ -135,11 +135,14 @@
  95. machine-$(CONFIG_ARCH_NETX) := netx
  96. machine-$(CONFIG_ARCH_NS9XXX) := ns9xxx
  97. machine-$(CONFIG_ARCH_DAVINCI) := davinci
  98. + machine-$(CONFIG_ARCH_KIRKWOOD) := kirkwood
  99. machine-$(CONFIG_ARCH_KS8695) := ks8695
  100. incdir-$(CONFIG_ARCH_MXC) := mxc
  101. machine-$(CONFIG_ARCH_MX3) := mx3
  102. machine-$(CONFIG_ARCH_ORION5X) := orion5x
  103. machine-$(CONFIG_ARCH_MSM7X00A) := msm
  104. + machine-$(CONFIG_ARCH_LOKI) := loki
  105. + machine-$(CONFIG_ARCH_MV78XX0) := mv78xx0
  106. ifeq ($(CONFIG_ARCH_EBSA110),y)
  107. # This is what happens if you forget the IOCS16 line.
  108. --- a/arch/arm/boot/compressed/head.S
  109. +++ b/arch/arm/boot/compressed/head.S
  110. @@ -623,8 +623,8 @@
  111. b __armv4_mmu_cache_off
  112. b __armv4_mmu_cache_flush
  113. - .word 0x56055310 @ Feroceon
  114. - .word 0xfffffff0
  115. + .word 0x56050000 @ Feroceon
  116. + .word 0xff0f0000
  117. b __armv4_mmu_cache_on
  118. b __armv4_mmu_cache_off
  119. b __armv5tej_mmu_cache_flush
  120. --- /dev/null
  121. +++ b/arch/arm/configs/kirkwood_defconfig
  122. @@ -0,0 +1,1426 @@
  123. +#
  124. +# Automatically generated make config: don't edit
  125. +# Linux kernel version: 2.6.26-rc5
  126. +# Sun Jun 22 15:51:25 2008
  127. +#
  128. +CONFIG_ARM=y
  129. +CONFIG_SYS_SUPPORTS_APM_EMULATION=y
  130. +CONFIG_GENERIC_GPIO=y
  131. +CONFIG_GENERIC_TIME=y
  132. +CONFIG_GENERIC_CLOCKEVENTS=y
  133. +CONFIG_MMU=y
  134. +# CONFIG_NO_IOPORT is not set
  135. +CONFIG_GENERIC_HARDIRQS=y
  136. +CONFIG_STACKTRACE_SUPPORT=y
  137. +CONFIG_HAVE_LATENCYTOP_SUPPORT=y
  138. +CONFIG_LOCKDEP_SUPPORT=y
  139. +CONFIG_TRACE_IRQFLAGS_SUPPORT=y
  140. +CONFIG_HARDIRQS_SW_RESEND=y
  141. +CONFIG_GENERIC_IRQ_PROBE=y
  142. +CONFIG_RWSEM_GENERIC_SPINLOCK=y
  143. +# CONFIG_ARCH_HAS_ILOG2_U32 is not set
  144. +# CONFIG_ARCH_HAS_ILOG2_U64 is not set
  145. +CONFIG_GENERIC_HWEIGHT=y
  146. +CONFIG_GENERIC_CALIBRATE_DELAY=y
  147. +CONFIG_ARCH_SUPPORTS_AOUT=y
  148. +CONFIG_ZONE_DMA=y
  149. +CONFIG_VECTORS_BASE=0xffff0000
  150. +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
  151. +
  152. +#
  153. +# General setup
  154. +#
  155. +CONFIG_EXPERIMENTAL=y
  156. +CONFIG_BROKEN_ON_SMP=y
  157. +CONFIG_LOCK_KERNEL=y
  158. +CONFIG_INIT_ENV_ARG_LIMIT=32
  159. +CONFIG_LOCALVERSION=""
  160. +CONFIG_LOCALVERSION_AUTO=y
  161. +CONFIG_SWAP=y
  162. +CONFIG_SYSVIPC=y
  163. +CONFIG_SYSVIPC_SYSCTL=y
  164. +# CONFIG_POSIX_MQUEUE is not set
  165. +# CONFIG_BSD_PROCESS_ACCT is not set
  166. +# CONFIG_TASKSTATS is not set
  167. +# CONFIG_AUDIT is not set
  168. +# CONFIG_IKCONFIG is not set
  169. +CONFIG_LOG_BUF_SHIFT=14
  170. +# CONFIG_CGROUPS is not set
  171. +# CONFIG_GROUP_SCHED is not set
  172. +# CONFIG_SYSFS_DEPRECATED_V2 is not set
  173. +# CONFIG_RELAY is not set
  174. +# CONFIG_NAMESPACES is not set
  175. +# CONFIG_BLK_DEV_INITRD is not set
  176. +CONFIG_CC_OPTIMIZE_FOR_SIZE=y
  177. +CONFIG_SYSCTL=y
  178. +CONFIG_EMBEDDED=y
  179. +CONFIG_UID16=y
  180. +CONFIG_SYSCTL_SYSCALL=y
  181. +CONFIG_SYSCTL_SYSCALL_CHECK=y
  182. +CONFIG_KALLSYMS=y
  183. +# CONFIG_KALLSYMS_ALL is not set
  184. +# CONFIG_KALLSYMS_EXTRA_PASS is not set
  185. +CONFIG_HOTPLUG=y
  186. +CONFIG_PRINTK=y
  187. +CONFIG_BUG=y
  188. +CONFIG_ELF_CORE=y
  189. +CONFIG_COMPAT_BRK=y
  190. +CONFIG_BASE_FULL=y
  191. +CONFIG_FUTEX=y
  192. +CONFIG_ANON_INODES=y
  193. +CONFIG_EPOLL=y
  194. +CONFIG_SIGNALFD=y
  195. +CONFIG_TIMERFD=y
  196. +CONFIG_EVENTFD=y
  197. +CONFIG_SHMEM=y
  198. +CONFIG_VM_EVENT_COUNTERS=y
  199. +CONFIG_SLAB=y
  200. +# CONFIG_SLUB is not set
  201. +# CONFIG_SLOB is not set
  202. +CONFIG_PROFILING=y
  203. +# CONFIG_MARKERS is not set
  204. +CONFIG_OPROFILE=y
  205. +CONFIG_HAVE_OPROFILE=y
  206. +CONFIG_KPROBES=y
  207. +CONFIG_KRETPROBES=y
  208. +CONFIG_HAVE_KPROBES=y
  209. +CONFIG_HAVE_KRETPROBES=y
  210. +# CONFIG_HAVE_DMA_ATTRS is not set
  211. +CONFIG_PROC_PAGE_MONITOR=y
  212. +CONFIG_SLABINFO=y
  213. +CONFIG_RT_MUTEXES=y
  214. +# CONFIG_TINY_SHMEM is not set
  215. +CONFIG_BASE_SMALL=0
  216. +CONFIG_MODULES=y
  217. +# CONFIG_MODULE_FORCE_LOAD is not set
  218. +CONFIG_MODULE_UNLOAD=y
  219. +# CONFIG_MODULE_FORCE_UNLOAD is not set
  220. +# CONFIG_MODVERSIONS is not set
  221. +# CONFIG_MODULE_SRCVERSION_ALL is not set
  222. +# CONFIG_KMOD is not set
  223. +CONFIG_BLOCK=y
  224. +# CONFIG_LBD is not set
  225. +# CONFIG_BLK_DEV_IO_TRACE is not set
  226. +# CONFIG_LSF is not set
  227. +# CONFIG_BLK_DEV_BSG is not set
  228. +
  229. +#
  230. +# IO Schedulers
  231. +#
  232. +CONFIG_IOSCHED_NOOP=y
  233. +CONFIG_IOSCHED_AS=y
  234. +CONFIG_IOSCHED_DEADLINE=y
  235. +CONFIG_IOSCHED_CFQ=y
  236. +# CONFIG_DEFAULT_AS is not set
  237. +# CONFIG_DEFAULT_DEADLINE is not set
  238. +CONFIG_DEFAULT_CFQ=y
  239. +# CONFIG_DEFAULT_NOOP is not set
  240. +CONFIG_DEFAULT_IOSCHED="cfq"
  241. +CONFIG_CLASSIC_RCU=y
  242. +
  243. +#
  244. +# System Type
  245. +#
  246. +# CONFIG_ARCH_AAEC2000 is not set
  247. +# CONFIG_ARCH_INTEGRATOR is not set
  248. +# CONFIG_ARCH_REALVIEW is not set
  249. +# CONFIG_ARCH_VERSATILE is not set
  250. +# CONFIG_ARCH_AT91 is not set
  251. +# CONFIG_ARCH_CLPS7500 is not set
  252. +# CONFIG_ARCH_CLPS711X is not set
  253. +# CONFIG_ARCH_CO285 is not set
  254. +# CONFIG_ARCH_EBSA110 is not set
  255. +# CONFIG_ARCH_EP93XX is not set
  256. +# CONFIG_ARCH_FOOTBRIDGE is not set
  257. +# CONFIG_ARCH_NETX is not set
  258. +# CONFIG_ARCH_H720X is not set
  259. +# CONFIG_ARCH_IMX is not set
  260. +# CONFIG_ARCH_IOP13XX is not set
  261. +# CONFIG_ARCH_IOP32X is not set
  262. +# CONFIG_ARCH_IOP33X is not set
  263. +# CONFIG_ARCH_IXP23XX is not set
  264. +# CONFIG_ARCH_IXP2000 is not set
  265. +# CONFIG_ARCH_IXP4XX is not set
  266. +# CONFIG_ARCH_L7200 is not set
  267. +CONFIG_ARCH_KIRKWOOD=y
  268. +# CONFIG_ARCH_KS8695 is not set
  269. +# CONFIG_ARCH_NS9XXX is not set
  270. +# CONFIG_ARCH_LOKI is not set
  271. +# CONFIG_ARCH_MV78XX0 is not set
  272. +# CONFIG_ARCH_MXC is not set
  273. +# CONFIG_ARCH_ORION5X is not set
  274. +# CONFIG_ARCH_PNX4008 is not set
  275. +# CONFIG_ARCH_PXA is not set
  276. +# CONFIG_ARCH_RPC is not set
  277. +# CONFIG_ARCH_SA1100 is not set
  278. +# CONFIG_ARCH_S3C2410 is not set
  279. +# CONFIG_ARCH_SHARK is not set
  280. +# CONFIG_ARCH_LH7A40X is not set
  281. +# CONFIG_ARCH_DAVINCI is not set
  282. +# CONFIG_ARCH_OMAP is not set
  283. +# CONFIG_ARCH_MSM7X00A is not set
  284. +
  285. +#
  286. +# Marvell Kirkwood Implementations
  287. +#
  288. +CONFIG_MACH_DB88F6281_BP=y
  289. +CONFIG_MACH_RD88F6192_NAS=y
  290. +CONFIG_MACH_RD88F6281=y
  291. +
  292. +#
  293. +# Boot options
  294. +#
  295. +
  296. +#
  297. +# Power management
  298. +#
  299. +CONFIG_PLAT_ORION=y
  300. +
  301. +#
  302. +# Processor Type
  303. +#
  304. +CONFIG_CPU_32=y
  305. +CONFIG_CPU_FEROCEON=y
  306. +# CONFIG_CPU_FEROCEON_OLD_ID is not set
  307. +CONFIG_CPU_32v5=y
  308. +CONFIG_CPU_ABRT_EV5T=y
  309. +CONFIG_CPU_PABRT_NOIFAR=y
  310. +CONFIG_CPU_CACHE_VIVT=y
  311. +CONFIG_CPU_COPY_FEROCEON=y
  312. +CONFIG_CPU_TLB_FEROCEON=y
  313. +CONFIG_CPU_CP15=y
  314. +CONFIG_CPU_CP15_MMU=y
  315. +
  316. +#
  317. +# Processor Features
  318. +#
  319. +CONFIG_ARM_THUMB=y
  320. +# CONFIG_CPU_ICACHE_DISABLE is not set
  321. +# CONFIG_CPU_DCACHE_DISABLE is not set
  322. +CONFIG_OUTER_CACHE=y
  323. +CONFIG_CACHE_FEROCEON_L2=y
  324. +
  325. +#
  326. +# Bus support
  327. +#
  328. +CONFIG_PCI=y
  329. +CONFIG_PCI_SYSCALL=y
  330. +# CONFIG_ARCH_SUPPORTS_MSI is not set
  331. +CONFIG_PCI_LEGACY=y
  332. +# CONFIG_PCI_DEBUG is not set
  333. +# CONFIG_PCCARD is not set
  334. +
  335. +#
  336. +# Kernel Features
  337. +#
  338. +CONFIG_TICK_ONESHOT=y
  339. +CONFIG_NO_HZ=y
  340. +CONFIG_HIGH_RES_TIMERS=y
  341. +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
  342. +CONFIG_PREEMPT=y
  343. +CONFIG_HZ=100
  344. +CONFIG_AEABI=y
  345. +# CONFIG_OABI_COMPAT is not set
  346. +# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
  347. +CONFIG_SELECT_MEMORY_MODEL=y
  348. +CONFIG_FLATMEM_MANUAL=y
  349. +# CONFIG_DISCONTIGMEM_MANUAL is not set
  350. +# CONFIG_SPARSEMEM_MANUAL is not set
  351. +CONFIG_FLATMEM=y
  352. +CONFIG_FLAT_NODE_MEM_MAP=y
  353. +# CONFIG_SPARSEMEM_STATIC is not set
  354. +# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
  355. +CONFIG_PAGEFLAGS_EXTENDED=y
  356. +CONFIG_SPLIT_PTLOCK_CPUS=4096
  357. +# CONFIG_RESOURCES_64BIT is not set
  358. +CONFIG_ZONE_DMA_FLAG=1
  359. +CONFIG_BOUNCE=y
  360. +CONFIG_VIRT_TO_BUS=y
  361. +CONFIG_ALIGNMENT_TRAP=y
  362. +
  363. +#
  364. +# Boot options
  365. +#
  366. +CONFIG_ZBOOT_ROM_TEXT=0x0
  367. +CONFIG_ZBOOT_ROM_BSS=0x0
  368. +CONFIG_CMDLINE=""
  369. +# CONFIG_XIP_KERNEL is not set
  370. +# CONFIG_KEXEC is not set
  371. +
  372. +#
  373. +# Floating point emulation
  374. +#
  375. +
  376. +#
  377. +# At least one emulation must be selected
  378. +#
  379. +# CONFIG_VFP is not set
  380. +
  381. +#
  382. +# Userspace binary formats
  383. +#
  384. +CONFIG_BINFMT_ELF=y
  385. +# CONFIG_BINFMT_AOUT is not set
  386. +# CONFIG_BINFMT_MISC is not set
  387. +
  388. +#
  389. +# Power management options
  390. +#
  391. +# CONFIG_PM is not set
  392. +CONFIG_ARCH_SUSPEND_POSSIBLE=y
  393. +
  394. +#
  395. +# Networking
  396. +#
  397. +CONFIG_NET=y
  398. +
  399. +#
  400. +# Networking options
  401. +#
  402. +CONFIG_PACKET=y
  403. +CONFIG_PACKET_MMAP=y
  404. +CONFIG_UNIX=y
  405. +CONFIG_XFRM=y
  406. +# CONFIG_XFRM_USER is not set
  407. +# CONFIG_XFRM_SUB_POLICY is not set
  408. +# CONFIG_XFRM_MIGRATE is not set
  409. +# CONFIG_XFRM_STATISTICS is not set
  410. +# CONFIG_NET_KEY is not set
  411. +CONFIG_INET=y
  412. +CONFIG_IP_MULTICAST=y
  413. +# CONFIG_IP_ADVANCED_ROUTER is not set
  414. +CONFIG_IP_FIB_HASH=y
  415. +CONFIG_IP_PNP=y
  416. +CONFIG_IP_PNP_DHCP=y
  417. +CONFIG_IP_PNP_BOOTP=y
  418. +# CONFIG_IP_PNP_RARP is not set
  419. +# CONFIG_NET_IPIP is not set
  420. +# CONFIG_NET_IPGRE is not set
  421. +# CONFIG_IP_MROUTE is not set
  422. +# CONFIG_ARPD is not set
  423. +# CONFIG_SYN_COOKIES is not set
  424. +# CONFIG_INET_AH is not set
  425. +# CONFIG_INET_ESP is not set
  426. +# CONFIG_INET_IPCOMP is not set
  427. +# CONFIG_INET_XFRM_TUNNEL is not set
  428. +# CONFIG_INET_TUNNEL is not set
  429. +CONFIG_INET_XFRM_MODE_TRANSPORT=y
  430. +CONFIG_INET_XFRM_MODE_TUNNEL=y
  431. +CONFIG_INET_XFRM_MODE_BEET=y
  432. +# CONFIG_INET_LRO is not set
  433. +CONFIG_INET_DIAG=y
  434. +CONFIG_INET_TCP_DIAG=y
  435. +# CONFIG_TCP_CONG_ADVANCED is not set
  436. +CONFIG_TCP_CONG_CUBIC=y
  437. +CONFIG_DEFAULT_TCP_CONG="cubic"
  438. +# CONFIG_TCP_MD5SIG is not set
  439. +# CONFIG_IPV6 is not set
  440. +# CONFIG_NETWORK_SECMARK is not set
  441. +# CONFIG_NETFILTER is not set
  442. +# CONFIG_IP_DCCP is not set
  443. +# CONFIG_IP_SCTP is not set
  444. +# CONFIG_TIPC is not set
  445. +# CONFIG_ATM is not set
  446. +# CONFIG_BRIDGE is not set
  447. +# CONFIG_VLAN_8021Q is not set
  448. +# CONFIG_DECNET is not set
  449. +# CONFIG_LLC2 is not set
  450. +# CONFIG_IPX is not set
  451. +# CONFIG_ATALK is not set
  452. +# CONFIG_X25 is not set
  453. +# CONFIG_LAPB is not set
  454. +# CONFIG_ECONET is not set
  455. +# CONFIG_WAN_ROUTER is not set
  456. +# CONFIG_NET_SCHED is not set
  457. +
  458. +#
  459. +# Network testing
  460. +#
  461. +CONFIG_NET_PKTGEN=m
  462. +# CONFIG_NET_TCPPROBE is not set
  463. +# CONFIG_HAMRADIO is not set
  464. +# CONFIG_CAN is not set
  465. +# CONFIG_IRDA is not set
  466. +# CONFIG_BT is not set
  467. +# CONFIG_AF_RXRPC is not set
  468. +
  469. +#
  470. +# Wireless
  471. +#
  472. +# CONFIG_CFG80211 is not set
  473. +CONFIG_WIRELESS_EXT=y
  474. +# CONFIG_MAC80211 is not set
  475. +# CONFIG_IEEE80211 is not set
  476. +# CONFIG_RFKILL is not set
  477. +# CONFIG_NET_9P is not set
  478. +
  479. +#
  480. +# Device Drivers
  481. +#
  482. +
  483. +#
  484. +# Generic Driver Options
  485. +#
  486. +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
  487. +CONFIG_STANDALONE=y
  488. +CONFIG_PREVENT_FIRMWARE_BUILD=y
  489. +CONFIG_FW_LOADER=y
  490. +# CONFIG_DEBUG_DRIVER is not set
  491. +# CONFIG_DEBUG_DEVRES is not set
  492. +# CONFIG_SYS_HYPERVISOR is not set
  493. +# CONFIG_CONNECTOR is not set
  494. +CONFIG_MTD=y
  495. +# CONFIG_MTD_DEBUG is not set
  496. +# CONFIG_MTD_CONCAT is not set
  497. +CONFIG_MTD_PARTITIONS=y
  498. +# CONFIG_MTD_REDBOOT_PARTS is not set
  499. +CONFIG_MTD_CMDLINE_PARTS=y
  500. +# CONFIG_MTD_AFS_PARTS is not set
  501. +# CONFIG_MTD_AR7_PARTS is not set
  502. +
  503. +#
  504. +# User Modules And Translation Layers
  505. +#
  506. +CONFIG_MTD_CHAR=y
  507. +CONFIG_MTD_BLKDEVS=y
  508. +CONFIG_MTD_BLOCK=y
  509. +# CONFIG_FTL is not set
  510. +# CONFIG_NFTL is not set
  511. +# CONFIG_INFTL is not set
  512. +# CONFIG_RFD_FTL is not set
  513. +# CONFIG_SSFDC is not set
  514. +# CONFIG_MTD_OOPS is not set
  515. +
  516. +#
  517. +# RAM/ROM/Flash chip drivers
  518. +#
  519. +CONFIG_MTD_CFI=y
  520. +CONFIG_MTD_JEDECPROBE=y
  521. +CONFIG_MTD_GEN_PROBE=y
  522. +CONFIG_MTD_CFI_ADV_OPTIONS=y
  523. +CONFIG_MTD_CFI_NOSWAP=y
  524. +# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
  525. +# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
  526. +CONFIG_MTD_CFI_GEOMETRY=y
  527. +CONFIG_MTD_MAP_BANK_WIDTH_1=y
  528. +CONFIG_MTD_MAP_BANK_WIDTH_2=y
  529. +# CONFIG_MTD_MAP_BANK_WIDTH_4 is not set
  530. +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
  531. +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
  532. +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
  533. +CONFIG_MTD_CFI_I1=y
  534. +CONFIG_MTD_CFI_I2=y
  535. +# CONFIG_MTD_CFI_I4 is not set
  536. +# CONFIG_MTD_CFI_I8 is not set
  537. +# CONFIG_MTD_OTP is not set
  538. +CONFIG_MTD_CFI_INTELEXT=y
  539. +# CONFIG_MTD_CFI_AMDSTD is not set
  540. +CONFIG_MTD_CFI_STAA=y
  541. +CONFIG_MTD_CFI_UTIL=y
  542. +# CONFIG_MTD_RAM is not set
  543. +# CONFIG_MTD_ROM is not set
  544. +# CONFIG_MTD_ABSENT is not set
  545. +
  546. +#
  547. +# Mapping drivers for chip access
  548. +#
  549. +# CONFIG_MTD_COMPLEX_MAPPINGS is not set
  550. +CONFIG_MTD_PHYSMAP=y
  551. +CONFIG_MTD_PHYSMAP_START=0x0
  552. +CONFIG_MTD_PHYSMAP_LEN=0x0
  553. +CONFIG_MTD_PHYSMAP_BANKWIDTH=0
  554. +# CONFIG_MTD_ARM_INTEGRATOR is not set
  555. +# CONFIG_MTD_IMPA7 is not set
  556. +# CONFIG_MTD_INTEL_VR_NOR is not set
  557. +# CONFIG_MTD_PLATRAM is not set
  558. +
  559. +#
  560. +# Self-contained MTD device drivers
  561. +#
  562. +# CONFIG_MTD_PMC551 is not set
  563. +# CONFIG_MTD_DATAFLASH is not set
  564. +CONFIG_MTD_M25P80=y
  565. +CONFIG_M25PXX_USE_FAST_READ=y
  566. +# CONFIG_MTD_SLRAM is not set
  567. +# CONFIG_MTD_PHRAM is not set
  568. +# CONFIG_MTD_MTDRAM is not set
  569. +# CONFIG_MTD_BLOCK2MTD is not set
  570. +
  571. +#
  572. +# Disk-On-Chip Device Drivers
  573. +#
  574. +# CONFIG_MTD_DOC2000 is not set
  575. +# CONFIG_MTD_DOC2001 is not set
  576. +# CONFIG_MTD_DOC2001PLUS is not set
  577. +CONFIG_MTD_NAND=y
  578. +CONFIG_MTD_NAND_VERIFY_WRITE=y
  579. +# CONFIG_MTD_NAND_ECC_SMC is not set
  580. +# CONFIG_MTD_NAND_MUSEUM_IDS is not set
  581. +CONFIG_MTD_NAND_IDS=y
  582. +# CONFIG_MTD_NAND_DISKONCHIP is not set
  583. +# CONFIG_MTD_NAND_CAFE is not set
  584. +# CONFIG_MTD_NAND_NANDSIM is not set
  585. +# CONFIG_MTD_NAND_PLATFORM is not set
  586. +# CONFIG_MTD_ALAUDA is not set
  587. +CONFIG_MTD_NAND_ORION=y
  588. +# CONFIG_MTD_ONENAND is not set
  589. +
  590. +#
  591. +# UBI - Unsorted block images
  592. +#
  593. +# CONFIG_MTD_UBI is not set
  594. +# CONFIG_PARPORT is not set
  595. +CONFIG_BLK_DEV=y
  596. +# CONFIG_BLK_CPQ_DA is not set
  597. +# CONFIG_BLK_CPQ_CISS_DA is not set
  598. +# CONFIG_BLK_DEV_DAC960 is not set
  599. +# CONFIG_BLK_DEV_UMEM is not set
  600. +# CONFIG_BLK_DEV_COW_COMMON is not set
  601. +CONFIG_BLK_DEV_LOOP=y
  602. +# CONFIG_BLK_DEV_CRYPTOLOOP is not set
  603. +# CONFIG_BLK_DEV_NBD is not set
  604. +# CONFIG_BLK_DEV_SX8 is not set
  605. +# CONFIG_BLK_DEV_UB is not set
  606. +# CONFIG_BLK_DEV_RAM is not set
  607. +# CONFIG_CDROM_PKTCDVD is not set
  608. +# CONFIG_ATA_OVER_ETH is not set
  609. +# CONFIG_MISC_DEVICES is not set
  610. +CONFIG_HAVE_IDE=y
  611. +# CONFIG_IDE is not set
  612. +
  613. +#
  614. +# SCSI device support
  615. +#
  616. +# CONFIG_RAID_ATTRS is not set
  617. +CONFIG_SCSI=y
  618. +CONFIG_SCSI_DMA=y
  619. +# CONFIG_SCSI_TGT is not set
  620. +# CONFIG_SCSI_NETLINK is not set
  621. +# CONFIG_SCSI_PROC_FS is not set
  622. +
  623. +#
  624. +# SCSI support type (disk, tape, CD-ROM)
  625. +#
  626. +CONFIG_BLK_DEV_SD=y
  627. +# CONFIG_CHR_DEV_ST is not set
  628. +# CONFIG_CHR_DEV_OSST is not set
  629. +CONFIG_BLK_DEV_SR=m
  630. +# CONFIG_BLK_DEV_SR_VENDOR is not set
  631. +CONFIG_CHR_DEV_SG=m
  632. +# CONFIG_CHR_DEV_SCH is not set
  633. +
  634. +#
  635. +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
  636. +#
  637. +# CONFIG_SCSI_MULTI_LUN is not set
  638. +# CONFIG_SCSI_CONSTANTS is not set
  639. +# CONFIG_SCSI_LOGGING is not set
  640. +# CONFIG_SCSI_SCAN_ASYNC is not set
  641. +CONFIG_SCSI_WAIT_SCAN=m
  642. +
  643. +#
  644. +# SCSI Transports
  645. +#
  646. +# CONFIG_SCSI_SPI_ATTRS is not set
  647. +# CONFIG_SCSI_FC_ATTRS is not set
  648. +# CONFIG_SCSI_ISCSI_ATTRS is not set
  649. +# CONFIG_SCSI_SAS_LIBSAS is not set
  650. +# CONFIG_SCSI_SRP_ATTRS is not set
  651. +CONFIG_SCSI_LOWLEVEL=y
  652. +# CONFIG_ISCSI_TCP is not set
  653. +# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
  654. +# CONFIG_SCSI_3W_9XXX is not set
  655. +# CONFIG_SCSI_ACARD is not set
  656. +# CONFIG_SCSI_AACRAID is not set
  657. +# CONFIG_SCSI_AIC7XXX is not set
  658. +# CONFIG_SCSI_AIC7XXX_OLD is not set
  659. +# CONFIG_SCSI_AIC79XX is not set
  660. +# CONFIG_SCSI_AIC94XX is not set
  661. +# CONFIG_SCSI_DPT_I2O is not set
  662. +# CONFIG_SCSI_ADVANSYS is not set
  663. +# CONFIG_SCSI_ARCMSR is not set
  664. +# CONFIG_MEGARAID_NEWGEN is not set
  665. +# CONFIG_MEGARAID_LEGACY is not set
  666. +# CONFIG_MEGARAID_SAS is not set
  667. +# CONFIG_SCSI_HPTIOP is not set
  668. +# CONFIG_SCSI_DMX3191D is not set
  669. +# CONFIG_SCSI_FUTURE_DOMAIN is not set
  670. +# CONFIG_SCSI_IPS is not set
  671. +# CONFIG_SCSI_INITIO is not set
  672. +# CONFIG_SCSI_INIA100 is not set
  673. +# CONFIG_SCSI_MVSAS is not set
  674. +# CONFIG_SCSI_STEX is not set
  675. +# CONFIG_SCSI_SYM53C8XX_2 is not set
  676. +# CONFIG_SCSI_IPR is not set
  677. +# CONFIG_SCSI_QLOGIC_1280 is not set
  678. +# CONFIG_SCSI_QLA_FC is not set
  679. +# CONFIG_SCSI_QLA_ISCSI is not set
  680. +# CONFIG_SCSI_LPFC is not set
  681. +# CONFIG_SCSI_DC395x is not set
  682. +# CONFIG_SCSI_DC390T is not set
  683. +# CONFIG_SCSI_NSP32 is not set
  684. +# CONFIG_SCSI_DEBUG is not set
  685. +# CONFIG_SCSI_SRP is not set
  686. +CONFIG_ATA=y
  687. +# CONFIG_ATA_NONSTANDARD is not set
  688. +CONFIG_SATA_PMP=y
  689. +# CONFIG_SATA_AHCI is not set
  690. +# CONFIG_SATA_SIL24 is not set
  691. +CONFIG_ATA_SFF=y
  692. +# CONFIG_SATA_SVW is not set
  693. +# CONFIG_ATA_PIIX is not set
  694. +CONFIG_SATA_MV=y
  695. +# CONFIG_SATA_NV is not set
  696. +# CONFIG_PDC_ADMA is not set
  697. +# CONFIG_SATA_QSTOR is not set
  698. +# CONFIG_SATA_PROMISE is not set
  699. +# CONFIG_SATA_SX4 is not set
  700. +# CONFIG_SATA_SIL is not set
  701. +# CONFIG_SATA_SIS is not set
  702. +# CONFIG_SATA_ULI is not set
  703. +# CONFIG_SATA_VIA is not set
  704. +# CONFIG_SATA_VITESSE is not set
  705. +# CONFIG_SATA_INIC162X is not set
  706. +# CONFIG_PATA_ALI is not set
  707. +# CONFIG_PATA_AMD is not set
  708. +# CONFIG_PATA_ARTOP is not set
  709. +# CONFIG_PATA_ATIIXP is not set
  710. +# CONFIG_PATA_CMD640_PCI is not set
  711. +# CONFIG_PATA_CMD64X is not set
  712. +# CONFIG_PATA_CS5520 is not set
  713. +# CONFIG_PATA_CS5530 is not set
  714. +# CONFIG_PATA_CYPRESS is not set
  715. +# CONFIG_PATA_EFAR is not set
  716. +# CONFIG_ATA_GENERIC is not set
  717. +# CONFIG_PATA_HPT366 is not set
  718. +# CONFIG_PATA_HPT37X is not set
  719. +# CONFIG_PATA_HPT3X2N is not set
  720. +# CONFIG_PATA_HPT3X3 is not set
  721. +# CONFIG_PATA_IT821X is not set
  722. +# CONFIG_PATA_IT8213 is not set
  723. +# CONFIG_PATA_JMICRON is not set
  724. +# CONFIG_PATA_TRIFLEX is not set
  725. +# CONFIG_PATA_MARVELL is not set
  726. +# CONFIG_PATA_MPIIX is not set
  727. +# CONFIG_PATA_OLDPIIX is not set
  728. +# CONFIG_PATA_NETCELL is not set
  729. +# CONFIG_PATA_NINJA32 is not set
  730. +# CONFIG_PATA_NS87410 is not set
  731. +# CONFIG_PATA_NS87415 is not set
  732. +# CONFIG_PATA_OPTI is not set
  733. +# CONFIG_PATA_OPTIDMA is not set
  734. +# CONFIG_PATA_PDC_OLD is not set
  735. +# CONFIG_PATA_RADISYS is not set
  736. +# CONFIG_PATA_RZ1000 is not set
  737. +# CONFIG_PATA_SC1200 is not set
  738. +# CONFIG_PATA_SERVERWORKS is not set
  739. +# CONFIG_PATA_PDC2027X is not set
  740. +# CONFIG_PATA_SIL680 is not set
  741. +# CONFIG_PATA_SIS is not set
  742. +# CONFIG_PATA_VIA is not set
  743. +# CONFIG_PATA_WINBOND is not set
  744. +# CONFIG_PATA_PLATFORM is not set
  745. +# CONFIG_PATA_SCH is not set
  746. +# CONFIG_MD is not set
  747. +# CONFIG_FUSION is not set
  748. +
  749. +#
  750. +# IEEE 1394 (FireWire) support
  751. +#
  752. +# CONFIG_FIREWIRE is not set
  753. +# CONFIG_IEEE1394 is not set
  754. +# CONFIG_I2O is not set
  755. +CONFIG_NETDEVICES=y
  756. +# CONFIG_NETDEVICES_MULTIQUEUE is not set
  757. +# CONFIG_DUMMY is not set
  758. +# CONFIG_BONDING is not set
  759. +# CONFIG_MACVLAN is not set
  760. +# CONFIG_EQUALIZER is not set
  761. +# CONFIG_TUN is not set
  762. +# CONFIG_VETH is not set
  763. +# CONFIG_ARCNET is not set
  764. +# CONFIG_PHYLIB is not set
  765. +CONFIG_NET_ETHERNET=y
  766. +CONFIG_MII=y
  767. +# CONFIG_AX88796 is not set
  768. +# CONFIG_HAPPYMEAL is not set
  769. +# CONFIG_SUNGEM is not set
  770. +# CONFIG_CASSINI is not set
  771. +# CONFIG_NET_VENDOR_3COM is not set
  772. +# CONFIG_SMC91X is not set
  773. +# CONFIG_DM9000 is not set
  774. +# CONFIG_ENC28J60 is not set
  775. +# CONFIG_NET_TULIP is not set
  776. +# CONFIG_HP100 is not set
  777. +# CONFIG_IBM_NEW_EMAC_ZMII is not set
  778. +# CONFIG_IBM_NEW_EMAC_RGMII is not set
  779. +# CONFIG_IBM_NEW_EMAC_TAH is not set
  780. +# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
  781. +CONFIG_NET_PCI=y
  782. +# CONFIG_PCNET32 is not set
  783. +# CONFIG_AMD8111_ETH is not set
  784. +# CONFIG_ADAPTEC_STARFIRE is not set
  785. +# CONFIG_B44 is not set
  786. +# CONFIG_FORCEDETH is not set
  787. +# CONFIG_EEPRO100 is not set
  788. +# CONFIG_E100 is not set
  789. +# CONFIG_FEALNX is not set
  790. +# CONFIG_NATSEMI is not set
  791. +# CONFIG_NE2K_PCI is not set
  792. +# CONFIG_8139CP is not set
  793. +# CONFIG_8139TOO is not set
  794. +# CONFIG_R6040 is not set
  795. +# CONFIG_SIS900 is not set
  796. +# CONFIG_EPIC100 is not set
  797. +# CONFIG_SUNDANCE is not set
  798. +# CONFIG_TLAN is not set
  799. +# CONFIG_VIA_RHINE is not set
  800. +# CONFIG_SC92031 is not set
  801. +CONFIG_NETDEV_1000=y
  802. +# CONFIG_ACENIC is not set
  803. +# CONFIG_DL2K is not set
  804. +CONFIG_E1000=y
  805. +CONFIG_E1000_NAPI=y
  806. +# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
  807. +# CONFIG_E1000E is not set
  808. +# CONFIG_E1000E_ENABLED is not set
  809. +# CONFIG_IP1000 is not set
  810. +# CONFIG_IGB is not set
  811. +# CONFIG_NS83820 is not set
  812. +# CONFIG_HAMACHI is not set
  813. +# CONFIG_YELLOWFIN is not set
  814. +# CONFIG_R8169 is not set
  815. +# CONFIG_SIS190 is not set
  816. +# CONFIG_SKGE is not set
  817. +# CONFIG_SKY2 is not set
  818. +# CONFIG_VIA_VELOCITY is not set
  819. +# CONFIG_TIGON3 is not set
  820. +# CONFIG_BNX2 is not set
  821. +CONFIG_MV643XX_ETH=y
  822. +# CONFIG_QLA3XXX is not set
  823. +# CONFIG_ATL1 is not set
  824. +# CONFIG_NETDEV_10000 is not set
  825. +# CONFIG_TR is not set
  826. +
  827. +#
  828. +# Wireless LAN
  829. +#
  830. +# CONFIG_WLAN_PRE80211 is not set
  831. +# CONFIG_WLAN_80211 is not set
  832. +# CONFIG_IWLWIFI_LEDS is not set
  833. +
  834. +#
  835. +# USB Network Adapters
  836. +#
  837. +# CONFIG_USB_CATC is not set
  838. +# CONFIG_USB_KAWETH is not set
  839. +# CONFIG_USB_PEGASUS is not set
  840. +# CONFIG_USB_RTL8150 is not set
  841. +# CONFIG_USB_USBNET is not set
  842. +# CONFIG_WAN is not set
  843. +# CONFIG_FDDI is not set
  844. +# CONFIG_HIPPI is not set
  845. +# CONFIG_PPP is not set
  846. +# CONFIG_SLIP is not set
  847. +# CONFIG_NET_FC is not set
  848. +# CONFIG_NETCONSOLE is not set
  849. +# CONFIG_NETPOLL is not set
  850. +# CONFIG_NET_POLL_CONTROLLER is not set
  851. +# CONFIG_ISDN is not set
  852. +
  853. +#
  854. +# Input device support
  855. +#
  856. +CONFIG_INPUT=y
  857. +# CONFIG_INPUT_FF_MEMLESS is not set
  858. +# CONFIG_INPUT_POLLDEV is not set
  859. +
  860. +#
  861. +# Userland interfaces
  862. +#
  863. +CONFIG_INPUT_MOUSEDEV=y
  864. +CONFIG_INPUT_MOUSEDEV_PSAUX=y
  865. +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
  866. +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
  867. +# CONFIG_INPUT_JOYDEV is not set
  868. +# CONFIG_INPUT_EVDEV is not set
  869. +# CONFIG_INPUT_EVBUG is not set
  870. +
  871. +#
  872. +# Input Device Drivers
  873. +#
  874. +# CONFIG_INPUT_KEYBOARD is not set
  875. +# CONFIG_INPUT_MOUSE is not set
  876. +# CONFIG_INPUT_JOYSTICK is not set
  877. +# CONFIG_INPUT_TABLET is not set
  878. +# CONFIG_INPUT_TOUCHSCREEN is not set
  879. +# CONFIG_INPUT_MISC is not set
  880. +
  881. +#
  882. +# Hardware I/O ports
  883. +#
  884. +# CONFIG_SERIO is not set
  885. +# CONFIG_GAMEPORT is not set
  886. +
  887. +#
  888. +# Character devices
  889. +#
  890. +# CONFIG_VT is not set
  891. +# CONFIG_DEVKMEM is not set
  892. +# CONFIG_SERIAL_NONSTANDARD is not set
  893. +# CONFIG_NOZOMI is not set
  894. +
  895. +#
  896. +# Serial drivers
  897. +#
  898. +CONFIG_SERIAL_8250=y
  899. +CONFIG_SERIAL_8250_CONSOLE=y
  900. +# CONFIG_SERIAL_8250_PCI is not set
  901. +CONFIG_SERIAL_8250_NR_UARTS=4
  902. +CONFIG_SERIAL_8250_RUNTIME_UARTS=2
  903. +# CONFIG_SERIAL_8250_EXTENDED is not set
  904. +
  905. +#
  906. +# Non-8250 serial port support
  907. +#
  908. +CONFIG_SERIAL_CORE=y
  909. +CONFIG_SERIAL_CORE_CONSOLE=y
  910. +# CONFIG_SERIAL_JSM is not set
  911. +CONFIG_UNIX98_PTYS=y
  912. +CONFIG_LEGACY_PTYS=y
  913. +CONFIG_LEGACY_PTY_COUNT=16
  914. +# CONFIG_IPMI_HANDLER is not set
  915. +# CONFIG_HW_RANDOM is not set
  916. +# CONFIG_NVRAM is not set
  917. +# CONFIG_R3964 is not set
  918. +# CONFIG_APPLICOM is not set
  919. +# CONFIG_RAW_DRIVER is not set
  920. +# CONFIG_TCG_TPM is not set
  921. +CONFIG_DEVPORT=y
  922. +CONFIG_I2C=y
  923. +CONFIG_I2C_BOARDINFO=y
  924. +CONFIG_I2C_CHARDEV=y
  925. +
  926. +#
  927. +# I2C Hardware Bus support
  928. +#
  929. +# CONFIG_I2C_ALI1535 is not set
  930. +# CONFIG_I2C_ALI1563 is not set
  931. +# CONFIG_I2C_ALI15X3 is not set
  932. +# CONFIG_I2C_AMD756 is not set
  933. +# CONFIG_I2C_AMD8111 is not set
  934. +# CONFIG_I2C_GPIO is not set
  935. +# CONFIG_I2C_I801 is not set
  936. +# CONFIG_I2C_I810 is not set
  937. +# CONFIG_I2C_PIIX4 is not set
  938. +# CONFIG_I2C_NFORCE2 is not set
  939. +# CONFIG_I2C_OCORES is not set
  940. +# CONFIG_I2C_PARPORT_LIGHT is not set
  941. +# CONFIG_I2C_PROSAVAGE is not set
  942. +# CONFIG_I2C_SAVAGE4 is not set
  943. +# CONFIG_I2C_SIMTEC is not set
  944. +# CONFIG_I2C_SIS5595 is not set
  945. +# CONFIG_I2C_SIS630 is not set
  946. +# CONFIG_I2C_SIS96X is not set
  947. +# CONFIG_I2C_TAOS_EVM is not set
  948. +# CONFIG_I2C_STUB is not set
  949. +# CONFIG_I2C_TINY_USB is not set
  950. +# CONFIG_I2C_VIA is not set
  951. +# CONFIG_I2C_VIAPRO is not set
  952. +# CONFIG_I2C_VOODOO3 is not set
  953. +# CONFIG_I2C_PCA_PLATFORM is not set
  954. +CONFIG_I2C_MV64XXX=y
  955. +
  956. +#
  957. +# Miscellaneous I2C Chip support
  958. +#
  959. +# CONFIG_DS1682 is not set
  960. +# CONFIG_SENSORS_EEPROM is not set
  961. +# CONFIG_SENSORS_PCF8574 is not set
  962. +# CONFIG_PCF8575 is not set
  963. +# CONFIG_SENSORS_PCF8591 is not set
  964. +# CONFIG_SENSORS_MAX6875 is not set
  965. +# CONFIG_SENSORS_TSL2550 is not set
  966. +# CONFIG_I2C_DEBUG_CORE is not set
  967. +# CONFIG_I2C_DEBUG_ALGO is not set
  968. +# CONFIG_I2C_DEBUG_BUS is not set
  969. +# CONFIG_I2C_DEBUG_CHIP is not set
  970. +CONFIG_SPI=y
  971. +# CONFIG_SPI_DEBUG is not set
  972. +CONFIG_SPI_MASTER=y
  973. +
  974. +#
  975. +# SPI Master Controller Drivers
  976. +#
  977. +# CONFIG_SPI_BITBANG is not set
  978. +CONFIG_SPI_ORION=y
  979. +
  980. +#
  981. +# SPI Protocol Masters
  982. +#
  983. +# CONFIG_SPI_AT25 is not set
  984. +# CONFIG_SPI_SPIDEV is not set
  985. +# CONFIG_SPI_TLE62X0 is not set
  986. +# CONFIG_W1 is not set
  987. +# CONFIG_POWER_SUPPLY is not set
  988. +# CONFIG_HWMON is not set
  989. +# CONFIG_WATCHDOG is not set
  990. +
  991. +#
  992. +# Sonics Silicon Backplane
  993. +#
  994. +CONFIG_SSB_POSSIBLE=y
  995. +# CONFIG_SSB is not set
  996. +
  997. +#
  998. +# Multifunction device drivers
  999. +#
  1000. +# CONFIG_MFD_SM501 is not set
  1001. +# CONFIG_MFD_ASIC3 is not set
  1002. +# CONFIG_HTC_PASIC3 is not set
  1003. +
  1004. +#
  1005. +# Multimedia devices
  1006. +#
  1007. +
  1008. +#
  1009. +# Multimedia core support
  1010. +#
  1011. +# CONFIG_VIDEO_DEV is not set
  1012. +# CONFIG_DVB_CORE is not set
  1013. +# CONFIG_VIDEO_MEDIA is not set
  1014. +
  1015. +#
  1016. +# Multimedia drivers
  1017. +#
  1018. +# CONFIG_DAB is not set
  1019. +
  1020. +#
  1021. +# Graphics support
  1022. +#
  1023. +# CONFIG_DRM is not set
  1024. +# CONFIG_VGASTATE is not set
  1025. +# CONFIG_VIDEO_OUTPUT_CONTROL is not set
  1026. +# CONFIG_FB is not set
  1027. +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
  1028. +
  1029. +#
  1030. +# Display device support
  1031. +#
  1032. +# CONFIG_DISPLAY_SUPPORT is not set
  1033. +
  1034. +#
  1035. +# Sound
  1036. +#
  1037. +# CONFIG_SOUND is not set
  1038. +CONFIG_HID_SUPPORT=y
  1039. +CONFIG_HID=y
  1040. +# CONFIG_HID_DEBUG is not set
  1041. +# CONFIG_HIDRAW is not set
  1042. +
  1043. +#
  1044. +# USB Input Devices
  1045. +#
  1046. +CONFIG_USB_HID=y
  1047. +# CONFIG_USB_HIDINPUT_POWERBOOK is not set
  1048. +# CONFIG_HID_FF is not set
  1049. +# CONFIG_USB_HIDDEV is not set
  1050. +CONFIG_USB_SUPPORT=y
  1051. +CONFIG_USB_ARCH_HAS_HCD=y
  1052. +CONFIG_USB_ARCH_HAS_OHCI=y
  1053. +CONFIG_USB_ARCH_HAS_EHCI=y
  1054. +CONFIG_USB=y
  1055. +# CONFIG_USB_DEBUG is not set
  1056. +# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set
  1057. +
  1058. +#
  1059. +# Miscellaneous USB options
  1060. +#
  1061. +CONFIG_USB_DEVICEFS=y
  1062. +CONFIG_USB_DEVICE_CLASS=y
  1063. +# CONFIG_USB_DYNAMIC_MINORS is not set
  1064. +# CONFIG_USB_OTG is not set
  1065. +# CONFIG_USB_OTG_WHITELIST is not set
  1066. +# CONFIG_USB_OTG_BLACKLIST_HUB is not set
  1067. +
  1068. +#
  1069. +# USB Host Controller Drivers
  1070. +#
  1071. +# CONFIG_USB_C67X00_HCD is not set
  1072. +CONFIG_USB_EHCI_HCD=y
  1073. +CONFIG_USB_EHCI_ROOT_HUB_TT=y
  1074. +CONFIG_USB_EHCI_TT_NEWSCHED=y
  1075. +# CONFIG_USB_ISP116X_HCD is not set
  1076. +# CONFIG_USB_ISP1760_HCD is not set
  1077. +# CONFIG_USB_OHCI_HCD is not set
  1078. +# CONFIG_USB_UHCI_HCD is not set
  1079. +# CONFIG_USB_SL811_HCD is not set
  1080. +# CONFIG_USB_R8A66597_HCD is not set
  1081. +
  1082. +#
  1083. +# USB Device Class drivers
  1084. +#
  1085. +# CONFIG_USB_ACM is not set
  1086. +CONFIG_USB_PRINTER=y
  1087. +# CONFIG_USB_WDM is not set
  1088. +
  1089. +#
  1090. +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
  1091. +#
  1092. +
  1093. +#
  1094. +# may also be needed; see USB_STORAGE Help for more information
  1095. +#
  1096. +CONFIG_USB_STORAGE=y
  1097. +# CONFIG_USB_STORAGE_DEBUG is not set
  1098. +CONFIG_USB_STORAGE_DATAFAB=y
  1099. +CONFIG_USB_STORAGE_FREECOM=y
  1100. +# CONFIG_USB_STORAGE_ISD200 is not set
  1101. +CONFIG_USB_STORAGE_DPCM=y
  1102. +# CONFIG_USB_STORAGE_USBAT is not set
  1103. +CONFIG_USB_STORAGE_SDDR09=y
  1104. +CONFIG_USB_STORAGE_SDDR55=y
  1105. +CONFIG_USB_STORAGE_JUMPSHOT=y
  1106. +# CONFIG_USB_STORAGE_ALAUDA is not set
  1107. +# CONFIG_USB_STORAGE_ONETOUCH is not set
  1108. +# CONFIG_USB_STORAGE_KARMA is not set
  1109. +# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
  1110. +# CONFIG_USB_LIBUSUAL is not set
  1111. +
  1112. +#
  1113. +# USB Imaging devices
  1114. +#
  1115. +# CONFIG_USB_MDC800 is not set
  1116. +# CONFIG_USB_MICROTEK is not set
  1117. +# CONFIG_USB_MON is not set
  1118. +
  1119. +#
  1120. +# USB port drivers
  1121. +#
  1122. +# CONFIG_USB_SERIAL is not set
  1123. +
  1124. +#
  1125. +# USB Miscellaneous drivers
  1126. +#
  1127. +# CONFIG_USB_EMI62 is not set
  1128. +# CONFIG_USB_EMI26 is not set
  1129. +# CONFIG_USB_ADUTUX is not set
  1130. +# CONFIG_USB_AUERSWALD is not set
  1131. +# CONFIG_USB_RIO500 is not set
  1132. +# CONFIG_USB_LEGOTOWER is not set
  1133. +# CONFIG_USB_LCD is not set
  1134. +# CONFIG_USB_BERRY_CHARGE is not set
  1135. +# CONFIG_USB_LED is not set
  1136. +# CONFIG_USB_CYPRESS_CY7C63 is not set
  1137. +# CONFIG_USB_CYTHERM is not set
  1138. +# CONFIG_USB_PHIDGET is not set
  1139. +# CONFIG_USB_IDMOUSE is not set
  1140. +# CONFIG_USB_FTDI_ELAN is not set
  1141. +# CONFIG_USB_APPLEDISPLAY is not set
  1142. +# CONFIG_USB_SISUSBVGA is not set
  1143. +# CONFIG_USB_LD is not set
  1144. +# CONFIG_USB_TRANCEVIBRATOR is not set
  1145. +# CONFIG_USB_IOWARRIOR is not set
  1146. +# CONFIG_USB_TEST is not set
  1147. +# CONFIG_USB_ISIGHTFW is not set
  1148. +# CONFIG_USB_GADGET is not set
  1149. +# CONFIG_MMC is not set
  1150. +CONFIG_NEW_LEDS=y
  1151. +# CONFIG_LEDS_CLASS is not set
  1152. +
  1153. +#
  1154. +# LED drivers
  1155. +#
  1156. +
  1157. +#
  1158. +# LED Triggers
  1159. +#
  1160. +# CONFIG_LEDS_TRIGGERS is not set
  1161. +CONFIG_RTC_LIB=y
  1162. +CONFIG_RTC_CLASS=y
  1163. +# CONFIG_RTC_DEBUG is not set
  1164. +
  1165. +#
  1166. +# RTC interfaces
  1167. +#
  1168. +CONFIG_RTC_INTF_SYSFS=y
  1169. +CONFIG_RTC_INTF_PROC=y
  1170. +CONFIG_RTC_INTF_DEV=y
  1171. +# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
  1172. +# CONFIG_RTC_DRV_TEST is not set
  1173. +
  1174. +#
  1175. +# I2C RTC drivers
  1176. +#
  1177. +# CONFIG_RTC_DRV_DS1307 is not set
  1178. +# CONFIG_RTC_DRV_DS1374 is not set
  1179. +# CONFIG_RTC_DRV_DS1672 is not set
  1180. +# CONFIG_RTC_DRV_MAX6900 is not set
  1181. +CONFIG_RTC_DRV_MV=y
  1182. +# CONFIG_RTC_DRV_RS5C372 is not set
  1183. +# CONFIG_RTC_DRV_ISL1208 is not set
  1184. +# CONFIG_RTC_DRV_X1205 is not set
  1185. +# CONFIG_RTC_DRV_PCF8563 is not set
  1186. +# CONFIG_RTC_DRV_PCF8583 is not set
  1187. +# CONFIG_RTC_DRV_M41T80 is not set
  1188. +# CONFIG_RTC_DRV_S35390A is not set
  1189. +
  1190. +#
  1191. +# SPI RTC drivers
  1192. +#
  1193. +# CONFIG_RTC_DRV_MAX6902 is not set
  1194. +# CONFIG_RTC_DRV_R9701 is not set
  1195. +# CONFIG_RTC_DRV_RS5C348 is not set
  1196. +
  1197. +#
  1198. +# Platform RTC drivers
  1199. +#
  1200. +# CONFIG_RTC_DRV_CMOS is not set
  1201. +# CONFIG_RTC_DRV_DS1511 is not set
  1202. +# CONFIG_RTC_DRV_DS1553 is not set
  1203. +# CONFIG_RTC_DRV_DS1742 is not set
  1204. +# CONFIG_RTC_DRV_STK17TA8 is not set
  1205. +# CONFIG_RTC_DRV_M48T86 is not set
  1206. +# CONFIG_RTC_DRV_M48T59 is not set
  1207. +# CONFIG_RTC_DRV_V3020 is not set
  1208. +
  1209. +#
  1210. +# on-CPU RTC drivers
  1211. +#
  1212. +CONFIG_DMADEVICES=y
  1213. +
  1214. +#
  1215. +# DMA Devices
  1216. +#
  1217. +CONFIG_MV_XOR=y
  1218. +CONFIG_DMA_ENGINE=y
  1219. +
  1220. +#
  1221. +# DMA Clients
  1222. +#
  1223. +# CONFIG_NET_DMA is not set
  1224. +# CONFIG_UIO is not set
  1225. +
  1226. +#
  1227. +# File systems
  1228. +#
  1229. +CONFIG_EXT2_FS=y
  1230. +# CONFIG_EXT2_FS_XATTR is not set
  1231. +# CONFIG_EXT2_FS_XIP is not set
  1232. +CONFIG_EXT3_FS=y
  1233. +# CONFIG_EXT3_FS_XATTR is not set
  1234. +# CONFIG_EXT4DEV_FS is not set
  1235. +CONFIG_JBD=y
  1236. +# CONFIG_REISERFS_FS is not set
  1237. +# CONFIG_JFS_FS is not set
  1238. +# CONFIG_FS_POSIX_ACL is not set
  1239. +CONFIG_XFS_FS=y
  1240. +# CONFIG_XFS_QUOTA is not set
  1241. +# CONFIG_XFS_POSIX_ACL is not set
  1242. +# CONFIG_XFS_RT is not set
  1243. +# CONFIG_XFS_DEBUG is not set
  1244. +# CONFIG_OCFS2_FS is not set
  1245. +CONFIG_DNOTIFY=y
  1246. +CONFIG_INOTIFY=y
  1247. +CONFIG_INOTIFY_USER=y
  1248. +# CONFIG_QUOTA is not set
  1249. +# CONFIG_AUTOFS_FS is not set
  1250. +# CONFIG_AUTOFS4_FS is not set
  1251. +# CONFIG_FUSE_FS is not set
  1252. +
  1253. +#
  1254. +# CD-ROM/DVD Filesystems
  1255. +#
  1256. +CONFIG_ISO9660_FS=y
  1257. +CONFIG_JOLIET=y
  1258. +# CONFIG_ZISOFS is not set
  1259. +CONFIG_UDF_FS=m
  1260. +CONFIG_UDF_NLS=y
  1261. +
  1262. +#
  1263. +# DOS/FAT/NT Filesystems
  1264. +#
  1265. +CONFIG_FAT_FS=y
  1266. +CONFIG_MSDOS_FS=y
  1267. +CONFIG_VFAT_FS=y
  1268. +CONFIG_FAT_DEFAULT_CODEPAGE=437
  1269. +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
  1270. +# CONFIG_NTFS_FS is not set
  1271. +
  1272. +#
  1273. +# Pseudo filesystems
  1274. +#
  1275. +CONFIG_PROC_FS=y
  1276. +CONFIG_PROC_SYSCTL=y
  1277. +CONFIG_SYSFS=y
  1278. +CONFIG_TMPFS=y
  1279. +# CONFIG_TMPFS_POSIX_ACL is not set
  1280. +# CONFIG_HUGETLB_PAGE is not set
  1281. +# CONFIG_CONFIGFS_FS is not set
  1282. +
  1283. +#
  1284. +# Miscellaneous filesystems
  1285. +#
  1286. +# CONFIG_ADFS_FS is not set
  1287. +# CONFIG_AFFS_FS is not set
  1288. +# CONFIG_HFS_FS is not set
  1289. +# CONFIG_HFSPLUS_FS is not set
  1290. +# CONFIG_BEFS_FS is not set
  1291. +# CONFIG_BFS_FS is not set
  1292. +# CONFIG_EFS_FS is not set
  1293. +CONFIG_JFFS2_FS=y
  1294. +CONFIG_JFFS2_FS_DEBUG=0
  1295. +CONFIG_JFFS2_FS_WRITEBUFFER=y
  1296. +# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
  1297. +# CONFIG_JFFS2_SUMMARY is not set
  1298. +# CONFIG_JFFS2_FS_XATTR is not set
  1299. +# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
  1300. +CONFIG_JFFS2_ZLIB=y
  1301. +# CONFIG_JFFS2_LZO is not set
  1302. +CONFIG_JFFS2_RTIME=y
  1303. +# CONFIG_JFFS2_RUBIN is not set
  1304. +CONFIG_CRAMFS=y
  1305. +# CONFIG_VXFS_FS is not set
  1306. +# CONFIG_MINIX_FS is not set
  1307. +# CONFIG_HPFS_FS is not set
  1308. +# CONFIG_QNX4FS_FS is not set
  1309. +# CONFIG_ROMFS_FS is not set
  1310. +# CONFIG_SYSV_FS is not set
  1311. +# CONFIG_UFS_FS is not set
  1312. +CONFIG_NETWORK_FILESYSTEMS=y
  1313. +CONFIG_NFS_FS=y
  1314. +CONFIG_NFS_V3=y
  1315. +# CONFIG_NFS_V3_ACL is not set
  1316. +# CONFIG_NFS_V4 is not set
  1317. +# CONFIG_NFSD is not set
  1318. +CONFIG_ROOT_NFS=y
  1319. +CONFIG_LOCKD=y
  1320. +CONFIG_LOCKD_V4=y
  1321. +CONFIG_NFS_COMMON=y
  1322. +CONFIG_SUNRPC=y
  1323. +# CONFIG_SUNRPC_BIND34 is not set
  1324. +# CONFIG_RPCSEC_GSS_KRB5 is not set
  1325. +# CONFIG_RPCSEC_GSS_SPKM3 is not set
  1326. +# CONFIG_SMB_FS is not set
  1327. +# CONFIG_CIFS is not set
  1328. +# CONFIG_NCP_FS is not set
  1329. +# CONFIG_CODA_FS is not set
  1330. +# CONFIG_AFS_FS is not set
  1331. +
  1332. +#
  1333. +# Partition Types
  1334. +#
  1335. +CONFIG_PARTITION_ADVANCED=y
  1336. +# CONFIG_ACORN_PARTITION is not set
  1337. +# CONFIG_OSF_PARTITION is not set
  1338. +# CONFIG_AMIGA_PARTITION is not set
  1339. +# CONFIG_ATARI_PARTITION is not set
  1340. +# CONFIG_MAC_PARTITION is not set
  1341. +CONFIG_MSDOS_PARTITION=y
  1342. +# CONFIG_BSD_DISKLABEL is not set
  1343. +# CONFIG_MINIX_SUBPARTITION is not set
  1344. +# CONFIG_SOLARIS_X86_PARTITION is not set
  1345. +# CONFIG_UNIXWARE_DISKLABEL is not set
  1346. +# CONFIG_LDM_PARTITION is not set
  1347. +# CONFIG_SGI_PARTITION is not set
  1348. +# CONFIG_ULTRIX_PARTITION is not set
  1349. +# CONFIG_SUN_PARTITION is not set
  1350. +# CONFIG_KARMA_PARTITION is not set
  1351. +# CONFIG_EFI_PARTITION is not set
  1352. +# CONFIG_SYSV68_PARTITION is not set
  1353. +CONFIG_NLS=y
  1354. +CONFIG_NLS_DEFAULT="iso8859-1"
  1355. +CONFIG_NLS_CODEPAGE_437=y
  1356. +# CONFIG_NLS_CODEPAGE_737 is not set
  1357. +# CONFIG_NLS_CODEPAGE_775 is not set
  1358. +CONFIG_NLS_CODEPAGE_850=y
  1359. +# CONFIG_NLS_CODEPAGE_852 is not set
  1360. +# CONFIG_NLS_CODEPAGE_855 is not set
  1361. +# CONFIG_NLS_CODEPAGE_857 is not set
  1362. +# CONFIG_NLS_CODEPAGE_860 is not set
  1363. +# CONFIG_NLS_CODEPAGE_861 is not set
  1364. +# CONFIG_NLS_CODEPAGE_862 is not set
  1365. +# CONFIG_NLS_CODEPAGE_863 is not set
  1366. +# CONFIG_NLS_CODEPAGE_864 is not set
  1367. +# CONFIG_NLS_CODEPAGE_865 is not set
  1368. +# CONFIG_NLS_CODEPAGE_866 is not set
  1369. +# CONFIG_NLS_CODEPAGE_869 is not set
  1370. +# CONFIG_NLS_CODEPAGE_936 is not set
  1371. +# CONFIG_NLS_CODEPAGE_950 is not set
  1372. +# CONFIG_NLS_CODEPAGE_932 is not set
  1373. +# CONFIG_NLS_CODEPAGE_949 is not set
  1374. +# CONFIG_NLS_CODEPAGE_874 is not set
  1375. +# CONFIG_NLS_ISO8859_8 is not set
  1376. +# CONFIG_NLS_CODEPAGE_1250 is not set
  1377. +# CONFIG_NLS_CODEPAGE_1251 is not set
  1378. +# CONFIG_NLS_ASCII is not set
  1379. +CONFIG_NLS_ISO8859_1=y
  1380. +CONFIG_NLS_ISO8859_2=y
  1381. +# CONFIG_NLS_ISO8859_3 is not set
  1382. +# CONFIG_NLS_ISO8859_4 is not set
  1383. +# CONFIG_NLS_ISO8859_5 is not set
  1384. +# CONFIG_NLS_ISO8859_6 is not set
  1385. +# CONFIG_NLS_ISO8859_7 is not set
  1386. +# CONFIG_NLS_ISO8859_9 is not set
  1387. +# CONFIG_NLS_ISO8859_13 is not set
  1388. +# CONFIG_NLS_ISO8859_14 is not set
  1389. +# CONFIG_NLS_ISO8859_15 is not set
  1390. +# CONFIG_NLS_KOI8_R is not set
  1391. +# CONFIG_NLS_KOI8_U is not set
  1392. +CONFIG_NLS_UTF8=y
  1393. +# CONFIG_DLM is not set
  1394. +
  1395. +#
  1396. +# Kernel hacking
  1397. +#
  1398. +# CONFIG_PRINTK_TIME is not set
  1399. +CONFIG_ENABLE_WARN_DEPRECATED=y
  1400. +CONFIG_ENABLE_MUST_CHECK=y
  1401. +CONFIG_FRAME_WARN=1024
  1402. +CONFIG_MAGIC_SYSRQ=y
  1403. +# CONFIG_UNUSED_SYMBOLS is not set
  1404. +# CONFIG_DEBUG_FS is not set
  1405. +# CONFIG_HEADERS_CHECK is not set
  1406. +CONFIG_DEBUG_KERNEL=y
  1407. +# CONFIG_DEBUG_SHIRQ is not set
  1408. +CONFIG_DETECT_SOFTLOCKUP=y
  1409. +# CONFIG_SCHED_DEBUG is not set
  1410. +# CONFIG_SCHEDSTATS is not set
  1411. +# CONFIG_TIMER_STATS is not set
  1412. +# CONFIG_DEBUG_OBJECTS is not set
  1413. +# CONFIG_DEBUG_SLAB is not set
  1414. +# CONFIG_DEBUG_PREEMPT is not set
  1415. +# CONFIG_DEBUG_RT_MUTEXES is not set
  1416. +# CONFIG_RT_MUTEX_TESTER is not set
  1417. +# CONFIG_DEBUG_SPINLOCK is not set
  1418. +# CONFIG_DEBUG_MUTEXES is not set
  1419. +# CONFIG_DEBUG_LOCK_ALLOC is not set
  1420. +# CONFIG_PROVE_LOCKING is not set
  1421. +# CONFIG_LOCK_STAT is not set
  1422. +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
  1423. +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
  1424. +# CONFIG_DEBUG_KOBJECT is not set
  1425. +# CONFIG_DEBUG_BUGVERBOSE is not set
  1426. +CONFIG_DEBUG_INFO=y
  1427. +# CONFIG_DEBUG_VM is not set
  1428. +# CONFIG_DEBUG_WRITECOUNT is not set
  1429. +# CONFIG_DEBUG_LIST is not set
  1430. +# CONFIG_DEBUG_SG is not set
  1431. +CONFIG_FRAME_POINTER=y
  1432. +# CONFIG_BOOT_PRINTK_DELAY is not set
  1433. +# CONFIG_RCU_TORTURE_TEST is not set
  1434. +# CONFIG_KPROBES_SANITY_TEST is not set
  1435. +# CONFIG_BACKTRACE_SELF_TEST is not set
  1436. +# CONFIG_LKDTM is not set
  1437. +# CONFIG_FAULT_INJECTION is not set
  1438. +# CONFIG_LATENCYTOP is not set
  1439. +# CONFIG_SAMPLES is not set
  1440. +CONFIG_DEBUG_USER=y
  1441. +CONFIG_DEBUG_ERRORS=y
  1442. +# CONFIG_DEBUG_STACK_USAGE is not set
  1443. +CONFIG_DEBUG_LL=y
  1444. +# CONFIG_DEBUG_ICEDCC is not set
  1445. +
  1446. +#
  1447. +# Security options
  1448. +#
  1449. +# CONFIG_KEYS is not set
  1450. +# CONFIG_SECURITY is not set
  1451. +# CONFIG_SECURITY_FILE_CAPABILITIES is not set
  1452. +CONFIG_ASYNC_CORE=y
  1453. +CONFIG_CRYPTO=y
  1454. +
  1455. +#
  1456. +# Crypto core or helper
  1457. +#
  1458. +CONFIG_CRYPTO_ALGAPI=m
  1459. +CONFIG_CRYPTO_BLKCIPHER=m
  1460. +CONFIG_CRYPTO_MANAGER=m
  1461. +# CONFIG_CRYPTO_GF128MUL is not set
  1462. +# CONFIG_CRYPTO_NULL is not set
  1463. +# CONFIG_CRYPTO_CRYPTD is not set
  1464. +# CONFIG_CRYPTO_AUTHENC is not set
  1465. +# CONFIG_CRYPTO_TEST is not set
  1466. +
  1467. +#
  1468. +# Authenticated Encryption with Associated Data
  1469. +#
  1470. +# CONFIG_CRYPTO_CCM is not set
  1471. +# CONFIG_CRYPTO_GCM is not set
  1472. +# CONFIG_CRYPTO_SEQIV is not set
  1473. +
  1474. +#
  1475. +# Block modes
  1476. +#
  1477. +CONFIG_CRYPTO_CBC=m
  1478. +# CONFIG_CRYPTO_CTR is not set
  1479. +# CONFIG_CRYPTO_CTS is not set
  1480. +CONFIG_CRYPTO_ECB=m
  1481. +# CONFIG_CRYPTO_LRW is not set
  1482. +CONFIG_CRYPTO_PCBC=m
  1483. +# CONFIG_CRYPTO_XTS is not set
  1484. +
  1485. +#
  1486. +# Hash modes
  1487. +#
  1488. +# CONFIG_CRYPTO_HMAC is not set
  1489. +# CONFIG_CRYPTO_XCBC is not set
  1490. +
  1491. +#
  1492. +# Digest
  1493. +#
  1494. +# CONFIG_CRYPTO_CRC32C is not set
  1495. +# CONFIG_CRYPTO_MD4 is not set
  1496. +# CONFIG_CRYPTO_MD5 is not set
  1497. +# CONFIG_CRYPTO_MICHAEL_MIC is not set
  1498. +# CONFIG_CRYPTO_SHA1 is not set
  1499. +# CONFIG_CRYPTO_SHA256 is not set
  1500. +# CONFIG_CRYPTO_SHA512 is not set
  1501. +# CONFIG_CRYPTO_TGR192 is not set
  1502. +# CONFIG_CRYPTO_WP512 is not set
  1503. +
  1504. +#
  1505. +# Ciphers
  1506. +#
  1507. +# CONFIG_CRYPTO_AES is not set
  1508. +# CONFIG_CRYPTO_ANUBIS is not set
  1509. +# CONFIG_CRYPTO_ARC4 is not set
  1510. +# CONFIG_CRYPTO_BLOWFISH is not set
  1511. +# CONFIG_CRYPTO_CAMELLIA is not set
  1512. +# CONFIG_CRYPTO_CAST5 is not set
  1513. +# CONFIG_CRYPTO_CAST6 is not set
  1514. +# CONFIG_CRYPTO_DES is not set
  1515. +# CONFIG_CRYPTO_FCRYPT is not set
  1516. +# CONFIG_CRYPTO_KHAZAD is not set
  1517. +# CONFIG_CRYPTO_SALSA20 is not set
  1518. +# CONFIG_CRYPTO_SEED is not set
  1519. +# CONFIG_CRYPTO_SERPENT is not set
  1520. +# CONFIG_CRYPTO_TEA is not set
  1521. +# CONFIG_CRYPTO_TWOFISH is not set
  1522. +
  1523. +#
  1524. +# Compression
  1525. +#
  1526. +# CONFIG_CRYPTO_DEFLATE is not set
  1527. +# CONFIG_CRYPTO_LZO is not set
  1528. +CONFIG_CRYPTO_HW=y
  1529. +# CONFIG_CRYPTO_DEV_HIFN_795X is not set
  1530. +
  1531. +#
  1532. +# Library routines
  1533. +#
  1534. +CONFIG_BITREVERSE=y
  1535. +# CONFIG_GENERIC_FIND_FIRST_BIT is not set
  1536. +# CONFIG_GENERIC_FIND_NEXT_BIT is not set
  1537. +CONFIG_CRC_CCITT=y
  1538. +CONFIG_CRC16=y
  1539. +CONFIG_CRC_ITU_T=m
  1540. +CONFIG_CRC32=y
  1541. +# CONFIG_CRC7 is not set
  1542. +CONFIG_LIBCRC32C=y
  1543. +CONFIG_ZLIB_INFLATE=y
  1544. +CONFIG_ZLIB_DEFLATE=y
  1545. +CONFIG_PLIST=y
  1546. +CONFIG_HAS_IOMEM=y
  1547. +CONFIG_HAS_IOPORT=y
  1548. +CONFIG_HAS_DMA=y
  1549. --- /dev/null
  1550. +++ b/arch/arm/configs/loki_defconfig
  1551. @@ -0,0 +1,1147 @@
  1552. +#
  1553. +# Automatically generated make config: don't edit
  1554. +# Linux kernel version: 2.6.26-rc5
  1555. +# Fri Jun 13 03:07:49 2008
  1556. +#
  1557. +CONFIG_ARM=y
  1558. +CONFIG_SYS_SUPPORTS_APM_EMULATION=y
  1559. +# CONFIG_GENERIC_GPIO is not set
  1560. +CONFIG_GENERIC_TIME=y
  1561. +CONFIG_GENERIC_CLOCKEVENTS=y
  1562. +CONFIG_MMU=y
  1563. +# CONFIG_NO_IOPORT is not set
  1564. +CONFIG_GENERIC_HARDIRQS=y
  1565. +CONFIG_STACKTRACE_SUPPORT=y
  1566. +CONFIG_HAVE_LATENCYTOP_SUPPORT=y
  1567. +CONFIG_LOCKDEP_SUPPORT=y
  1568. +CONFIG_TRACE_IRQFLAGS_SUPPORT=y
  1569. +CONFIG_HARDIRQS_SW_RESEND=y
  1570. +CONFIG_GENERIC_IRQ_PROBE=y
  1571. +CONFIG_RWSEM_GENERIC_SPINLOCK=y
  1572. +# CONFIG_ARCH_HAS_ILOG2_U32 is not set
  1573. +# CONFIG_ARCH_HAS_ILOG2_U64 is not set
  1574. +CONFIG_GENERIC_HWEIGHT=y
  1575. +CONFIG_GENERIC_CALIBRATE_DELAY=y
  1576. +CONFIG_ARCH_SUPPORTS_AOUT=y
  1577. +CONFIG_ZONE_DMA=y
  1578. +CONFIG_VECTORS_BASE=0xffff0000
  1579. +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
  1580. +
  1581. +#
  1582. +# General setup
  1583. +#
  1584. +CONFIG_EXPERIMENTAL=y
  1585. +CONFIG_BROKEN_ON_SMP=y
  1586. +CONFIG_LOCK_KERNEL=y
  1587. +CONFIG_INIT_ENV_ARG_LIMIT=32
  1588. +CONFIG_LOCALVERSION=""
  1589. +CONFIG_LOCALVERSION_AUTO=y
  1590. +CONFIG_SWAP=y
  1591. +CONFIG_SYSVIPC=y
  1592. +CONFIG_SYSVIPC_SYSCTL=y
  1593. +# CONFIG_POSIX_MQUEUE is not set
  1594. +# CONFIG_BSD_PROCESS_ACCT is not set
  1595. +# CONFIG_TASKSTATS is not set
  1596. +# CONFIG_AUDIT is not set
  1597. +# CONFIG_IKCONFIG is not set
  1598. +CONFIG_LOG_BUF_SHIFT=14
  1599. +# CONFIG_CGROUPS is not set
  1600. +# CONFIG_GROUP_SCHED is not set
  1601. +# CONFIG_SYSFS_DEPRECATED_V2 is not set
  1602. +# CONFIG_RELAY is not set
  1603. +# CONFIG_NAMESPACES is not set
  1604. +# CONFIG_BLK_DEV_INITRD is not set
  1605. +CONFIG_CC_OPTIMIZE_FOR_SIZE=y
  1606. +CONFIG_SYSCTL=y
  1607. +CONFIG_EMBEDDED=y
  1608. +CONFIG_UID16=y
  1609. +CONFIG_SYSCTL_SYSCALL=y
  1610. +CONFIG_SYSCTL_SYSCALL_CHECK=y
  1611. +CONFIG_KALLSYMS=y
  1612. +# CONFIG_KALLSYMS_EXTRA_PASS is not set
  1613. +CONFIG_HOTPLUG=y
  1614. +CONFIG_PRINTK=y
  1615. +CONFIG_BUG=y
  1616. +CONFIG_ELF_CORE=y
  1617. +CONFIG_COMPAT_BRK=y
  1618. +CONFIG_BASE_FULL=y
  1619. +CONFIG_FUTEX=y
  1620. +CONFIG_ANON_INODES=y
  1621. +CONFIG_EPOLL=y
  1622. +CONFIG_SIGNALFD=y
  1623. +CONFIG_TIMERFD=y
  1624. +CONFIG_EVENTFD=y
  1625. +CONFIG_SHMEM=y
  1626. +CONFIG_VM_EVENT_COUNTERS=y
  1627. +CONFIG_SLAB=y
  1628. +# CONFIG_SLUB is not set
  1629. +# CONFIG_SLOB is not set
  1630. +# CONFIG_PROFILING is not set
  1631. +# CONFIG_MARKERS is not set
  1632. +CONFIG_HAVE_OPROFILE=y
  1633. +# CONFIG_KPROBES is not set
  1634. +CONFIG_HAVE_KPROBES=y
  1635. +CONFIG_HAVE_KRETPROBES=y
  1636. +# CONFIG_HAVE_DMA_ATTRS is not set
  1637. +CONFIG_PROC_PAGE_MONITOR=y
  1638. +CONFIG_SLABINFO=y
  1639. +CONFIG_RT_MUTEXES=y
  1640. +# CONFIG_TINY_SHMEM is not set
  1641. +CONFIG_BASE_SMALL=0
  1642. +CONFIG_MODULES=y
  1643. +# CONFIG_MODULE_FORCE_LOAD is not set
  1644. +CONFIG_MODULE_UNLOAD=y
  1645. +# CONFIG_MODULE_FORCE_UNLOAD is not set
  1646. +# CONFIG_MODVERSIONS is not set
  1647. +# CONFIG_MODULE_SRCVERSION_ALL is not set
  1648. +# CONFIG_KMOD is not set
  1649. +CONFIG_BLOCK=y
  1650. +# CONFIG_LBD is not set
  1651. +# CONFIG_BLK_DEV_IO_TRACE is not set
  1652. +# CONFIG_LSF is not set
  1653. +# CONFIG_BLK_DEV_BSG is not set
  1654. +
  1655. +#
  1656. +# IO Schedulers
  1657. +#
  1658. +CONFIG_IOSCHED_NOOP=y
  1659. +CONFIG_IOSCHED_AS=y
  1660. +CONFIG_IOSCHED_DEADLINE=y
  1661. +CONFIG_IOSCHED_CFQ=y
  1662. +# CONFIG_DEFAULT_AS is not set
  1663. +# CONFIG_DEFAULT_DEADLINE is not set
  1664. +CONFIG_DEFAULT_CFQ=y
  1665. +# CONFIG_DEFAULT_NOOP is not set
  1666. +CONFIG_DEFAULT_IOSCHED="cfq"
  1667. +CONFIG_CLASSIC_RCU=y
  1668. +
  1669. +#
  1670. +# System Type
  1671. +#
  1672. +# CONFIG_ARCH_AAEC2000 is not set
  1673. +# CONFIG_ARCH_INTEGRATOR is not set
  1674. +# CONFIG_ARCH_REALVIEW is not set
  1675. +# CONFIG_ARCH_VERSATILE is not set
  1676. +# CONFIG_ARCH_AT91 is not set
  1677. +# CONFIG_ARCH_CLPS7500 is not set
  1678. +# CONFIG_ARCH_CLPS711X is not set
  1679. +# CONFIG_ARCH_CO285 is not set
  1680. +# CONFIG_ARCH_EBSA110 is not set
  1681. +# CONFIG_ARCH_EP93XX is not set
  1682. +# CONFIG_ARCH_FOOTBRIDGE is not set
  1683. +# CONFIG_ARCH_NETX is not set
  1684. +# CONFIG_ARCH_H720X is not set
  1685. +# CONFIG_ARCH_IMX is not set
  1686. +# CONFIG_ARCH_IOP13XX is not set
  1687. +# CONFIG_ARCH_IOP32X is not set
  1688. +# CONFIG_ARCH_IOP33X is not set
  1689. +# CONFIG_ARCH_IXP23XX is not set
  1690. +# CONFIG_ARCH_IXP2000 is not set
  1691. +# CONFIG_ARCH_IXP4XX is not set
  1692. +# CONFIG_ARCH_L7200 is not set
  1693. +# CONFIG_ARCH_KIRKWOOD is not set
  1694. +# CONFIG_ARCH_KS8695 is not set
  1695. +# CONFIG_ARCH_NS9XXX is not set
  1696. +CONFIG_ARCH_LOKI=y
  1697. +# CONFIG_ARCH_MV78XX0 is not set
  1698. +# CONFIG_ARCH_MXC is not set
  1699. +# CONFIG_ARCH_ORION5X is not set
  1700. +# CONFIG_ARCH_PNX4008 is not set
  1701. +# CONFIG_ARCH_PXA is not set
  1702. +# CONFIG_ARCH_RPC is not set
  1703. +# CONFIG_ARCH_SA1100 is not set
  1704. +# CONFIG_ARCH_S3C2410 is not set
  1705. +# CONFIG_ARCH_SHARK is not set
  1706. +# CONFIG_ARCH_LH7A40X is not set
  1707. +# CONFIG_ARCH_DAVINCI is not set
  1708. +# CONFIG_ARCH_OMAP is not set
  1709. +# CONFIG_ARCH_MSM7X00A is not set
  1710. +
  1711. +#
  1712. +# Marvell Loki (88RC8480) Implementations
  1713. +#
  1714. +CONFIG_MACH_LB88RC8480=y
  1715. +
  1716. +#
  1717. +# Boot options
  1718. +#
  1719. +
  1720. +#
  1721. +# Power management
  1722. +#
  1723. +CONFIG_PLAT_ORION=y
  1724. +
  1725. +#
  1726. +# Processor Type
  1727. +#
  1728. +CONFIG_CPU_32=y
  1729. +CONFIG_CPU_FEROCEON=y
  1730. +# CONFIG_CPU_FEROCEON_OLD_ID is not set
  1731. +CONFIG_CPU_32v5=y
  1732. +CONFIG_CPU_ABRT_EV5T=y
  1733. +CONFIG_CPU_PABRT_NOIFAR=y
  1734. +CONFIG_CPU_CACHE_VIVT=y
  1735. +CONFIG_CPU_COPY_FEROCEON=y
  1736. +CONFIG_CPU_TLB_FEROCEON=y
  1737. +CONFIG_CPU_CP15=y
  1738. +CONFIG_CPU_CP15_MMU=y
  1739. +
  1740. +#
  1741. +# Processor Features
  1742. +#
  1743. +CONFIG_ARM_THUMB=y
  1744. +# CONFIG_CPU_ICACHE_DISABLE is not set
  1745. +# CONFIG_CPU_DCACHE_DISABLE is not set
  1746. +# CONFIG_OUTER_CACHE is not set
  1747. +
  1748. +#
  1749. +# Bus support
  1750. +#
  1751. +# CONFIG_PCI_SYSCALL is not set
  1752. +# CONFIG_ARCH_SUPPORTS_MSI is not set
  1753. +# CONFIG_PCCARD is not set
  1754. +
  1755. +#
  1756. +# Kernel Features
  1757. +#
  1758. +CONFIG_TICK_ONESHOT=y
  1759. +CONFIG_NO_HZ=y
  1760. +CONFIG_HIGH_RES_TIMERS=y
  1761. +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
  1762. +CONFIG_PREEMPT=y
  1763. +CONFIG_HZ=100
  1764. +CONFIG_AEABI=y
  1765. +CONFIG_OABI_COMPAT=y
  1766. +# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
  1767. +CONFIG_SELECT_MEMORY_MODEL=y
  1768. +CONFIG_FLATMEM_MANUAL=y
  1769. +# CONFIG_DISCONTIGMEM_MANUAL is not set
  1770. +# CONFIG_SPARSEMEM_MANUAL is not set
  1771. +CONFIG_FLATMEM=y
  1772. +CONFIG_FLAT_NODE_MEM_MAP=y
  1773. +# CONFIG_SPARSEMEM_STATIC is not set
  1774. +# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
  1775. +CONFIG_PAGEFLAGS_EXTENDED=y
  1776. +CONFIG_SPLIT_PTLOCK_CPUS=4096
  1777. +# CONFIG_RESOURCES_64BIT is not set
  1778. +CONFIG_ZONE_DMA_FLAG=1
  1779. +CONFIG_BOUNCE=y
  1780. +CONFIG_VIRT_TO_BUS=y
  1781. +CONFIG_ALIGNMENT_TRAP=y
  1782. +
  1783. +#
  1784. +# Boot options
  1785. +#
  1786. +CONFIG_ZBOOT_ROM_TEXT=0x0
  1787. +CONFIG_ZBOOT_ROM_BSS=0x0
  1788. +CONFIG_CMDLINE=""
  1789. +# CONFIG_XIP_KERNEL is not set
  1790. +# CONFIG_KEXEC is not set
  1791. +
  1792. +#
  1793. +# Floating point emulation
  1794. +#
  1795. +
  1796. +#
  1797. +# At least one emulation must be selected
  1798. +#
  1799. +# CONFIG_FPE_NWFPE is not set
  1800. +# CONFIG_FPE_FASTFPE is not set
  1801. +# CONFIG_VFP is not set
  1802. +
  1803. +#
  1804. +# Userspace binary formats
  1805. +#
  1806. +CONFIG_BINFMT_ELF=y
  1807. +# CONFIG_BINFMT_AOUT is not set
  1808. +# CONFIG_BINFMT_MISC is not set
  1809. +
  1810. +#
  1811. +# Power management options
  1812. +#
  1813. +# CONFIG_PM is not set
  1814. +CONFIG_ARCH_SUSPEND_POSSIBLE=y
  1815. +
  1816. +#
  1817. +# Networking
  1818. +#
  1819. +CONFIG_NET=y
  1820. +
  1821. +#
  1822. +# Networking options
  1823. +#
  1824. +CONFIG_PACKET=y
  1825. +CONFIG_PACKET_MMAP=y
  1826. +CONFIG_UNIX=y
  1827. +CONFIG_XFRM=y
  1828. +# CONFIG_XFRM_USER is not set
  1829. +# CONFIG_XFRM_SUB_POLICY is not set
  1830. +# CONFIG_XFRM_MIGRATE is not set
  1831. +# CONFIG_XFRM_STATISTICS is not set
  1832. +# CONFIG_NET_KEY is not set
  1833. +CONFIG_INET=y
  1834. +CONFIG_IP_MULTICAST=y
  1835. +# CONFIG_IP_ADVANCED_ROUTER is not set
  1836. +CONFIG_IP_FIB_HASH=y
  1837. +CONFIG_IP_PNP=y
  1838. +CONFIG_IP_PNP_DHCP=y
  1839. +CONFIG_IP_PNP_BOOTP=y
  1840. +# CONFIG_IP_PNP_RARP is not set
  1841. +# CONFIG_NET_IPIP is not set
  1842. +# CONFIG_NET_IPGRE is not set
  1843. +# CONFIG_IP_MROUTE is not set
  1844. +# CONFIG_ARPD is not set
  1845. +# CONFIG_SYN_COOKIES is not set
  1846. +# CONFIG_INET_AH is not set
  1847. +# CONFIG_INET_ESP is not set
  1848. +# CONFIG_INET_IPCOMP is not set
  1849. +# CONFIG_INET_XFRM_TUNNEL is not set
  1850. +# CONFIG_INET_TUNNEL is not set
  1851. +CONFIG_INET_XFRM_MODE_TRANSPORT=y
  1852. +CONFIG_INET_XFRM_MODE_TUNNEL=y
  1853. +CONFIG_INET_XFRM_MODE_BEET=y
  1854. +# CONFIG_INET_LRO is not set
  1855. +CONFIG_INET_DIAG=y
  1856. +CONFIG_INET_TCP_DIAG=y
  1857. +# CONFIG_TCP_CONG_ADVANCED is not set
  1858. +CONFIG_TCP_CONG_CUBIC=y
  1859. +CONFIG_DEFAULT_TCP_CONG="cubic"
  1860. +# CONFIG_TCP_MD5SIG is not set
  1861. +# CONFIG_IPV6 is not set
  1862. +# CONFIG_NETWORK_SECMARK is not set
  1863. +# CONFIG_NETFILTER is not set
  1864. +# CONFIG_IP_DCCP is not set
  1865. +# CONFIG_IP_SCTP is not set
  1866. +# CONFIG_TIPC is not set
  1867. +# CONFIG_ATM is not set
  1868. +# CONFIG_BRIDGE is not set
  1869. +# CONFIG_VLAN_8021Q is not set
  1870. +# CONFIG_DECNET is not set
  1871. +# CONFIG_LLC2 is not set
  1872. +# CONFIG_IPX is not set
  1873. +# CONFIG_ATALK is not set
  1874. +# CONFIG_X25 is not set
  1875. +# CONFIG_LAPB is not set
  1876. +# CONFIG_ECONET is not set
  1877. +# CONFIG_WAN_ROUTER is not set
  1878. +# CONFIG_NET_SCHED is not set
  1879. +
  1880. +#
  1881. +# Network testing
  1882. +#
  1883. +CONFIG_NET_PKTGEN=m
  1884. +# CONFIG_HAMRADIO is not set
  1885. +# CONFIG_CAN is not set
  1886. +# CONFIG_IRDA is not set
  1887. +# CONFIG_BT is not set
  1888. +# CONFIG_AF_RXRPC is not set
  1889. +
  1890. +#
  1891. +# Wireless
  1892. +#
  1893. +# CONFIG_CFG80211 is not set
  1894. +CONFIG_WIRELESS_EXT=y
  1895. +# CONFIG_MAC80211 is not set
  1896. +# CONFIG_IEEE80211 is not set
  1897. +# CONFIG_RFKILL is not set
  1898. +# CONFIG_NET_9P is not set
  1899. +
  1900. +#
  1901. +# Device Drivers
  1902. +#
  1903. +
  1904. +#
  1905. +# Generic Driver Options
  1906. +#
  1907. +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
  1908. +CONFIG_STANDALONE=y
  1909. +CONFIG_PREVENT_FIRMWARE_BUILD=y
  1910. +CONFIG_FW_LOADER=y
  1911. +# CONFIG_SYS_HYPERVISOR is not set
  1912. +# CONFIG_CONNECTOR is not set
  1913. +CONFIG_MTD=y
  1914. +# CONFIG_MTD_DEBUG is not set
  1915. +# CONFIG_MTD_CONCAT is not set
  1916. +CONFIG_MTD_PARTITIONS=y
  1917. +# CONFIG_MTD_REDBOOT_PARTS is not set
  1918. +CONFIG_MTD_CMDLINE_PARTS=y
  1919. +# CONFIG_MTD_AFS_PARTS is not set
  1920. +# CONFIG_MTD_AR7_PARTS is not set
  1921. +
  1922. +#
  1923. +# User Modules And Translation Layers
  1924. +#
  1925. +CONFIG_MTD_CHAR=y
  1926. +CONFIG_MTD_BLKDEVS=y
  1927. +CONFIG_MTD_BLOCK=y
  1928. +CONFIG_FTL=y
  1929. +CONFIG_NFTL=y
  1930. +# CONFIG_NFTL_RW is not set
  1931. +# CONFIG_INFTL is not set
  1932. +# CONFIG_RFD_FTL is not set
  1933. +# CONFIG_SSFDC is not set
  1934. +# CONFIG_MTD_OOPS is not set
  1935. +
  1936. +#
  1937. +# RAM/ROM/Flash chip drivers
  1938. +#
  1939. +CONFIG_MTD_CFI=y
  1940. +CONFIG_MTD_JEDECPROBE=y
  1941. +CONFIG_MTD_GEN_PROBE=y
  1942. +CONFIG_MTD_CFI_ADV_OPTIONS=y
  1943. +CONFIG_MTD_CFI_NOSWAP=y
  1944. +# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
  1945. +# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
  1946. +CONFIG_MTD_CFI_GEOMETRY=y
  1947. +CONFIG_MTD_MAP_BANK_WIDTH_1=y
  1948. +CONFIG_MTD_MAP_BANK_WIDTH_2=y
  1949. +CONFIG_MTD_MAP_BANK_WIDTH_4=y
  1950. +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
  1951. +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
  1952. +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
  1953. +CONFIG_MTD_CFI_I1=y
  1954. +CONFIG_MTD_CFI_I2=y
  1955. +CONFIG_MTD_CFI_I4=y
  1956. +# CONFIG_MTD_CFI_I8 is not set
  1957. +# CONFIG_MTD_OTP is not set
  1958. +CONFIG_MTD_CFI_INTELEXT=y
  1959. +CONFIG_MTD_CFI_AMDSTD=y
  1960. +CONFIG_MTD_CFI_STAA=y
  1961. +CONFIG_MTD_CFI_UTIL=y
  1962. +# CONFIG_MTD_RAM is not set
  1963. +# CONFIG_MTD_ROM is not set
  1964. +# CONFIG_MTD_ABSENT is not set
  1965. +
  1966. +#
  1967. +# Mapping drivers for chip access
  1968. +#
  1969. +# CONFIG_MTD_COMPLEX_MAPPINGS is not set
  1970. +CONFIG_MTD_PHYSMAP=y
  1971. +CONFIG_MTD_PHYSMAP_START=0x0
  1972. +CONFIG_MTD_PHYSMAP_LEN=0x0
  1973. +CONFIG_MTD_PHYSMAP_BANKWIDTH=0
  1974. +# CONFIG_MTD_ARM_INTEGRATOR is not set
  1975. +# CONFIG_MTD_IMPA7 is not set
  1976. +# CONFIG_MTD_PLATRAM is not set
  1977. +
  1978. +#
  1979. +# Self-contained MTD device drivers
  1980. +#
  1981. +# CONFIG_MTD_DATAFLASH is not set
  1982. +CONFIG_MTD_M25P80=y
  1983. +CONFIG_M25PXX_USE_FAST_READ=y
  1984. +# CONFIG_MTD_SLRAM is not set
  1985. +# CONFIG_MTD_PHRAM is not set
  1986. +# CONFIG_MTD_MTDRAM is not set
  1987. +# CONFIG_MTD_BLOCK2MTD is not set
  1988. +
  1989. +#
  1990. +# Disk-On-Chip Device Drivers
  1991. +#
  1992. +# CONFIG_MTD_DOC2000 is not set
  1993. +# CONFIG_MTD_DOC2001 is not set
  1994. +# CONFIG_MTD_DOC2001PLUS is not set
  1995. +CONFIG_MTD_NAND=y
  1996. +CONFIG_MTD_NAND_VERIFY_WRITE=y
  1997. +# CONFIG_MTD_NAND_ECC_SMC is not set
  1998. +# CONFIG_MTD_NAND_MUSEUM_IDS is not set
  1999. +CONFIG_MTD_NAND_IDS=y
  2000. +# CONFIG_MTD_NAND_DISKONCHIP is not set
  2001. +# CONFIG_MTD_NAND_NANDSIM is not set
  2002. +# CONFIG_MTD_NAND_PLATFORM is not set
  2003. +# CONFIG_MTD_ALAUDA is not set
  2004. +CONFIG_MTD_NAND_ORION=y
  2005. +# CONFIG_MTD_ONENAND is not set
  2006. +
  2007. +#
  2008. +# UBI - Unsorted block images
  2009. +#
  2010. +# CONFIG_MTD_UBI is not set
  2011. +# CONFIG_PARPORT is not set
  2012. +CONFIG_BLK_DEV=y
  2013. +# CONFIG_BLK_DEV_COW_COMMON is not set
  2014. +CONFIG_BLK_DEV_LOOP=y
  2015. +# CONFIG_BLK_DEV_CRYPTOLOOP is not set
  2016. +# CONFIG_BLK_DEV_NBD is not set
  2017. +# CONFIG_BLK_DEV_UB is not set
  2018. +# CONFIG_BLK_DEV_RAM is not set
  2019. +# CONFIG_CDROM_PKTCDVD is not set
  2020. +# CONFIG_ATA_OVER_ETH is not set
  2021. +# CONFIG_MISC_DEVICES is not set
  2022. +CONFIG_HAVE_IDE=y
  2023. +# CONFIG_IDE is not set
  2024. +
  2025. +#
  2026. +# SCSI device support
  2027. +#
  2028. +# CONFIG_RAID_ATTRS is not set
  2029. +CONFIG_SCSI=y
  2030. +CONFIG_SCSI_DMA=y
  2031. +# CONFIG_SCSI_TGT is not set
  2032. +# CONFIG_SCSI_NETLINK is not set
  2033. +# CONFIG_SCSI_PROC_FS is not set
  2034. +
  2035. +#
  2036. +# SCSI support type (disk, tape, CD-ROM)
  2037. +#
  2038. +CONFIG_BLK_DEV_SD=y
  2039. +# CONFIG_CHR_DEV_ST is not set
  2040. +# CONFIG_CHR_DEV_OSST is not set
  2041. +CONFIG_BLK_DEV_SR=m
  2042. +# CONFIG_BLK_DEV_SR_VENDOR is not set
  2043. +CONFIG_CHR_DEV_SG=m
  2044. +# CONFIG_CHR_DEV_SCH is not set
  2045. +
  2046. +#
  2047. +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
  2048. +#
  2049. +# CONFIG_SCSI_MULTI_LUN is not set
  2050. +# CONFIG_SCSI_CONSTANTS is not set
  2051. +# CONFIG_SCSI_LOGGING is not set
  2052. +# CONFIG_SCSI_SCAN_ASYNC is not set
  2053. +CONFIG_SCSI_WAIT_SCAN=m
  2054. +
  2055. +#
  2056. +# SCSI Transports
  2057. +#
  2058. +# CONFIG_SCSI_SPI_ATTRS is not set
  2059. +# CONFIG_SCSI_FC_ATTRS is not set
  2060. +# CONFIG_SCSI_ISCSI_ATTRS is not set
  2061. +# CONFIG_SCSI_SAS_LIBSAS is not set
  2062. +# CONFIG_SCSI_SRP_ATTRS is not set
  2063. +CONFIG_SCSI_LOWLEVEL=y
  2064. +# CONFIG_ISCSI_TCP is not set
  2065. +# CONFIG_SCSI_DEBUG is not set
  2066. +CONFIG_ATA=y
  2067. +# CONFIG_ATA_NONSTANDARD is not set
  2068. +CONFIG_SATA_PMP=y
  2069. +CONFIG_ATA_SFF=y
  2070. +CONFIG_SATA_MV=y
  2071. +# CONFIG_PATA_PLATFORM is not set
  2072. +# CONFIG_MD is not set
  2073. +CONFIG_NETDEVICES=y
  2074. +# CONFIG_NETDEVICES_MULTIQUEUE is not set
  2075. +# CONFIG_DUMMY is not set
  2076. +# CONFIG_BONDING is not set
  2077. +# CONFIG_MACVLAN is not set
  2078. +# CONFIG_EQUALIZER is not set
  2079. +# CONFIG_TUN is not set
  2080. +# CONFIG_VETH is not set
  2081. +# CONFIG_PHYLIB is not set
  2082. +CONFIG_NET_ETHERNET=y
  2083. +CONFIG_MII=y
  2084. +# CONFIG_AX88796 is not set
  2085. +# CONFIG_SMC91X is not set
  2086. +# CONFIG_DM9000 is not set
  2087. +# CONFIG_ENC28J60 is not set
  2088. +# CONFIG_IBM_NEW_EMAC_ZMII is not set
  2089. +# CONFIG_IBM_NEW_EMAC_RGMII is not set
  2090. +# CONFIG_IBM_NEW_EMAC_TAH is not set
  2091. +# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
  2092. +# CONFIG_B44 is not set
  2093. +CONFIG_NETDEV_1000=y
  2094. +# CONFIG_E1000E_ENABLED is not set
  2095. +CONFIG_MV643XX_ETH=y
  2096. +# CONFIG_NETDEV_10000 is not set
  2097. +
  2098. +#
  2099. +# Wireless LAN
  2100. +#
  2101. +# CONFIG_WLAN_PRE80211 is not set
  2102. +# CONFIG_WLAN_80211 is not set
  2103. +# CONFIG_IWLWIFI_LEDS is not set
  2104. +
  2105. +#
  2106. +# USB Network Adapters
  2107. +#
  2108. +# CONFIG_USB_CATC is not set
  2109. +# CONFIG_USB_KAWETH is not set
  2110. +# CONFIG_USB_PEGASUS is not set
  2111. +# CONFIG_USB_RTL8150 is not set
  2112. +# CONFIG_USB_USBNET is not set
  2113. +# CONFIG_WAN is not set
  2114. +# CONFIG_PPP is not set
  2115. +# CONFIG_SLIP is not set
  2116. +# CONFIG_NETCONSOLE is not set
  2117. +# CONFIG_NETPOLL is not set
  2118. +# CONFIG_NET_POLL_CONTROLLER is not set
  2119. +# CONFIG_ISDN is not set
  2120. +
  2121. +#
  2122. +# Input device support
  2123. +#
  2124. +CONFIG_INPUT=y
  2125. +# CONFIG_INPUT_FF_MEMLESS is not set
  2126. +# CONFIG_INPUT_POLLDEV is not set
  2127. +
  2128. +#
  2129. +# Userland interfaces
  2130. +#
  2131. +CONFIG_INPUT_MOUSEDEV=y
  2132. +CONFIG_INPUT_MOUSEDEV_PSAUX=y
  2133. +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
  2134. +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
  2135. +# CONFIG_INPUT_JOYDEV is not set
  2136. +# CONFIG_INPUT_EVDEV is not set
  2137. +# CONFIG_INPUT_EVBUG is not set
  2138. +
  2139. +#
  2140. +# Input Device Drivers
  2141. +#
  2142. +# CONFIG_INPUT_KEYBOARD is not set
  2143. +# CONFIG_INPUT_MOUSE is not set
  2144. +# CONFIG_INPUT_JOYSTICK is not set
  2145. +# CONFIG_INPUT_TABLET is not set
  2146. +# CONFIG_INPUT_TOUCHSCREEN is not set
  2147. +# CONFIG_INPUT_MISC is not set
  2148. +
  2149. +#
  2150. +# Hardware I/O ports
  2151. +#
  2152. +# CONFIG_SERIO is not set
  2153. +# CONFIG_GAMEPORT is not set
  2154. +
  2155. +#
  2156. +# Character devices
  2157. +#
  2158. +CONFIG_VT=y
  2159. +CONFIG_VT_CONSOLE=y
  2160. +CONFIG_HW_CONSOLE=y
  2161. +# CONFIG_VT_HW_CONSOLE_BINDING is not set
  2162. +CONFIG_DEVKMEM=y
  2163. +# CONFIG_SERIAL_NONSTANDARD is not set
  2164. +
  2165. +#
  2166. +# Serial drivers
  2167. +#
  2168. +CONFIG_SERIAL_8250=y
  2169. +CONFIG_SERIAL_8250_CONSOLE=y
  2170. +CONFIG_SERIAL_8250_NR_UARTS=4
  2171. +CONFIG_SERIAL_8250_RUNTIME_UARTS=2
  2172. +# CONFIG_SERIAL_8250_EXTENDED is not set
  2173. +
  2174. +#
  2175. +# Non-8250 serial port support
  2176. +#
  2177. +CONFIG_SERIAL_CORE=y
  2178. +CONFIG_SERIAL_CORE_CONSOLE=y
  2179. +CONFIG_UNIX98_PTYS=y
  2180. +CONFIG_LEGACY_PTYS=y
  2181. +CONFIG_LEGACY_PTY_COUNT=16
  2182. +# CONFIG_IPMI_HANDLER is not set
  2183. +CONFIG_HW_RANDOM=m
  2184. +# CONFIG_NVRAM is not set
  2185. +# CONFIG_R3964 is not set
  2186. +# CONFIG_RAW_DRIVER is not set
  2187. +# CONFIG_TCG_TPM is not set
  2188. +CONFIG_I2C=y
  2189. +CONFIG_I2C_BOARDINFO=y
  2190. +CONFIG_I2C_CHARDEV=y
  2191. +
  2192. +#
  2193. +# I2C Hardware Bus support
  2194. +#
  2195. +# CONFIG_I2C_OCORES is not set
  2196. +# CONFIG_I2C_PARPORT_LIGHT is not set
  2197. +# CONFIG_I2C_SIMTEC is not set
  2198. +# CONFIG_I2C_TAOS_EVM is not set
  2199. +# CONFIG_I2C_STUB is not set
  2200. +# CONFIG_I2C_TINY_USB is not set
  2201. +# CONFIG_I2C_PCA_PLATFORM is not set
  2202. +CONFIG_I2C_MV64XXX=y
  2203. +
  2204. +#
  2205. +# Miscellaneous I2C Chip support
  2206. +#
  2207. +# CONFIG_DS1682 is not set
  2208. +# CONFIG_SENSORS_EEPROM is not set
  2209. +# CONFIG_SENSORS_PCF8574 is not set
  2210. +# CONFIG_PCF8575 is not set
  2211. +# CONFIG_SENSORS_PCF8591 is not set
  2212. +# CONFIG_SENSORS_MAX6875 is not set
  2213. +# CONFIG_SENSORS_TSL2550 is not set
  2214. +# CONFIG_I2C_DEBUG_CORE is not set
  2215. +# CONFIG_I2C_DEBUG_ALGO is not set
  2216. +# CONFIG_I2C_DEBUG_BUS is not set
  2217. +# CONFIG_I2C_DEBUG_CHIP is not set
  2218. +CONFIG_SPI=y
  2219. +CONFIG_SPI_MASTER=y
  2220. +
  2221. +#
  2222. +# SPI Master Controller Drivers
  2223. +#
  2224. +# CONFIG_SPI_BITBANG is not set
  2225. +
  2226. +#
  2227. +# SPI Protocol Masters
  2228. +#
  2229. +# CONFIG_SPI_AT25 is not set
  2230. +# CONFIG_SPI_SPIDEV is not set
  2231. +# CONFIG_SPI_TLE62X0 is not set
  2232. +# CONFIG_W1 is not set
  2233. +# CONFIG_POWER_SUPPLY is not set
  2234. +# CONFIG_HWMON is not set
  2235. +# CONFIG_WATCHDOG is not set
  2236. +
  2237. +#
  2238. +# Sonics Silicon Backplane
  2239. +#
  2240. +CONFIG_SSB_POSSIBLE=y
  2241. +# CONFIG_SSB is not set
  2242. +
  2243. +#
  2244. +# Multifunction device drivers
  2245. +#
  2246. +# CONFIG_MFD_SM501 is not set
  2247. +# CONFIG_MFD_ASIC3 is not set
  2248. +# CONFIG_HTC_PASIC3 is not set
  2249. +
  2250. +#
  2251. +# Multimedia devices
  2252. +#
  2253. +
  2254. +#
  2255. +# Multimedia core support
  2256. +#
  2257. +# CONFIG_VIDEO_DEV is not set
  2258. +# CONFIG_DVB_CORE is not set
  2259. +# CONFIG_VIDEO_MEDIA is not set
  2260. +
  2261. +#
  2262. +# Multimedia drivers
  2263. +#
  2264. +# CONFIG_DAB is not set
  2265. +
  2266. +#
  2267. +# Graphics support
  2268. +#
  2269. +# CONFIG_VGASTATE is not set
  2270. +# CONFIG_VIDEO_OUTPUT_CONTROL is not set
  2271. +# CONFIG_FB is not set
  2272. +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
  2273. +
  2274. +#
  2275. +# Display device support
  2276. +#
  2277. +# CONFIG_DISPLAY_SUPPORT is not set
  2278. +
  2279. +#
  2280. +# Console display driver support
  2281. +#
  2282. +# CONFIG_VGA_CONSOLE is not set
  2283. +CONFIG_DUMMY_CONSOLE=y
  2284. +
  2285. +#
  2286. +# Sound
  2287. +#
  2288. +# CONFIG_SOUND is not set
  2289. +CONFIG_HID_SUPPORT=y
  2290. +CONFIG_HID=y
  2291. +# CONFIG_HID_DEBUG is not set
  2292. +# CONFIG_HIDRAW is not set
  2293. +
  2294. +#
  2295. +# USB Input Devices
  2296. +#
  2297. +CONFIG_USB_HID=y
  2298. +# CONFIG_USB_HIDINPUT_POWERBOOK is not set
  2299. +# CONFIG_HID_FF is not set
  2300. +# CONFIG_USB_HIDDEV is not set
  2301. +CONFIG_USB_SUPPORT=y
  2302. +CONFIG_USB_ARCH_HAS_HCD=y
  2303. +# CONFIG_USB_ARCH_HAS_OHCI is not set
  2304. +# CONFIG_USB_ARCH_HAS_EHCI is not set
  2305. +CONFIG_USB=y
  2306. +# CONFIG_USB_DEBUG is not set
  2307. +# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set
  2308. +
  2309. +#
  2310. +# Miscellaneous USB options
  2311. +#
  2312. +CONFIG_USB_DEVICEFS=y
  2313. +CONFIG_USB_DEVICE_CLASS=y
  2314. +# CONFIG_USB_DYNAMIC_MINORS is not set
  2315. +# CONFIG_USB_OTG is not set
  2316. +# CONFIG_USB_OTG_WHITELIST is not set
  2317. +# CONFIG_USB_OTG_BLACKLIST_HUB is not set
  2318. +
  2319. +#
  2320. +# USB Host Controller Drivers
  2321. +#
  2322. +# CONFIG_USB_C67X00_HCD is not set
  2323. +# CONFIG_USB_ISP116X_HCD is not set
  2324. +# CONFIG_USB_ISP1760_HCD is not set
  2325. +# CONFIG_USB_SL811_HCD is not set
  2326. +# CONFIG_USB_R8A66597_HCD is not set
  2327. +
  2328. +#
  2329. +# USB Device Class drivers
  2330. +#
  2331. +# CONFIG_USB_ACM is not set
  2332. +CONFIG_USB_PRINTER=y
  2333. +# CONFIG_USB_WDM is not set
  2334. +
  2335. +#
  2336. +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
  2337. +#
  2338. +
  2339. +#
  2340. +# may also be needed; see USB_STORAGE Help for more information
  2341. +#
  2342. +CONFIG_USB_STORAGE=y
  2343. +# CONFIG_USB_STORAGE_DEBUG is not set
  2344. +CONFIG_USB_STORAGE_DATAFAB=y
  2345. +CONFIG_USB_STORAGE_FREECOM=y
  2346. +# CONFIG_USB_STORAGE_ISD200 is not set
  2347. +CONFIG_USB_STORAGE_DPCM=y
  2348. +# CONFIG_USB_STORAGE_USBAT is not set
  2349. +CONFIG_USB_STORAGE_SDDR09=y
  2350. +CONFIG_USB_STORAGE_SDDR55=y
  2351. +CONFIG_USB_STORAGE_JUMPSHOT=y
  2352. +# CONFIG_USB_STORAGE_ALAUDA is not set
  2353. +# CONFIG_USB_STORAGE_ONETOUCH is not set
  2354. +# CONFIG_USB_STORAGE_KARMA is not set
  2355. +# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
  2356. +# CONFIG_USB_LIBUSUAL is not set
  2357. +
  2358. +#
  2359. +# USB Imaging devices
  2360. +#
  2361. +# CONFIG_USB_MDC800 is not set
  2362. +# CONFIG_USB_MICROTEK is not set
  2363. +# CONFIG_USB_MON is not set
  2364. +
  2365. +#
  2366. +# USB port drivers
  2367. +#
  2368. +# CONFIG_USB_SERIAL is not set
  2369. +
  2370. +#
  2371. +# USB Miscellaneous drivers
  2372. +#
  2373. +# CONFIG_USB_EMI62 is not set
  2374. +# CONFIG_USB_EMI26 is not set
  2375. +# CONFIG_USB_ADUTUX is not set
  2376. +# CONFIG_USB_AUERSWALD is not set
  2377. +# CONFIG_USB_RIO500 is not set
  2378. +# CONFIG_USB_LEGOTOWER is not set
  2379. +# CONFIG_USB_LCD is not set
  2380. +# CONFIG_USB_BERRY_CHARGE is not set
  2381. +# CONFIG_USB_LED is not set
  2382. +# CONFIG_USB_CYPRESS_CY7C63 is not set
  2383. +# CONFIG_USB_CYTHERM is not set
  2384. +# CONFIG_USB_PHIDGET is not set
  2385. +# CONFIG_USB_IDMOUSE is not set
  2386. +# CONFIG_USB_FTDI_ELAN is not set
  2387. +# CONFIG_USB_APPLEDISPLAY is not set
  2388. +# CONFIG_USB_LD is not set
  2389. +# CONFIG_USB_TRANCEVIBRATOR is not set
  2390. +# CONFIG_USB_IOWARRIOR is not set
  2391. +# CONFIG_USB_TEST is not set
  2392. +# CONFIG_USB_ISIGHTFW is not set
  2393. +# CONFIG_USB_GADGET is not set
  2394. +# CONFIG_MMC is not set
  2395. +CONFIG_NEW_LEDS=y
  2396. +# CONFIG_LEDS_CLASS is not set
  2397. +
  2398. +#
  2399. +# LED drivers
  2400. +#
  2401. +
  2402. +#
  2403. +# LED Triggers
  2404. +#
  2405. +# CONFIG_LEDS_TRIGGERS is not set
  2406. +CONFIG_RTC_LIB=y
  2407. +# CONFIG_RTC_CLASS is not set
  2408. +# CONFIG_UIO is not set
  2409. +
  2410. +#
  2411. +# File systems
  2412. +#
  2413. +CONFIG_EXT2_FS=y
  2414. +# CONFIG_EXT2_FS_XATTR is not set
  2415. +# CONFIG_EXT2_FS_XIP is not set
  2416. +CONFIG_EXT3_FS=y
  2417. +# CONFIG_EXT3_FS_XATTR is not set
  2418. +# CONFIG_EXT4DEV_FS is not set
  2419. +CONFIG_JBD=y
  2420. +# CONFIG_REISERFS_FS is not set
  2421. +# CONFIG_JFS_FS is not set
  2422. +# CONFIG_FS_POSIX_ACL is not set
  2423. +CONFIG_XFS_FS=y
  2424. +# CONFIG_XFS_QUOTA is not set
  2425. +# CONFIG_XFS_POSIX_ACL is not set
  2426. +# CONFIG_XFS_RT is not set
  2427. +# CONFIG_XFS_DEBUG is not set
  2428. +# CONFIG_OCFS2_FS is not set
  2429. +CONFIG_DNOTIFY=y
  2430. +CONFIG_INOTIFY=y
  2431. +CONFIG_INOTIFY_USER=y
  2432. +# CONFIG_QUOTA is not set
  2433. +# CONFIG_AUTOFS_FS is not set
  2434. +# CONFIG_AUTOFS4_FS is not set
  2435. +# CONFIG_FUSE_FS is not set
  2436. +
  2437. +#
  2438. +# CD-ROM/DVD Filesystems
  2439. +#
  2440. +CONFIG_ISO9660_FS=y
  2441. +# CONFIG_JOLIET is not set
  2442. +# CONFIG_ZISOFS is not set
  2443. +CONFIG_UDF_FS=m
  2444. +CONFIG_UDF_NLS=y
  2445. +
  2446. +#
  2447. +# DOS/FAT/NT Filesystems
  2448. +#
  2449. +CONFIG_FAT_FS=y
  2450. +CONFIG_MSDOS_FS=y
  2451. +CONFIG_VFAT_FS=y
  2452. +CONFIG_FAT_DEFAULT_CODEPAGE=437
  2453. +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
  2454. +# CONFIG_NTFS_FS is not set
  2455. +
  2456. +#
  2457. +# Pseudo filesystems
  2458. +#
  2459. +CONFIG_PROC_FS=y
  2460. +CONFIG_PROC_SYSCTL=y
  2461. +CONFIG_SYSFS=y
  2462. +CONFIG_TMPFS=y
  2463. +# CONFIG_TMPFS_POSIX_ACL is not set
  2464. +# CONFIG_HUGETLB_PAGE is not set
  2465. +# CONFIG_CONFIGFS_FS is not set
  2466. +
  2467. +#
  2468. +# Miscellaneous filesystems
  2469. +#
  2470. +# CONFIG_ADFS_FS is not set
  2471. +# CONFIG_AFFS_FS is not set
  2472. +# CONFIG_HFS_FS is not set
  2473. +# CONFIG_HFSPLUS_FS is not set
  2474. +# CONFIG_BEFS_FS is not set
  2475. +# CONFIG_BFS_FS is not set
  2476. +# CONFIG_EFS_FS is not set
  2477. +CONFIG_JFFS2_FS=y
  2478. +CONFIG_JFFS2_FS_DEBUG=0
  2479. +CONFIG_JFFS2_FS_WRITEBUFFER=y
  2480. +# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
  2481. +# CONFIG_JFFS2_SUMMARY is not set
  2482. +# CONFIG_JFFS2_FS_XATTR is not set
  2483. +# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
  2484. +CONFIG_JFFS2_ZLIB=y
  2485. +# CONFIG_JFFS2_LZO is not set
  2486. +CONFIG_JFFS2_RTIME=y
  2487. +# CONFIG_JFFS2_RUBIN is not set
  2488. +CONFIG_CRAMFS=y
  2489. +# CONFIG_VXFS_FS is not set
  2490. +# CONFIG_MINIX_FS is not set
  2491. +# CONFIG_HPFS_FS is not set
  2492. +# CONFIG_QNX4FS_FS is not set
  2493. +# CONFIG_ROMFS_FS is not set
  2494. +# CONFIG_SYSV_FS is not set
  2495. +# CONFIG_UFS_FS is not set
  2496. +CONFIG_NETWORK_FILESYSTEMS=y
  2497. +CONFIG_NFS_FS=y
  2498. +CONFIG_NFS_V3=y
  2499. +# CONFIG_NFS_V3_ACL is not set
  2500. +# CONFIG_NFS_V4 is not set
  2501. +# CONFIG_NFSD is not set
  2502. +CONFIG_ROOT_NFS=y
  2503. +CONFIG_LOCKD=y
  2504. +CONFIG_LOCKD_V4=y
  2505. +CONFIG_NFS_COMMON=y
  2506. +CONFIG_SUNRPC=y
  2507. +# CONFIG_SUNRPC_BIND34 is not set
  2508. +# CONFIG_RPCSEC_GSS_KRB5 is not set
  2509. +# CONFIG_RPCSEC_GSS_SPKM3 is not set
  2510. +# CONFIG_SMB_FS is not set
  2511. +# CONFIG_CIFS is not set
  2512. +# CONFIG_NCP_FS is not set
  2513. +# CONFIG_CODA_FS is not set
  2514. +# CONFIG_AFS_FS is not set
  2515. +
  2516. +#
  2517. +# Partition Types
  2518. +#
  2519. +CONFIG_PARTITION_ADVANCED=y
  2520. +# CONFIG_ACORN_PARTITION is not set
  2521. +# CONFIG_OSF_PARTITION is not set
  2522. +# CONFIG_AMIGA_PARTITION is not set
  2523. +# CONFIG_ATARI_PARTITION is not set
  2524. +# CONFIG_MAC_PARTITION is not set
  2525. +CONFIG_MSDOS_PARTITION=y
  2526. +CONFIG_BSD_DISKLABEL=y
  2527. +CONFIG_MINIX_SUBPARTITION=y
  2528. +CONFIG_SOLARIS_X86_PARTITION=y
  2529. +CONFIG_UNIXWARE_DISKLABEL=y
  2530. +CONFIG_LDM_PARTITION=y
  2531. +CONFIG_LDM_DEBUG=y
  2532. +# CONFIG_SGI_PARTITION is not set
  2533. +# CONFIG_ULTRIX_PARTITION is not set
  2534. +CONFIG_SUN_PARTITION=y
  2535. +# CONFIG_KARMA_PARTITION is not set
  2536. +# CONFIG_EFI_PARTITION is not set
  2537. +# CONFIG_SYSV68_PARTITION is not set
  2538. +CONFIG_NLS=y
  2539. +CONFIG_NLS_DEFAULT="iso8859-1"
  2540. +CONFIG_NLS_CODEPAGE_437=y
  2541. +# CONFIG_NLS_CODEPAGE_737 is not set
  2542. +# CONFIG_NLS_CODEPAGE_775 is not set
  2543. +CONFIG_NLS_CODEPAGE_850=y
  2544. +# CONFIG_NLS_CODEPAGE_852 is not set
  2545. +# CONFIG_NLS_CODEPAGE_855 is not set
  2546. +# CONFIG_NLS_CODEPAGE_857 is not set
  2547. +# CONFIG_NLS_CODEPAGE_860 is not set
  2548. +# CONFIG_NLS_CODEPAGE_861 is not set
  2549. +# CONFIG_NLS_CODEPAGE_862 is not set
  2550. +# CONFIG_NLS_CODEPAGE_863 is not set
  2551. +# CONFIG_NLS_CODEPAGE_864 is not set
  2552. +# CONFIG_NLS_CODEPAGE_865 is not set
  2553. +# CONFIG_NLS_CODEPAGE_866 is not set
  2554. +# CONFIG_NLS_CODEPAGE_869 is not set
  2555. +# CONFIG_NLS_CODEPAGE_936 is not set
  2556. +# CONFIG_NLS_CODEPAGE_950 is not set
  2557. +# CONFIG_NLS_CODEPAGE_932 is not set
  2558. +# CONFIG_NLS_CODEPAGE_949 is not set
  2559. +# CONFIG_NLS_CODEPAGE_874 is not set
  2560. +# CONFIG_NLS_ISO8859_8 is not set
  2561. +# CONFIG_NLS_CODEPAGE_1250 is not set
  2562. +# CONFIG_NLS_CODEPAGE_1251 is not set
  2563. +# CONFIG_NLS_ASCII is not set
  2564. +CONFIG_NLS_ISO8859_1=y
  2565. +CONFIG_NLS_ISO8859_2=y
  2566. +# CONFIG_NLS_ISO8859_3 is not set
  2567. +# CONFIG_NLS_ISO8859_4 is not set
  2568. +# CONFIG_NLS_ISO8859_5 is not set
  2569. +# CONFIG_NLS_ISO8859_6 is not set
  2570. +# CONFIG_NLS_ISO8859_7 is not set
  2571. +# CONFIG_NLS_ISO8859_9 is not set
  2572. +# CONFIG_NLS_ISO8859_13 is not set
  2573. +# CONFIG_NLS_ISO8859_14 is not set
  2574. +# CONFIG_NLS_ISO8859_15 is not set
  2575. +# CONFIG_NLS_KOI8_R is not set
  2576. +# CONFIG_NLS_KOI8_U is not set
  2577. +# CONFIG_NLS_UTF8 is not set
  2578. +# CONFIG_DLM is not set
  2579. +
  2580. +#
  2581. +# Kernel hacking
  2582. +#
  2583. +# CONFIG_PRINTK_TIME is not set
  2584. +CONFIG_ENABLE_WARN_DEPRECATED=y
  2585. +CONFIG_ENABLE_MUST_CHECK=y
  2586. +CONFIG_FRAME_WARN=1024
  2587. +CONFIG_MAGIC_SYSRQ=y
  2588. +# CONFIG_UNUSED_SYMBOLS is not set
  2589. +# CONFIG_DEBUG_FS is not set
  2590. +# CONFIG_HEADERS_CHECK is not set
  2591. +# CONFIG_DEBUG_KERNEL is not set
  2592. +# CONFIG_DEBUG_BUGVERBOSE is not set
  2593. +CONFIG_FRAME_POINTER=y
  2594. +# CONFIG_LATENCYTOP is not set
  2595. +# CONFIG_SAMPLES is not set
  2596. +CONFIG_DEBUG_USER=y
  2597. +
  2598. +#
  2599. +# Security options
  2600. +#
  2601. +# CONFIG_KEYS is not set
  2602. +# CONFIG_SECURITY is not set
  2603. +# CONFIG_SECURITY_FILE_CAPABILITIES is not set
  2604. +CONFIG_CRYPTO=y
  2605. +
  2606. +#
  2607. +# Crypto core or helper
  2608. +#
  2609. +CONFIG_CRYPTO_ALGAPI=m
  2610. +CONFIG_CRYPTO_BLKCIPHER=m
  2611. +CONFIG_CRYPTO_MANAGER=m
  2612. +# CONFIG_CRYPTO_GF128MUL is not set
  2613. +# CONFIG_CRYPTO_NULL is not set
  2614. +# CONFIG_CRYPTO_CRYPTD is not set
  2615. +# CONFIG_CRYPTO_AUTHENC is not set
  2616. +# CONFIG_CRYPTO_TEST is not set
  2617. +
  2618. +#
  2619. +# Authenticated Encryption with Associated Data
  2620. +#
  2621. +# CONFIG_CRYPTO_CCM is not set
  2622. +# CONFIG_CRYPTO_GCM is not set
  2623. +# CONFIG_CRYPTO_SEQIV is not set
  2624. +
  2625. +#
  2626. +# Block modes
  2627. +#
  2628. +CONFIG_CRYPTO_CBC=m
  2629. +# CONFIG_CRYPTO_CTR is not set
  2630. +# CONFIG_CRYPTO_CTS is not set
  2631. +CONFIG_CRYPTO_ECB=m
  2632. +# CONFIG_CRYPTO_LRW is not set
  2633. +CONFIG_CRYPTO_PCBC=m
  2634. +# CONFIG_CRYPTO_XTS is not set
  2635. +
  2636. +#
  2637. +# Hash modes
  2638. +#
  2639. +# CONFIG_CRYPTO_HMAC is not set
  2640. +# CONFIG_CRYPTO_XCBC is not set
  2641. +
  2642. +#
  2643. +# Digest
  2644. +#
  2645. +# CONFIG_CRYPTO_CRC32C is not set
  2646. +# CONFIG_CRYPTO_MD4 is not set
  2647. +# CONFIG_CRYPTO_MD5 is not set
  2648. +# CONFIG_CRYPTO_MICHAEL_MIC is not set
  2649. +# CONFIG_CRYPTO_SHA1 is not set
  2650. +# CONFIG_CRYPTO_SHA256 is not set
  2651. +# CONFIG_CRYPTO_SHA512 is not set
  2652. +# CONFIG_CRYPTO_TGR192 is not set
  2653. +# CONFIG_CRYPTO_WP512 is not set
  2654. +
  2655. +#
  2656. +# Ciphers
  2657. +#
  2658. +# CONFIG_CRYPTO_AES is not set
  2659. +# CONFIG_CRYPTO_ANUBIS is not set
  2660. +# CONFIG_CRYPTO_ARC4 is not set
  2661. +# CONFIG_CRYPTO_BLOWFISH is not set
  2662. +# CONFIG_CRYPTO_CAMELLIA is not set
  2663. +# CONFIG_CRYPTO_CAST5 is not set
  2664. +# CONFIG_CRYPTO_CAST6 is not set
  2665. +# CONFIG_CRYPTO_DES is not set
  2666. +# CONFIG_CRYPTO_FCRYPT is not set
  2667. +# CONFIG_CRYPTO_KHAZAD is not set
  2668. +# CONFIG_CRYPTO_SALSA20 is not set
  2669. +# CONFIG_CRYPTO_SEED is not set
  2670. +# CONFIG_CRYPTO_SERPENT is not set
  2671. +# CONFIG_CRYPTO_TEA is not set
  2672. +# CONFIG_CRYPTO_TWOFISH is not set
  2673. +
  2674. +#
  2675. +# Compression
  2676. +#
  2677. +# CONFIG_CRYPTO_DEFLATE is not set
  2678. +# CONFIG_CRYPTO_LZO is not set
  2679. +CONFIG_CRYPTO_HW=y
  2680. +
  2681. +#
  2682. +# Library routines
  2683. +#
  2684. +CONFIG_BITREVERSE=y
  2685. +# CONFIG_GENERIC_FIND_FIRST_BIT is not set
  2686. +# CONFIG_GENERIC_FIND_NEXT_BIT is not set
  2687. +CONFIG_CRC_CCITT=y
  2688. +CONFIG_CRC16=y
  2689. +CONFIG_CRC_ITU_T=m
  2690. +CONFIG_CRC32=y
  2691. +# CONFIG_CRC7 is not set
  2692. +CONFIG_LIBCRC32C=y
  2693. +CONFIG_ZLIB_INFLATE=y
  2694. +CONFIG_ZLIB_DEFLATE=y
  2695. +CONFIG_PLIST=y
  2696. +CONFIG_HAS_IOMEM=y
  2697. +CONFIG_HAS_IOPORT=y
  2698. +CONFIG_HAS_DMA=y
  2699. --- /dev/null
  2700. +++ b/arch/arm/configs/mv78xx0_defconfig
  2701. @@ -0,0 +1,1445 @@
  2702. +#
  2703. +# Automatically generated make config: don't edit
  2704. +# Linux kernel version: 2.6.26-rc5
  2705. +# Fri Jun 13 02:57:32 2008
  2706. +#
  2707. +CONFIG_ARM=y
  2708. +CONFIG_SYS_SUPPORTS_APM_EMULATION=y
  2709. +# CONFIG_GENERIC_GPIO is not set
  2710. +CONFIG_GENERIC_TIME=y
  2711. +CONFIG_GENERIC_CLOCKEVENTS=y
  2712. +CONFIG_MMU=y
  2713. +# CONFIG_NO_IOPORT is not set
  2714. +CONFIG_GENERIC_HARDIRQS=y
  2715. +CONFIG_STACKTRACE_SUPPORT=y
  2716. +CONFIG_HAVE_LATENCYTOP_SUPPORT=y
  2717. +CONFIG_LOCKDEP_SUPPORT=y
  2718. +CONFIG_TRACE_IRQFLAGS_SUPPORT=y
  2719. +CONFIG_HARDIRQS_SW_RESEND=y
  2720. +CONFIG_GENERIC_IRQ_PROBE=y
  2721. +CONFIG_RWSEM_GENERIC_SPINLOCK=y
  2722. +# CONFIG_ARCH_HAS_ILOG2_U32 is not set
  2723. +# CONFIG_ARCH_HAS_ILOG2_U64 is not set
  2724. +CONFIG_GENERIC_HWEIGHT=y
  2725. +CONFIG_GENERIC_CALIBRATE_DELAY=y
  2726. +CONFIG_ARCH_SUPPORTS_AOUT=y
  2727. +CONFIG_ZONE_DMA=y
  2728. +CONFIG_VECTORS_BASE=0xffff0000
  2729. +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
  2730. +
  2731. +#
  2732. +# General setup
  2733. +#
  2734. +CONFIG_EXPERIMENTAL=y
  2735. +CONFIG_BROKEN_ON_SMP=y
  2736. +CONFIG_LOCK_KERNEL=y
  2737. +CONFIG_INIT_ENV_ARG_LIMIT=32
  2738. +CONFIG_LOCALVERSION=""
  2739. +CONFIG_LOCALVERSION_AUTO=y
  2740. +CONFIG_SWAP=y
  2741. +CONFIG_SYSVIPC=y
  2742. +CONFIG_SYSVIPC_SYSCTL=y
  2743. +# CONFIG_POSIX_MQUEUE is not set
  2744. +# CONFIG_BSD_PROCESS_ACCT is not set
  2745. +# CONFIG_TASKSTATS is not set
  2746. +# CONFIG_AUDIT is not set
  2747. +# CONFIG_IKCONFIG is not set
  2748. +CONFIG_LOG_BUF_SHIFT=14
  2749. +# CONFIG_CGROUPS is not set
  2750. +# CONFIG_GROUP_SCHED is not set
  2751. +CONFIG_SYSFS_DEPRECATED=y
  2752. +CONFIG_SYSFS_DEPRECATED_V2=y
  2753. +# CONFIG_RELAY is not set
  2754. +# CONFIG_NAMESPACES is not set
  2755. +# CONFIG_BLK_DEV_INITRD is not set
  2756. +CONFIG_CC_OPTIMIZE_FOR_SIZE=y
  2757. +CONFIG_SYSCTL=y
  2758. +CONFIG_EMBEDDED=y
  2759. +CONFIG_UID16=y
  2760. +CONFIG_SYSCTL_SYSCALL=y
  2761. +CONFIG_SYSCTL_SYSCALL_CHECK=y
  2762. +CONFIG_KALLSYMS=y
  2763. +CONFIG_KALLSYMS_ALL=y
  2764. +# CONFIG_KALLSYMS_EXTRA_PASS is not set
  2765. +CONFIG_HOTPLUG=y
  2766. +CONFIG_PRINTK=y
  2767. +CONFIG_BUG=y
  2768. +CONFIG_ELF_CORE=y
  2769. +CONFIG_COMPAT_BRK=y
  2770. +CONFIG_BASE_FULL=y
  2771. +CONFIG_FUTEX=y
  2772. +CONFIG_ANON_INODES=y
  2773. +CONFIG_EPOLL=y
  2774. +CONFIG_SIGNALFD=y
  2775. +CONFIG_TIMERFD=y
  2776. +CONFIG_EVENTFD=y
  2777. +CONFIG_SHMEM=y
  2778. +CONFIG_VM_EVENT_COUNTERS=y
  2779. +# CONFIG_SLUB_DEBUG is not set
  2780. +# CONFIG_SLAB is not set
  2781. +CONFIG_SLUB=y
  2782. +# CONFIG_SLOB is not set
  2783. +CONFIG_PROFILING=y
  2784. +# CONFIG_MARKERS is not set
  2785. +CONFIG_OPROFILE=y
  2786. +CONFIG_HAVE_OPROFILE=y
  2787. +CONFIG_KPROBES=y
  2788. +CONFIG_KRETPROBES=y
  2789. +CONFIG_HAVE_KPROBES=y
  2790. +CONFIG_HAVE_KRETPROBES=y
  2791. +# CONFIG_HAVE_DMA_ATTRS is not set
  2792. +CONFIG_PROC_PAGE_MONITOR=y
  2793. +CONFIG_RT_MUTEXES=y
  2794. +# CONFIG_TINY_SHMEM is not set
  2795. +CONFIG_BASE_SMALL=0
  2796. +CONFIG_MODULES=y
  2797. +# CONFIG_MODULE_FORCE_LOAD is not set
  2798. +CONFIG_MODULE_UNLOAD=y
  2799. +# CONFIG_MODULE_FORCE_UNLOAD is not set
  2800. +# CONFIG_MODVERSIONS is not set
  2801. +# CONFIG_MODULE_SRCVERSION_ALL is not set
  2802. +# CONFIG_KMOD is not set
  2803. +CONFIG_BLOCK=y
  2804. +# CONFIG_LBD is not set
  2805. +# CONFIG_BLK_DEV_IO_TRACE is not set
  2806. +# CONFIG_LSF is not set
  2807. +# CONFIG_BLK_DEV_BSG is not set
  2808. +
  2809. +#
  2810. +# IO Schedulers
  2811. +#
  2812. +CONFIG_IOSCHED_NOOP=y
  2813. +CONFIG_IOSCHED_AS=y
  2814. +CONFIG_IOSCHED_DEADLINE=y
  2815. +CONFIG_IOSCHED_CFQ=y
  2816. +# CONFIG_DEFAULT_AS is not set
  2817. +# CONFIG_DEFAULT_DEADLINE is not set
  2818. +CONFIG_DEFAULT_CFQ=y
  2819. +# CONFIG_DEFAULT_NOOP is not set
  2820. +CONFIG_DEFAULT_IOSCHED="cfq"
  2821. +CONFIG_CLASSIC_RCU=y
  2822. +
  2823. +#
  2824. +# System Type
  2825. +#
  2826. +# CONFIG_ARCH_AAEC2000 is not set
  2827. +# CONFIG_ARCH_INTEGRATOR is not set
  2828. +# CONFIG_ARCH_REALVIEW is not set
  2829. +# CONFIG_ARCH_VERSATILE is not set
  2830. +# CONFIG_ARCH_AT91 is not set
  2831. +# CONFIG_ARCH_CLPS7500 is not set
  2832. +# CONFIG_ARCH_CLPS711X is not set
  2833. +# CONFIG_ARCH_CO285 is not set
  2834. +# CONFIG_ARCH_EBSA110 is not set
  2835. +# CONFIG_ARCH_EP93XX is not set
  2836. +# CONFIG_ARCH_FOOTBRIDGE is not set
  2837. +# CONFIG_ARCH_NETX is not set
  2838. +# CONFIG_ARCH_H720X is not set
  2839. +# CONFIG_ARCH_IMX is not set
  2840. +# CONFIG_ARCH_IOP13XX is not set
  2841. +# CONFIG_ARCH_IOP32X is not set
  2842. +# CONFIG_ARCH_IOP33X is not set
  2843. +# CONFIG_ARCH_IXP23XX is not set
  2844. +# CONFIG_ARCH_IXP2000 is not set
  2845. +# CONFIG_ARCH_IXP4XX is not set
  2846. +# CONFIG_ARCH_L7200 is not set
  2847. +# CONFIG_ARCH_KIRKWOOD is not set
  2848. +# CONFIG_ARCH_KS8695 is not set
  2849. +# CONFIG_ARCH_NS9XXX is not set
  2850. +# CONFIG_ARCH_LOKI is not set
  2851. +CONFIG_ARCH_MV78XX0=y
  2852. +# CONFIG_ARCH_MXC is not set
  2853. +# CONFIG_ARCH_ORION5X is not set
  2854. +# CONFIG_ARCH_PNX4008 is not set
  2855. +# CONFIG_ARCH_PXA is not set
  2856. +# CONFIG_ARCH_RPC is not set
  2857. +# CONFIG_ARCH_SA1100 is not set
  2858. +# CONFIG_ARCH_S3C2410 is not set
  2859. +# CONFIG_ARCH_SHARK is not set
  2860. +# CONFIG_ARCH_LH7A40X is not set
  2861. +# CONFIG_ARCH_DAVINCI is not set
  2862. +# CONFIG_ARCH_OMAP is not set
  2863. +# CONFIG_ARCH_MSM7X00A is not set
  2864. +
  2865. +#
  2866. +# Marvell MV78xx0 Implementations
  2867. +#
  2868. +CONFIG_MACH_DB78X00_BP=y
  2869. +
  2870. +#
  2871. +# Boot options
  2872. +#
  2873. +
  2874. +#
  2875. +# Power management
  2876. +#
  2877. +CONFIG_PLAT_ORION=y
  2878. +
  2879. +#
  2880. +# Processor Type
  2881. +#
  2882. +CONFIG_CPU_32=y
  2883. +CONFIG_CPU_FEROCEON=y
  2884. +CONFIG_CPU_FEROCEON_OLD_ID=y
  2885. +CONFIG_CPU_32v5=y
  2886. +CONFIG_CPU_ABRT_EV5T=y
  2887. +CONFIG_CPU_PABRT_NOIFAR=y
  2888. +CONFIG_CPU_CACHE_VIVT=y
  2889. +CONFIG_CPU_COPY_FEROCEON=y
  2890. +CONFIG_CPU_TLB_FEROCEON=y
  2891. +CONFIG_CPU_CP15=y
  2892. +CONFIG_CPU_CP15_MMU=y
  2893. +
  2894. +#
  2895. +# Processor Features
  2896. +#
  2897. +CONFIG_ARM_THUMB=y
  2898. +# CONFIG_CPU_ICACHE_DISABLE is not set
  2899. +# CONFIG_CPU_DCACHE_DISABLE is not set
  2900. +CONFIG_OUTER_CACHE=y
  2901. +CONFIG_CACHE_FEROCEON_L2=y
  2902. +
  2903. +#
  2904. +# Bus support
  2905. +#
  2906. +CONFIG_PCI=y
  2907. +CONFIG_PCI_SYSCALL=y
  2908. +# CONFIG_ARCH_SUPPORTS_MSI is not set
  2909. +CONFIG_PCI_LEGACY=y
  2910. +# CONFIG_PCI_DEBUG is not set
  2911. +# CONFIG_PCCARD is not set
  2912. +
  2913. +#
  2914. +# Kernel Features
  2915. +#
  2916. +CONFIG_TICK_ONESHOT=y
  2917. +CONFIG_NO_HZ=y
  2918. +CONFIG_HIGH_RES_TIMERS=y
  2919. +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
  2920. +CONFIG_PREEMPT=y
  2921. +CONFIG_HZ=100
  2922. +CONFIG_AEABI=y
  2923. +CONFIG_OABI_COMPAT=y
  2924. +# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
  2925. +CONFIG_SELECT_MEMORY_MODEL=y
  2926. +CONFIG_FLATMEM_MANUAL=y
  2927. +# CONFIG_DISCONTIGMEM_MANUAL is not set
  2928. +# CONFIG_SPARSEMEM_MANUAL is not set
  2929. +CONFIG_FLATMEM=y
  2930. +CONFIG_FLAT_NODE_MEM_MAP=y
  2931. +# CONFIG_SPARSEMEM_STATIC is not set
  2932. +# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
  2933. +CONFIG_PAGEFLAGS_EXTENDED=y
  2934. +CONFIG_SPLIT_PTLOCK_CPUS=4096
  2935. +# CONFIG_RESOURCES_64BIT is not set
  2936. +CONFIG_ZONE_DMA_FLAG=1
  2937. +CONFIG_BOUNCE=y
  2938. +CONFIG_VIRT_TO_BUS=y
  2939. +CONFIG_ALIGNMENT_TRAP=y
  2940. +
  2941. +#
  2942. +# Boot options
  2943. +#
  2944. +CONFIG_ZBOOT_ROM_TEXT=0x0
  2945. +CONFIG_ZBOOT_ROM_BSS=0x0
  2946. +CONFIG_CMDLINE=""
  2947. +# CONFIG_XIP_KERNEL is not set
  2948. +# CONFIG_KEXEC is not set
  2949. +
  2950. +#
  2951. +# Floating point emulation
  2952. +#
  2953. +
  2954. +#
  2955. +# At least one emulation must be selected
  2956. +#
  2957. +CONFIG_FPE_NWFPE=y
  2958. +# CONFIG_FPE_NWFPE_XP is not set
  2959. +# CONFIG_FPE_FASTFPE is not set
  2960. +CONFIG_VFP=y
  2961. +
  2962. +#
  2963. +# Userspace binary formats
  2964. +#
  2965. +CONFIG_BINFMT_ELF=y
  2966. +# CONFIG_BINFMT_AOUT is not set
  2967. +# CONFIG_BINFMT_MISC is not set
  2968. +
  2969. +#
  2970. +# Power management options
  2971. +#
  2972. +# CONFIG_PM is not set
  2973. +CONFIG_ARCH_SUSPEND_POSSIBLE=y
  2974. +
  2975. +#
  2976. +# Networking
  2977. +#
  2978. +CONFIG_NET=y
  2979. +
  2980. +#
  2981. +# Networking options
  2982. +#
  2983. +CONFIG_PACKET=y
  2984. +CONFIG_PACKET_MMAP=y
  2985. +CONFIG_UNIX=y
  2986. +CONFIG_XFRM=y
  2987. +# CONFIG_XFRM_USER is not set
  2988. +# CONFIG_XFRM_SUB_POLICY is not set
  2989. +# CONFIG_XFRM_MIGRATE is not set
  2990. +# CONFIG_XFRM_STATISTICS is not set
  2991. +# CONFIG_NET_KEY is not set
  2992. +CONFIG_INET=y
  2993. +CONFIG_IP_MULTICAST=y
  2994. +# CONFIG_IP_ADVANCED_ROUTER is not set
  2995. +CONFIG_IP_FIB_HASH=y
  2996. +CONFIG_IP_PNP=y
  2997. +CONFIG_IP_PNP_DHCP=y
  2998. +CONFIG_IP_PNP_BOOTP=y
  2999. +# CONFIG_IP_PNP_RARP is not set
  3000. +# CONFIG_NET_IPIP is not set
  3001. +# CONFIG_NET_IPGRE is not set
  3002. +# CONFIG_IP_MROUTE is not set
  3003. +# CONFIG_ARPD is not set
  3004. +# CONFIG_SYN_COOKIES is not set
  3005. +# CONFIG_INET_AH is not set
  3006. +# CONFIG_INET_ESP is not set
  3007. +# CONFIG_INET_IPCOMP is not set
  3008. +# CONFIG_INET_XFRM_TUNNEL is not set
  3009. +# CONFIG_INET_TUNNEL is not set
  3010. +CONFIG_INET_XFRM_MODE_TRANSPORT=y
  3011. +CONFIG_INET_XFRM_MODE_TUNNEL=y
  3012. +CONFIG_INET_XFRM_MODE_BEET=y
  3013. +# CONFIG_INET_LRO is not set
  3014. +CONFIG_INET_DIAG=y
  3015. +CONFIG_INET_TCP_DIAG=y
  3016. +# CONFIG_TCP_CONG_ADVANCED is not set
  3017. +CONFIG_TCP_CONG_CUBIC=y
  3018. +CONFIG_DEFAULT_TCP_CONG="cubic"
  3019. +# CONFIG_TCP_MD5SIG is not set
  3020. +# CONFIG_IPV6 is not set
  3021. +# CONFIG_NETWORK_SECMARK is not set
  3022. +# CONFIG_NETFILTER is not set
  3023. +# CONFIG_IP_DCCP is not set
  3024. +# CONFIG_IP_SCTP is not set
  3025. +# CONFIG_TIPC is not set
  3026. +# CONFIG_ATM is not set
  3027. +# CONFIG_BRIDGE is not set
  3028. +# CONFIG_VLAN_8021Q is not set
  3029. +# CONFIG_DECNET is not set
  3030. +# CONFIG_LLC2 is not set
  3031. +# CONFIG_IPX is not set
  3032. +# CONFIG_ATALK is not set
  3033. +# CONFIG_X25 is not set
  3034. +# CONFIG_LAPB is not set
  3035. +# CONFIG_ECONET is not set
  3036. +# CONFIG_WAN_ROUTER is not set
  3037. +# CONFIG_NET_SCHED is not set
  3038. +
  3039. +#
  3040. +# Network testing
  3041. +#
  3042. +CONFIG_NET_PKTGEN=m
  3043. +# CONFIG_NET_TCPPROBE is not set
  3044. +# CONFIG_HAMRADIO is not set
  3045. +# CONFIG_CAN is not set
  3046. +# CONFIG_IRDA is not set
  3047. +# CONFIG_BT is not set
  3048. +# CONFIG_AF_RXRPC is not set
  3049. +
  3050. +#
  3051. +# Wireless
  3052. +#
  3053. +# CONFIG_CFG80211 is not set
  3054. +CONFIG_WIRELESS_EXT=y
  3055. +# CONFIG_MAC80211 is not set
  3056. +# CONFIG_IEEE80211 is not set
  3057. +# CONFIG_RFKILL is not set
  3058. +# CONFIG_NET_9P is not set
  3059. +
  3060. +#
  3061. +# Device Drivers
  3062. +#
  3063. +
  3064. +#
  3065. +# Generic Driver Options
  3066. +#
  3067. +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
  3068. +CONFIG_STANDALONE=y
  3069. +CONFIG_PREVENT_FIRMWARE_BUILD=y
  3070. +CONFIG_FW_LOADER=y
  3071. +# CONFIG_DEBUG_DRIVER is not set
  3072. +# CONFIG_DEBUG_DEVRES is not set
  3073. +# CONFIG_SYS_HYPERVISOR is not set
  3074. +# CONFIG_CONNECTOR is not set
  3075. +CONFIG_MTD=y
  3076. +# CONFIG_MTD_DEBUG is not set
  3077. +# CONFIG_MTD_CONCAT is not set
  3078. +CONFIG_MTD_PARTITIONS=y
  3079. +# CONFIG_MTD_REDBOOT_PARTS is not set
  3080. +CONFIG_MTD_CMDLINE_PARTS=y
  3081. +# CONFIG_MTD_AFS_PARTS is not set
  3082. +# CONFIG_MTD_AR7_PARTS is not set
  3083. +
  3084. +#
  3085. +# User Modules And Translation Layers
  3086. +#
  3087. +CONFIG_MTD_CHAR=y
  3088. +CONFIG_MTD_BLKDEVS=y
  3089. +CONFIG_MTD_BLOCK=y
  3090. +# CONFIG_FTL is not set
  3091. +# CONFIG_NFTL is not set
  3092. +# CONFIG_INFTL is not set
  3093. +# CONFIG_RFD_FTL is not set
  3094. +# CONFIG_SSFDC is not set
  3095. +# CONFIG_MTD_OOPS is not set
  3096. +
  3097. +#
  3098. +# RAM/ROM/Flash chip drivers
  3099. +#
  3100. +CONFIG_MTD_CFI=y
  3101. +CONFIG_MTD_JEDECPROBE=y
  3102. +CONFIG_MTD_GEN_PROBE=y
  3103. +CONFIG_MTD_CFI_ADV_OPTIONS=y
  3104. +CONFIG_MTD_CFI_NOSWAP=y
  3105. +# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
  3106. +# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
  3107. +CONFIG_MTD_CFI_GEOMETRY=y
  3108. +CONFIG_MTD_MAP_BANK_WIDTH_1=y
  3109. +CONFIG_MTD_MAP_BANK_WIDTH_2=y
  3110. +CONFIG_MTD_MAP_BANK_WIDTH_4=y
  3111. +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
  3112. +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
  3113. +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
  3114. +CONFIG_MTD_CFI_I1=y
  3115. +CONFIG_MTD_CFI_I2=y
  3116. +# CONFIG_MTD_CFI_I4 is not set
  3117. +# CONFIG_MTD_CFI_I8 is not set
  3118. +# CONFIG_MTD_OTP is not set
  3119. +CONFIG_MTD_CFI_INTELEXT=y
  3120. +CONFIG_MTD_CFI_AMDSTD=y
  3121. +# CONFIG_MTD_CFI_STAA is not set
  3122. +CONFIG_MTD_CFI_UTIL=y
  3123. +# CONFIG_MTD_RAM is not set
  3124. +# CONFIG_MTD_ROM is not set
  3125. +# CONFIG_MTD_ABSENT is not set
  3126. +
  3127. +#
  3128. +# Mapping drivers for chip access
  3129. +#
  3130. +# CONFIG_MTD_COMPLEX_MAPPINGS is not set
  3131. +CONFIG_MTD_PHYSMAP=y
  3132. +CONFIG_MTD_PHYSMAP_START=0x0
  3133. +CONFIG_MTD_PHYSMAP_LEN=0x0
  3134. +CONFIG_MTD_PHYSMAP_BANKWIDTH=0
  3135. +# CONFIG_MTD_ARM_INTEGRATOR is not set
  3136. +# CONFIG_MTD_IMPA7 is not set
  3137. +# CONFIG_MTD_INTEL_VR_NOR is not set
  3138. +# CONFIG_MTD_PLATRAM is not set
  3139. +
  3140. +#
  3141. +# Self-contained MTD device drivers
  3142. +#
  3143. +# CONFIG_MTD_PMC551 is not set
  3144. +# CONFIG_MTD_SLRAM is not set
  3145. +# CONFIG_MTD_PHRAM is not set
  3146. +# CONFIG_MTD_MTDRAM is not set
  3147. +# CONFIG_MTD_BLOCK2MTD is not set
  3148. +
  3149. +#
  3150. +# Disk-On-Chip Device Drivers
  3151. +#
  3152. +# CONFIG_MTD_DOC2000 is not set
  3153. +# CONFIG_MTD_DOC2001 is not set
  3154. +# CONFIG_MTD_DOC2001PLUS is not set
  3155. +CONFIG_MTD_NAND=y
  3156. +CONFIG_MTD_NAND_VERIFY_WRITE=y
  3157. +# CONFIG_MTD_NAND_ECC_SMC is not set
  3158. +# CONFIG_MTD_NAND_MUSEUM_IDS is not set
  3159. +CONFIG_MTD_NAND_IDS=y
  3160. +# CONFIG_MTD_NAND_DISKONCHIP is not set
  3161. +# CONFIG_MTD_NAND_CAFE is not set
  3162. +# CONFIG_MTD_NAND_NANDSIM is not set
  3163. +# CONFIG_MTD_NAND_PLATFORM is not set
  3164. +# CONFIG_MTD_ALAUDA is not set
  3165. +CONFIG_MTD_NAND_ORION=y
  3166. +# CONFIG_MTD_ONENAND is not set
  3167. +
  3168. +#
  3169. +# UBI - Unsorted block images
  3170. +#
  3171. +# CONFIG_MTD_UBI is not set
  3172. +# CONFIG_PARPORT is not set
  3173. +CONFIG_BLK_DEV=y
  3174. +# CONFIG_BLK_CPQ_DA is not set
  3175. +# CONFIG_BLK_CPQ_CISS_DA is not set
  3176. +# CONFIG_BLK_DEV_DAC960 is not set
  3177. +# CONFIG_BLK_DEV_UMEM is not set
  3178. +# CONFIG_BLK_DEV_COW_COMMON is not set
  3179. +CONFIG_BLK_DEV_LOOP=y
  3180. +# CONFIG_BLK_DEV_CRYPTOLOOP is not set
  3181. +# CONFIG_BLK_DEV_NBD is not set
  3182. +# CONFIG_BLK_DEV_SX8 is not set
  3183. +# CONFIG_BLK_DEV_UB is not set
  3184. +# CONFIG_BLK_DEV_RAM is not set
  3185. +# CONFIG_CDROM_PKTCDVD is not set
  3186. +# CONFIG_ATA_OVER_ETH is not set
  3187. +CONFIG_MISC_DEVICES=y
  3188. +# CONFIG_PHANTOM is not set
  3189. +# CONFIG_EEPROM_93CX6 is not set
  3190. +# CONFIG_SGI_IOC4 is not set
  3191. +# CONFIG_TIFM_CORE is not set
  3192. +# CONFIG_ENCLOSURE_SERVICES is not set
  3193. +CONFIG_HAVE_IDE=y
  3194. +# CONFIG_IDE is not set
  3195. +
  3196. +#
  3197. +# SCSI device support
  3198. +#
  3199. +# CONFIG_RAID_ATTRS is not set
  3200. +CONFIG_SCSI=y
  3201. +CONFIG_SCSI_DMA=y
  3202. +# CONFIG_SCSI_TGT is not set
  3203. +# CONFIG_SCSI_NETLINK is not set
  3204. +# CONFIG_SCSI_PROC_FS is not set
  3205. +
  3206. +#
  3207. +# SCSI support type (disk, tape, CD-ROM)
  3208. +#
  3209. +CONFIG_BLK_DEV_SD=y
  3210. +# CONFIG_CHR_DEV_ST is not set
  3211. +# CONFIG_CHR_DEV_OSST is not set
  3212. +CONFIG_BLK_DEV_SR=m
  3213. +# CONFIG_BLK_DEV_SR_VENDOR is not set
  3214. +CONFIG_CHR_DEV_SG=m
  3215. +# CONFIG_CHR_DEV_SCH is not set
  3216. +
  3217. +#
  3218. +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
  3219. +#
  3220. +# CONFIG_SCSI_MULTI_LUN is not set
  3221. +# CONFIG_SCSI_CONSTANTS is not set
  3222. +# CONFIG_SCSI_LOGGING is not set
  3223. +# CONFIG_SCSI_SCAN_ASYNC is not set
  3224. +CONFIG_SCSI_WAIT_SCAN=m
  3225. +
  3226. +#
  3227. +# SCSI Transports
  3228. +#
  3229. +# CONFIG_SCSI_SPI_ATTRS is not set
  3230. +# CONFIG_SCSI_FC_ATTRS is not set
  3231. +# CONFIG_SCSI_ISCSI_ATTRS is not set
  3232. +# CONFIG_SCSI_SAS_LIBSAS is not set
  3233. +# CONFIG_SCSI_SRP_ATTRS is not set
  3234. +CONFIG_SCSI_LOWLEVEL=y
  3235. +# CONFIG_ISCSI_TCP is not set
  3236. +# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
  3237. +# CONFIG_SCSI_3W_9XXX is not set
  3238. +# CONFIG_SCSI_ACARD is not set
  3239. +# CONFIG_SCSI_AACRAID is not set
  3240. +# CONFIG_SCSI_AIC7XXX is not set
  3241. +# CONFIG_SCSI_AIC7XXX_OLD is not set
  3242. +# CONFIG_SCSI_AIC79XX is not set
  3243. +# CONFIG_SCSI_AIC94XX is not set
  3244. +# CONFIG_SCSI_DPT_I2O is not set
  3245. +# CONFIG_SCSI_ADVANSYS is not set
  3246. +# CONFIG_SCSI_ARCMSR is not set
  3247. +# CONFIG_MEGARAID_NEWGEN is not set
  3248. +# CONFIG_MEGARAID_LEGACY is not set
  3249. +# CONFIG_MEGARAID_SAS is not set
  3250. +# CONFIG_SCSI_HPTIOP is not set
  3251. +# CONFIG_SCSI_DMX3191D is not set
  3252. +# CONFIG_SCSI_FUTURE_DOMAIN is not set
  3253. +# CONFIG_SCSI_IPS is not set
  3254. +# CONFIG_SCSI_INITIO is not set
  3255. +# CONFIG_SCSI_INIA100 is not set
  3256. +# CONFIG_SCSI_MVSAS is not set
  3257. +# CONFIG_SCSI_STEX is not set
  3258. +# CONFIG_SCSI_SYM53C8XX_2 is not set
  3259. +# CONFIG_SCSI_IPR is not set
  3260. +# CONFIG_SCSI_QLOGIC_1280 is not set
  3261. +# CONFIG_SCSI_QLA_FC is not set
  3262. +# CONFIG_SCSI_QLA_ISCSI is not set
  3263. +# CONFIG_SCSI_LPFC is not set
  3264. +# CONFIG_SCSI_DC395x is not set
  3265. +# CONFIG_SCSI_DC390T is not set
  3266. +# CONFIG_SCSI_NSP32 is not set
  3267. +# CONFIG_SCSI_DEBUG is not set
  3268. +# CONFIG_SCSI_SRP is not set
  3269. +CONFIG_ATA=y
  3270. +# CONFIG_ATA_NONSTANDARD is not set
  3271. +CONFIG_SATA_PMP=y
  3272. +# CONFIG_SATA_AHCI is not set
  3273. +# CONFIG_SATA_SIL24 is not set
  3274. +CONFIG_ATA_SFF=y
  3275. +# CONFIG_SATA_SVW is not set
  3276. +# CONFIG_ATA_PIIX is not set
  3277. +CONFIG_SATA_MV=y
  3278. +# CONFIG_SATA_NV is not set
  3279. +# CONFIG_PDC_ADMA is not set
  3280. +# CONFIG_SATA_QSTOR is not set
  3281. +# CONFIG_SATA_PROMISE is not set
  3282. +# CONFIG_SATA_SX4 is not set
  3283. +# CONFIG_SATA_SIL is not set
  3284. +# CONFIG_SATA_SIS is not set
  3285. +# CONFIG_SATA_ULI is not set
  3286. +# CONFIG_SATA_VIA is not set
  3287. +# CONFIG_SATA_VITESSE is not set
  3288. +# CONFIG_SATA_INIC162X is not set
  3289. +# CONFIG_PATA_ALI is not set
  3290. +# CONFIG_PATA_AMD is not set
  3291. +# CONFIG_PATA_ARTOP is not set
  3292. +# CONFIG_PATA_ATIIXP is not set
  3293. +# CONFIG_PATA_CMD640_PCI is not set
  3294. +# CONFIG_PATA_CMD64X is not set
  3295. +# CONFIG_PATA_CS5520 is not set
  3296. +# CONFIG_PATA_CS5530 is not set
  3297. +# CONFIG_PATA_CYPRESS is not set
  3298. +# CONFIG_PATA_EFAR is not set
  3299. +# CONFIG_ATA_GENERIC is not set
  3300. +# CONFIG_PATA_HPT366 is not set
  3301. +# CONFIG_PATA_HPT37X is not set
  3302. +# CONFIG_PATA_HPT3X2N is not set
  3303. +# CONFIG_PATA_HPT3X3 is not set
  3304. +# CONFIG_PATA_IT821X is not set
  3305. +# CONFIG_PATA_IT8213 is not set
  3306. +# CONFIG_PATA_JMICRON is not set
  3307. +# CONFIG_PATA_TRIFLEX is not set
  3308. +# CONFIG_PATA_MARVELL is not set
  3309. +# CONFIG_PATA_MPIIX is not set
  3310. +# CONFIG_PATA_OLDPIIX is not set
  3311. +# CONFIG_PATA_NETCELL is not set
  3312. +# CONFIG_PATA_NINJA32 is not set
  3313. +# CONFIG_PATA_NS87410 is not set
  3314. +# CONFIG_PATA_NS87415 is not set
  3315. +# CONFIG_PATA_OPTI is not set
  3316. +# CONFIG_PATA_OPTIDMA is not set
  3317. +# CONFIG_PATA_PDC_OLD is not set
  3318. +# CONFIG_PATA_RADISYS is not set
  3319. +# CONFIG_PATA_RZ1000 is not set
  3320. +# CONFIG_PATA_SC1200 is not set
  3321. +# CONFIG_PATA_SERVERWORKS is not set
  3322. +# CONFIG_PATA_PDC2027X is not set
  3323. +# CONFIG_PATA_SIL680 is not set
  3324. +# CONFIG_PATA_SIS is not set
  3325. +# CONFIG_PATA_VIA is not set
  3326. +# CONFIG_PATA_WINBOND is not set
  3327. +# CONFIG_PATA_PLATFORM is not set
  3328. +# CONFIG_PATA_SCH is not set
  3329. +# CONFIG_MD is not set
  3330. +# CONFIG_FUSION is not set
  3331. +
  3332. +#
  3333. +# IEEE 1394 (FireWire) support
  3334. +#
  3335. +# CONFIG_FIREWIRE is not set
  3336. +# CONFIG_IEEE1394 is not set
  3337. +# CONFIG_I2O is not set
  3338. +CONFIG_NETDEVICES=y
  3339. +# CONFIG_NETDEVICES_MULTIQUEUE is not set
  3340. +# CONFIG_DUMMY is not set
  3341. +# CONFIG_BONDING is not set
  3342. +# CONFIG_MACVLAN is not set
  3343. +# CONFIG_EQUALIZER is not set
  3344. +# CONFIG_TUN is not set
  3345. +# CONFIG_VETH is not set
  3346. +# CONFIG_ARCNET is not set
  3347. +# CONFIG_PHYLIB is not set
  3348. +CONFIG_NET_ETHERNET=y
  3349. +CONFIG_MII=y
  3350. +# CONFIG_AX88796 is not set
  3351. +# CONFIG_HAPPYMEAL is not set
  3352. +# CONFIG_SUNGEM is not set
  3353. +# CONFIG_CASSINI is not set
  3354. +# CONFIG_NET_VENDOR_3COM is not set
  3355. +# CONFIG_SMC91X is not set
  3356. +# CONFIG_DM9000 is not set
  3357. +# CONFIG_NET_TULIP is not set
  3358. +# CONFIG_HP100 is not set
  3359. +# CONFIG_IBM_NEW_EMAC_ZMII is not set
  3360. +# CONFIG_IBM_NEW_EMAC_RGMII is not set
  3361. +# CONFIG_IBM_NEW_EMAC_TAH is not set
  3362. +# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
  3363. +CONFIG_NET_PCI=y
  3364. +# CONFIG_PCNET32 is not set
  3365. +# CONFIG_AMD8111_ETH is not set
  3366. +# CONFIG_ADAPTEC_STARFIRE is not set
  3367. +# CONFIG_B44 is not set
  3368. +# CONFIG_FORCEDETH is not set
  3369. +# CONFIG_EEPRO100 is not set
  3370. +# CONFIG_E100 is not set
  3371. +# CONFIG_FEALNX is not set
  3372. +# CONFIG_NATSEMI is not set
  3373. +# CONFIG_NE2K_PCI is not set
  3374. +# CONFIG_8139CP is not set
  3375. +# CONFIG_8139TOO is not set
  3376. +# CONFIG_R6040 is not set
  3377. +# CONFIG_SIS900 is not set
  3378. +# CONFIG_EPIC100 is not set
  3379. +# CONFIG_SUNDANCE is not set
  3380. +# CONFIG_TLAN is not set
  3381. +# CONFIG_VIA_RHINE is not set
  3382. +# CONFIG_SC92031 is not set
  3383. +CONFIG_NETDEV_1000=y
  3384. +# CONFIG_ACENIC is not set
  3385. +# CONFIG_DL2K is not set
  3386. +# CONFIG_E1000 is not set
  3387. +# CONFIG_E1000E is not set
  3388. +# CONFIG_E1000E_ENABLED is not set
  3389. +# CONFIG_IP1000 is not set
  3390. +# CONFIG_IGB is not set
  3391. +# CONFIG_NS83820 is not set
  3392. +# CONFIG_HAMACHI is not set
  3393. +# CONFIG_YELLOWFIN is not set
  3394. +# CONFIG_R8169 is not set
  3395. +# CONFIG_SIS190 is not set
  3396. +# CONFIG_SKGE is not set
  3397. +# CONFIG_SKY2 is not set
  3398. +# CONFIG_VIA_VELOCITY is not set
  3399. +# CONFIG_TIGON3 is not set
  3400. +# CONFIG_BNX2 is not set
  3401. +CONFIG_MV643XX_ETH=y
  3402. +# CONFIG_QLA3XXX is not set
  3403. +# CONFIG_ATL1 is not set
  3404. +# CONFIG_NETDEV_10000 is not set
  3405. +# CONFIG_TR is not set
  3406. +
  3407. +#
  3408. +# Wireless LAN
  3409. +#
  3410. +# CONFIG_WLAN_PRE80211 is not set
  3411. +# CONFIG_WLAN_80211 is not set
  3412. +# CONFIG_IWLWIFI_LEDS is not set
  3413. +
  3414. +#
  3415. +# USB Network Adapters
  3416. +#
  3417. +# CONFIG_USB_CATC is not set
  3418. +# CONFIG_USB_KAWETH is not set
  3419. +# CONFIG_USB_PEGASUS is not set
  3420. +# CONFIG_USB_RTL8150 is not set
  3421. +# CONFIG_USB_USBNET is not set
  3422. +# CONFIG_WAN is not set
  3423. +# CONFIG_FDDI is not set
  3424. +# CONFIG_HIPPI is not set
  3425. +# CONFIG_PPP is not set
  3426. +# CONFIG_SLIP is not set
  3427. +# CONFIG_NET_FC is not set
  3428. +# CONFIG_NETCONSOLE is not set
  3429. +# CONFIG_NETPOLL is not set
  3430. +# CONFIG_NET_POLL_CONTROLLER is not set
  3431. +# CONFIG_ISDN is not set
  3432. +
  3433. +#
  3434. +# Input device support
  3435. +#
  3436. +CONFIG_INPUT=y
  3437. +# CONFIG_INPUT_FF_MEMLESS is not set
  3438. +# CONFIG_INPUT_POLLDEV is not set
  3439. +
  3440. +#
  3441. +# Userland interfaces
  3442. +#
  3443. +# CONFIG_INPUT_MOUSEDEV is not set
  3444. +# CONFIG_INPUT_JOYDEV is not set
  3445. +CONFIG_INPUT_EVDEV=y
  3446. +# CONFIG_INPUT_EVBUG is not set
  3447. +
  3448. +#
  3449. +# Input Device Drivers
  3450. +#
  3451. +# CONFIG_INPUT_KEYBOARD is not set
  3452. +# CONFIG_INPUT_MOUSE is not set
  3453. +# CONFIG_INPUT_JOYSTICK is not set
  3454. +# CONFIG_INPUT_TABLET is not set
  3455. +# CONFIG_INPUT_TOUCHSCREEN is not set
  3456. +# CONFIG_INPUT_MISC is not set
  3457. +
  3458. +#
  3459. +# Hardware I/O ports
  3460. +#
  3461. +# CONFIG_SERIO is not set
  3462. +# CONFIG_GAMEPORT is not set
  3463. +
  3464. +#
  3465. +# Character devices
  3466. +#
  3467. +# CONFIG_VT is not set
  3468. +CONFIG_DEVKMEM=y
  3469. +# CONFIG_SERIAL_NONSTANDARD is not set
  3470. +# CONFIG_NOZOMI is not set
  3471. +
  3472. +#
  3473. +# Serial drivers
  3474. +#
  3475. +CONFIG_SERIAL_8250=y
  3476. +CONFIG_SERIAL_8250_CONSOLE=y
  3477. +# CONFIG_SERIAL_8250_PCI is not set
  3478. +CONFIG_SERIAL_8250_NR_UARTS=4
  3479. +CONFIG_SERIAL_8250_RUNTIME_UARTS=2
  3480. +# CONFIG_SERIAL_8250_EXTENDED is not set
  3481. +
  3482. +#
  3483. +# Non-8250 serial port support
  3484. +#
  3485. +CONFIG_SERIAL_CORE=y
  3486. +CONFIG_SERIAL_CORE_CONSOLE=y
  3487. +# CONFIG_SERIAL_JSM is not set
  3488. +CONFIG_UNIX98_PTYS=y
  3489. +CONFIG_LEGACY_PTYS=y
  3490. +CONFIG_LEGACY_PTY_COUNT=16
  3491. +# CONFIG_IPMI_HANDLER is not set
  3492. +# CONFIG_HW_RANDOM is not set
  3493. +# CONFIG_NVRAM is not set
  3494. +# CONFIG_R3964 is not set
  3495. +# CONFIG_APPLICOM is not set
  3496. +# CONFIG_RAW_DRIVER is not set
  3497. +# CONFIG_TCG_TPM is not set
  3498. +CONFIG_DEVPORT=y
  3499. +CONFIG_I2C=y
  3500. +CONFIG_I2C_BOARDINFO=y
  3501. +CONFIG_I2C_CHARDEV=y
  3502. +
  3503. +#
  3504. +# I2C Hardware Bus support
  3505. +#
  3506. +# CONFIG_I2C_ALI1535 is not set
  3507. +# CONFIG_I2C_ALI1563 is not set
  3508. +# CONFIG_I2C_ALI15X3 is not set
  3509. +# CONFIG_I2C_AMD756 is not set
  3510. +# CONFIG_I2C_AMD8111 is not set
  3511. +# CONFIG_I2C_I801 is not set
  3512. +# CONFIG_I2C_I810 is not set
  3513. +# CONFIG_I2C_PIIX4 is not set
  3514. +# CONFIG_I2C_NFORCE2 is not set
  3515. +# CONFIG_I2C_OCORES is not set
  3516. +# CONFIG_I2C_PARPORT_LIGHT is not set
  3517. +# CONFIG_I2C_PROSAVAGE is not set
  3518. +# CONFIG_I2C_SAVAGE4 is not set
  3519. +# CONFIG_I2C_SIMTEC is not set
  3520. +# CONFIG_I2C_SIS5595 is not set
  3521. +# CONFIG_I2C_SIS630 is not set
  3522. +# CONFIG_I2C_SIS96X is not set
  3523. +# CONFIG_I2C_TAOS_EVM is not set
  3524. +# CONFIG_I2C_STUB is not set
  3525. +# CONFIG_I2C_TINY_USB is not set
  3526. +# CONFIG_I2C_VIA is not set
  3527. +# CONFIG_I2C_VIAPRO is not set
  3528. +# CONFIG_I2C_VOODOO3 is not set
  3529. +# CONFIG_I2C_PCA_PLATFORM is not set
  3530. +CONFIG_I2C_MV64XXX=y
  3531. +
  3532. +#
  3533. +# Miscellaneous I2C Chip support
  3534. +#
  3535. +# CONFIG_DS1682 is not set
  3536. +# CONFIG_SENSORS_EEPROM is not set
  3537. +# CONFIG_SENSORS_PCF8574 is not set
  3538. +# CONFIG_PCF8575 is not set
  3539. +# CONFIG_SENSORS_PCF8591 is not set
  3540. +# CONFIG_SENSORS_MAX6875 is not set
  3541. +# CONFIG_SENSORS_TSL2550 is not set
  3542. +# CONFIG_I2C_DEBUG_CORE is not set
  3543. +# CONFIG_I2C_DEBUG_ALGO is not set
  3544. +# CONFIG_I2C_DEBUG_BUS is not set
  3545. +# CONFIG_I2C_DEBUG_CHIP is not set
  3546. +# CONFIG_SPI is not set
  3547. +# CONFIG_W1 is not set
  3548. +# CONFIG_POWER_SUPPLY is not set
  3549. +CONFIG_HWMON=y
  3550. +# CONFIG_HWMON_VID is not set
  3551. +# CONFIG_SENSORS_AD7418 is not set
  3552. +# CONFIG_SENSORS_ADM1021 is not set
  3553. +# CONFIG_SENSORS_ADM1025 is not set
  3554. +# CONFIG_SENSORS_ADM1026 is not set
  3555. +# CONFIG_SENSORS_ADM1029 is not set
  3556. +# CONFIG_SENSORS_ADM1031 is not set
  3557. +# CONFIG_SENSORS_ADM9240 is not set
  3558. +# CONFIG_SENSORS_ADT7470 is not set
  3559. +# CONFIG_SENSORS_ADT7473 is not set
  3560. +# CONFIG_SENSORS_ATXP1 is not set
  3561. +# CONFIG_SENSORS_DS1621 is not set
  3562. +# CONFIG_SENSORS_I5K_AMB is not set
  3563. +# CONFIG_SENSORS_F71805F is not set
  3564. +# CONFIG_SENSORS_F71882FG is not set
  3565. +# CONFIG_SENSORS_F75375S is not set
  3566. +# CONFIG_SENSORS_GL518SM is not set
  3567. +# CONFIG_SENSORS_GL520SM is not set
  3568. +# CONFIG_SENSORS_IT87 is not set
  3569. +# CONFIG_SENSORS_LM63 is not set
  3570. +# CONFIG_SENSORS_LM75 is not set
  3571. +# CONFIG_SENSORS_LM77 is not set
  3572. +# CONFIG_SENSORS_LM78 is not set
  3573. +# CONFIG_SENSORS_LM80 is not set
  3574. +# CONFIG_SENSORS_LM83 is not set
  3575. +# CONFIG_SENSORS_LM85 is not set
  3576. +# CONFIG_SENSORS_LM87 is not set
  3577. +# CONFIG_SENSORS_LM90 is not set
  3578. +# CONFIG_SENSORS_LM92 is not set
  3579. +# CONFIG_SENSORS_LM93 is not set
  3580. +# CONFIG_SENSORS_MAX1619 is not set
  3581. +# CONFIG_SENSORS_MAX6650 is not set
  3582. +# CONFIG_SENSORS_PC87360 is not set
  3583. +# CONFIG_SENSORS_PC87427 is not set
  3584. +# CONFIG_SENSORS_SIS5595 is not set
  3585. +# CONFIG_SENSORS_DME1737 is not set
  3586. +# CONFIG_SENSORS_SMSC47M1 is not set
  3587. +# CONFIG_SENSORS_SMSC47M192 is not set
  3588. +# CONFIG_SENSORS_SMSC47B397 is not set
  3589. +# CONFIG_SENSORS_ADS7828 is not set
  3590. +# CONFIG_SENSORS_THMC50 is not set
  3591. +# CONFIG_SENSORS_VIA686A is not set
  3592. +# CONFIG_SENSORS_VT1211 is not set
  3593. +# CONFIG_SENSORS_VT8231 is not set
  3594. +# CONFIG_SENSORS_W83781D is not set
  3595. +# CONFIG_SENSORS_W83791D is not set
  3596. +# CONFIG_SENSORS_W83792D is not set
  3597. +# CONFIG_SENSORS_W83793 is not set
  3598. +# CONFIG_SENSORS_W83L785TS is not set
  3599. +# CONFIG_SENSORS_W83L786NG is not set
  3600. +# CONFIG_SENSORS_W83627HF is not set
  3601. +# CONFIG_SENSORS_W83627EHF is not set
  3602. +# CONFIG_HWMON_DEBUG_CHIP is not set
  3603. +# CONFIG_WATCHDOG is not set
  3604. +
  3605. +#
  3606. +# Sonics Silicon Backplane
  3607. +#
  3608. +CONFIG_SSB_POSSIBLE=y
  3609. +# CONFIG_SSB is not set
  3610. +
  3611. +#
  3612. +# Multifunction device drivers
  3613. +#
  3614. +# CONFIG_MFD_SM501 is not set
  3615. +# CONFIG_MFD_ASIC3 is not set
  3616. +# CONFIG_HTC_PASIC3 is not set
  3617. +
  3618. +#
  3619. +# Multimedia devices
  3620. +#
  3621. +
  3622. +#
  3623. +# Multimedia core support
  3624. +#
  3625. +# CONFIG_VIDEO_DEV is not set
  3626. +# CONFIG_DVB_CORE is not set
  3627. +# CONFIG_VIDEO_MEDIA is not set
  3628. +
  3629. +#
  3630. +# Multimedia drivers
  3631. +#
  3632. +# CONFIG_DAB is not set
  3633. +
  3634. +#
  3635. +# Graphics support
  3636. +#
  3637. +# CONFIG_DRM is not set
  3638. +# CONFIG_VGASTATE is not set
  3639. +# CONFIG_VIDEO_OUTPUT_CONTROL is not set
  3640. +# CONFIG_FB is not set
  3641. +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
  3642. +
  3643. +#
  3644. +# Display device support
  3645. +#
  3646. +# CONFIG_DISPLAY_SUPPORT is not set
  3647. +
  3648. +#
  3649. +# Sound
  3650. +#
  3651. +# CONFIG_SOUND is not set
  3652. +CONFIG_HID_SUPPORT=y
  3653. +CONFIG_HID=y
  3654. +# CONFIG_HID_DEBUG is not set
  3655. +# CONFIG_HIDRAW is not set
  3656. +
  3657. +#
  3658. +# USB Input Devices
  3659. +#
  3660. +CONFIG_USB_HID=y
  3661. +# CONFIG_USB_HIDINPUT_POWERBOOK is not set
  3662. +# CONFIG_HID_FF is not set
  3663. +# CONFIG_USB_HIDDEV is not set
  3664. +CONFIG_USB_SUPPORT=y
  3665. +CONFIG_USB_ARCH_HAS_HCD=y
  3666. +CONFIG_USB_ARCH_HAS_OHCI=y
  3667. +CONFIG_USB_ARCH_HAS_EHCI=y
  3668. +CONFIG_USB=y
  3669. +# CONFIG_USB_DEBUG is not set
  3670. +# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set
  3671. +
  3672. +#
  3673. +# Miscellaneous USB options
  3674. +#
  3675. +CONFIG_USB_DEVICEFS=y
  3676. +CONFIG_USB_DEVICE_CLASS=y
  3677. +# CONFIG_USB_DYNAMIC_MINORS is not set
  3678. +# CONFIG_USB_OTG is not set
  3679. +# CONFIG_USB_OTG_WHITELIST is not set
  3680. +# CONFIG_USB_OTG_BLACKLIST_HUB is not set
  3681. +
  3682. +#
  3683. +# USB Host Controller Drivers
  3684. +#
  3685. +# CONFIG_USB_C67X00_HCD is not set
  3686. +CONFIG_USB_EHCI_HCD=y
  3687. +CONFIG_USB_EHCI_ROOT_HUB_TT=y
  3688. +CONFIG_USB_EHCI_TT_NEWSCHED=y
  3689. +# CONFIG_USB_ISP116X_HCD is not set
  3690. +# CONFIG_USB_ISP1760_HCD is not set
  3691. +# CONFIG_USB_OHCI_HCD is not set
  3692. +# CONFIG_USB_UHCI_HCD is not set
  3693. +# CONFIG_USB_SL811_HCD is not set
  3694. +# CONFIG_USB_R8A66597_HCD is not set
  3695. +
  3696. +#
  3697. +# USB Device Class drivers
  3698. +#
  3699. +# CONFIG_USB_ACM is not set
  3700. +CONFIG_USB_PRINTER=y
  3701. +# CONFIG_USB_WDM is not set
  3702. +
  3703. +#
  3704. +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
  3705. +#
  3706. +
  3707. +#
  3708. +# may also be needed; see USB_STORAGE Help for more information
  3709. +#
  3710. +CONFIG_USB_STORAGE=y
  3711. +# CONFIG_USB_STORAGE_DEBUG is not set
  3712. +CONFIG_USB_STORAGE_DATAFAB=y
  3713. +CONFIG_USB_STORAGE_FREECOM=y
  3714. +# CONFIG_USB_STORAGE_ISD200 is not set
  3715. +CONFIG_USB_STORAGE_DPCM=y
  3716. +# CONFIG_USB_STORAGE_USBAT is not set
  3717. +CONFIG_USB_STORAGE_SDDR09=y
  3718. +CONFIG_USB_STORAGE_SDDR55=y
  3719. +CONFIG_USB_STORAGE_JUMPSHOT=y
  3720. +# CONFIG_USB_STORAGE_ALAUDA is not set
  3721. +# CONFIG_USB_STORAGE_ONETOUCH is not set
  3722. +# CONFIG_USB_STORAGE_KARMA is not set
  3723. +# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
  3724. +# CONFIG_USB_LIBUSUAL is not set
  3725. +
  3726. +#
  3727. +# USB Imaging devices
  3728. +#
  3729. +# CONFIG_USB_MDC800 is not set
  3730. +# CONFIG_USB_MICROTEK is not set
  3731. +# CONFIG_USB_MON is not set
  3732. +
  3733. +#
  3734. +# USB port drivers
  3735. +#
  3736. +# CONFIG_USB_SERIAL is not set
  3737. +
  3738. +#
  3739. +# USB Miscellaneous drivers
  3740. +#
  3741. +# CONFIG_USB_EMI62 is not set
  3742. +# CONFIG_USB_EMI26 is not set
  3743. +# CONFIG_USB_ADUTUX is not set
  3744. +# CONFIG_USB_AUERSWALD is not set
  3745. +# CONFIG_USB_RIO500 is not set
  3746. +# CONFIG_USB_LEGOTOWER is not set
  3747. +# CONFIG_USB_LCD is not set
  3748. +# CONFIG_USB_BERRY_CHARGE is not set
  3749. +# CONFIG_USB_LED is not set
  3750. +# CONFIG_USB_CYPRESS_CY7C63 is not set
  3751. +# CONFIG_USB_CYTHERM is not set
  3752. +# CONFIG_USB_PHIDGET is not set
  3753. +# CONFIG_USB_IDMOUSE is not set
  3754. +# CONFIG_USB_FTDI_ELAN is not set
  3755. +# CONFIG_USB_APPLEDISPLAY is not set
  3756. +# CONFIG_USB_SISUSBVGA is not set
  3757. +# CONFIG_USB_LD is not set
  3758. +# CONFIG_USB_TRANCEVIBRATOR is not set
  3759. +# CONFIG_USB_IOWARRIOR is not set
  3760. +# CONFIG_USB_TEST is not set
  3761. +# CONFIG_USB_ISIGHTFW is not set
  3762. +# CONFIG_USB_GADGET is not set
  3763. +# CONFIG_MMC is not set
  3764. +CONFIG_NEW_LEDS=y
  3765. +CONFIG_LEDS_CLASS=y
  3766. +
  3767. +#
  3768. +# LED drivers
  3769. +#
  3770. +
  3771. +#
  3772. +# LED Triggers
  3773. +#
  3774. +CONFIG_LEDS_TRIGGERS=y
  3775. +CONFIG_LEDS_TRIGGER_TIMER=y
  3776. +CONFIG_LEDS_TRIGGER_HEARTBEAT=y
  3777. +# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set
  3778. +CONFIG_RTC_LIB=y
  3779. +CONFIG_RTC_CLASS=y
  3780. +CONFIG_RTC_HCTOSYS=y
  3781. +CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
  3782. +# CONFIG_RTC_DEBUG is not set
  3783. +
  3784. +#
  3785. +# RTC interfaces
  3786. +#
  3787. +CONFIG_RTC_INTF_SYSFS=y
  3788. +CONFIG_RTC_INTF_PROC=y
  3789. +CONFIG_RTC_INTF_DEV=y
  3790. +# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
  3791. +# CONFIG_RTC_DRV_TEST is not set
  3792. +
  3793. +#
  3794. +# I2C RTC drivers
  3795. +#
  3796. +CONFIG_RTC_DRV_DS1307=y
  3797. +# CONFIG_RTC_DRV_DS1374 is not set
  3798. +# CONFIG_RTC_DRV_DS1672 is not set
  3799. +# CONFIG_RTC_DRV_MAX6900 is not set
  3800. +CONFIG_RTC_DRV_RS5C372=y
  3801. +# CONFIG_RTC_DRV_ISL1208 is not set
  3802. +# CONFIG_RTC_DRV_X1205 is not set
  3803. +# CONFIG_RTC_DRV_PCF8563 is not set
  3804. +# CONFIG_RTC_DRV_PCF8583 is not set
  3805. +CONFIG_RTC_DRV_M41T80=y
  3806. +# CONFIG_RTC_DRV_M41T80_WDT is not set
  3807. +# CONFIG_RTC_DRV_S35390A is not set
  3808. +
  3809. +#
  3810. +# SPI RTC drivers
  3811. +#
  3812. +
  3813. +#
  3814. +# Platform RTC drivers
  3815. +#
  3816. +# CONFIG_RTC_DRV_CMOS is not set
  3817. +# CONFIG_RTC_DRV_DS1511 is not set
  3818. +# CONFIG_RTC_DRV_DS1553 is not set
  3819. +# CONFIG_RTC_DRV_DS1742 is not set
  3820. +# CONFIG_RTC_DRV_STK17TA8 is not set
  3821. +# CONFIG_RTC_DRV_M48T86 is not set
  3822. +# CONFIG_RTC_DRV_M48T59 is not set
  3823. +# CONFIG_RTC_DRV_V3020 is not set
  3824. +
  3825. +#
  3826. +# on-CPU RTC drivers
  3827. +#
  3828. +# CONFIG_UIO is not set
  3829. +
  3830. +#
  3831. +# File systems
  3832. +#
  3833. +CONFIG_EXT2_FS=y
  3834. +# CONFIG_EXT2_FS_XATTR is not set
  3835. +# CONFIG_EXT2_FS_XIP is not set
  3836. +CONFIG_EXT3_FS=y
  3837. +# CONFIG_EXT3_FS_XATTR is not set
  3838. +# CONFIG_EXT4DEV_FS is not set
  3839. +CONFIG_JBD=y
  3840. +# CONFIG_REISERFS_FS is not set
  3841. +# CONFIG_JFS_FS is not set
  3842. +# CONFIG_FS_POSIX_ACL is not set
  3843. +# CONFIG_XFS_FS is not set
  3844. +# CONFIG_OCFS2_FS is not set
  3845. +CONFIG_DNOTIFY=y
  3846. +CONFIG_INOTIFY=y
  3847. +CONFIG_INOTIFY_USER=y
  3848. +# CONFIG_QUOTA is not set
  3849. +# CONFIG_AUTOFS_FS is not set
  3850. +# CONFIG_AUTOFS4_FS is not set
  3851. +# CONFIG_FUSE_FS is not set
  3852. +
  3853. +#
  3854. +# CD-ROM/DVD Filesystems
  3855. +#
  3856. +CONFIG_ISO9660_FS=m
  3857. +CONFIG_JOLIET=y
  3858. +# CONFIG_ZISOFS is not set
  3859. +CONFIG_UDF_FS=m
  3860. +CONFIG_UDF_NLS=y
  3861. +
  3862. +#
  3863. +# DOS/FAT/NT Filesystems
  3864. +#
  3865. +CONFIG_FAT_FS=y
  3866. +CONFIG_MSDOS_FS=y
  3867. +CONFIG_VFAT_FS=y
  3868. +CONFIG_FAT_DEFAULT_CODEPAGE=437
  3869. +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
  3870. +# CONFIG_NTFS_FS is not set
  3871. +
  3872. +#
  3873. +# Pseudo filesystems
  3874. +#
  3875. +CONFIG_PROC_FS=y
  3876. +CONFIG_PROC_SYSCTL=y
  3877. +CONFIG_SYSFS=y
  3878. +CONFIG_TMPFS=y
  3879. +# CONFIG_TMPFS_POSIX_ACL is not set
  3880. +# CONFIG_HUGETLB_PAGE is not set
  3881. +# CONFIG_CONFIGFS_FS is not set
  3882. +
  3883. +#
  3884. +# Miscellaneous filesystems
  3885. +#
  3886. +# CONFIG_ADFS_FS is not set
  3887. +# CONFIG_AFFS_FS is not set
  3888. +# CONFIG_HFS_FS is not set
  3889. +# CONFIG_HFSPLUS_FS is not set
  3890. +# CONFIG_BEFS_FS is not set
  3891. +# CONFIG_BFS_FS is not set
  3892. +# CONFIG_EFS_FS is not set
  3893. +CONFIG_JFFS2_FS=y
  3894. +CONFIG_JFFS2_FS_DEBUG=0
  3895. +CONFIG_JFFS2_FS_WRITEBUFFER=y
  3896. +# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
  3897. +# CONFIG_JFFS2_SUMMARY is not set
  3898. +# CONFIG_JFFS2_FS_XATTR is not set
  3899. +# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
  3900. +CONFIG_JFFS2_ZLIB=y
  3901. +# CONFIG_JFFS2_LZO is not set
  3902. +CONFIG_JFFS2_RTIME=y
  3903. +# CONFIG_JFFS2_RUBIN is not set
  3904. +CONFIG_CRAMFS=y
  3905. +# CONFIG_VXFS_FS is not set
  3906. +# CONFIG_MINIX_FS is not set
  3907. +# CONFIG_HPFS_FS is not set
  3908. +# CONFIG_QNX4FS_FS is not set
  3909. +# CONFIG_ROMFS_FS is not set
  3910. +# CONFIG_SYSV_FS is not set
  3911. +# CONFIG_UFS_FS is not set
  3912. +CONFIG_NETWORK_FILESYSTEMS=y
  3913. +CONFIG_NFS_FS=y
  3914. +CONFIG_NFS_V3=y
  3915. +# CONFIG_NFS_V3_ACL is not set
  3916. +# CONFIG_NFS_V4 is not set
  3917. +# CONFIG_NFSD is not set
  3918. +CONFIG_ROOT_NFS=y
  3919. +CONFIG_LOCKD=y
  3920. +CONFIG_LOCKD_V4=y
  3921. +CONFIG_NFS_COMMON=y
  3922. +CONFIG_SUNRPC=y
  3923. +# CONFIG_SUNRPC_BIND34 is not set
  3924. +# CONFIG_RPCSEC_GSS_KRB5 is not set
  3925. +# CONFIG_RPCSEC_GSS_SPKM3 is not set
  3926. +# CONFIG_SMB_FS is not set
  3927. +# CONFIG_CIFS is not set
  3928. +# CONFIG_NCP_FS is not set
  3929. +# CONFIG_CODA_FS is not set
  3930. +# CONFIG_AFS_FS is not set
  3931. +
  3932. +#
  3933. +# Partition Types
  3934. +#
  3935. +CONFIG_PARTITION_ADVANCED=y
  3936. +# CONFIG_ACORN_PARTITION is not set
  3937. +# CONFIG_OSF_PARTITION is not set
  3938. +# CONFIG_AMIGA_PARTITION is not set
  3939. +# CONFIG_ATARI_PARTITION is not set
  3940. +# CONFIG_MAC_PARTITION is not set
  3941. +CONFIG_MSDOS_PARTITION=y
  3942. +CONFIG_BSD_DISKLABEL=y
  3943. +# CONFIG_MINIX_SUBPARTITION is not set
  3944. +# CONFIG_SOLARIS_X86_PARTITION is not set
  3945. +# CONFIG_UNIXWARE_DISKLABEL is not set
  3946. +# CONFIG_LDM_PARTITION is not set
  3947. +# CONFIG_SGI_PARTITION is not set
  3948. +# CONFIG_ULTRIX_PARTITION is not set
  3949. +# CONFIG_SUN_PARTITION is not set
  3950. +# CONFIG_KARMA_PARTITION is not set
  3951. +# CONFIG_EFI_PARTITION is not set
  3952. +# CONFIG_SYSV68_PARTITION is not set
  3953. +CONFIG_NLS=y
  3954. +CONFIG_NLS_DEFAULT="iso8859-1"
  3955. +CONFIG_NLS_CODEPAGE_437=y
  3956. +# CONFIG_NLS_CODEPAGE_737 is not set
  3957. +# CONFIG_NLS_CODEPAGE_775 is not set
  3958. +CONFIG_NLS_CODEPAGE_850=y
  3959. +# CONFIG_NLS_CODEPAGE_852 is not set
  3960. +# CONFIG_NLS_CODEPAGE_855 is not set
  3961. +# CONFIG_NLS_CODEPAGE_857 is not set
  3962. +# CONFIG_NLS_CODEPAGE_860 is not set
  3963. +# CONFIG_NLS_CODEPAGE_861 is not set
  3964. +# CONFIG_NLS_CODEPAGE_862 is not set
  3965. +# CONFIG_NLS_CODEPAGE_863 is not set
  3966. +# CONFIG_NLS_CODEPAGE_864 is not set
  3967. +# CONFIG_NLS_CODEPAGE_865 is not set
  3968. +# CONFIG_NLS_CODEPAGE_866 is not set
  3969. +# CONFIG_NLS_CODEPAGE_869 is not set
  3970. +# CONFIG_NLS_CODEPAGE_936 is not set
  3971. +# CONFIG_NLS_CODEPAGE_950 is not set
  3972. +# CONFIG_NLS_CODEPAGE_932 is not set
  3973. +# CONFIG_NLS_CODEPAGE_949 is not set
  3974. +# CONFIG_NLS_CODEPAGE_874 is not set
  3975. +# CONFIG_NLS_ISO8859_8 is not set
  3976. +# CONFIG_NLS_CODEPAGE_1250 is not set
  3977. +# CONFIG_NLS_CODEPAGE_1251 is not set
  3978. +# CONFIG_NLS_ASCII is not set
  3979. +CONFIG_NLS_ISO8859_1=y
  3980. +CONFIG_NLS_ISO8859_2=y
  3981. +# CONFIG_NLS_ISO8859_3 is not set
  3982. +# CONFIG_NLS_ISO8859_4 is not set
  3983. +# CONFIG_NLS_ISO8859_5 is not set
  3984. +# CONFIG_NLS_ISO8859_6 is not set
  3985. +# CONFIG_NLS_ISO8859_7 is not set
  3986. +# CONFIG_NLS_ISO8859_9 is not set
  3987. +# CONFIG_NLS_ISO8859_13 is not set
  3988. +# CONFIG_NLS_ISO8859_14 is not set
  3989. +# CONFIG_NLS_ISO8859_15 is not set
  3990. +# CONFIG_NLS_KOI8_R is not set
  3991. +# CONFIG_NLS_KOI8_U is not set
  3992. +# CONFIG_NLS_UTF8 is not set
  3993. +# CONFIG_DLM is not set
  3994. +
  3995. +#
  3996. +# Kernel hacking
  3997. +#
  3998. +# CONFIG_PRINTK_TIME is not set
  3999. +CONFIG_ENABLE_WARN_DEPRECATED=y
  4000. +CONFIG_ENABLE_MUST_CHECK=y
  4001. +CONFIG_FRAME_WARN=1024
  4002. +CONFIG_MAGIC_SYSRQ=y
  4003. +# CONFIG_UNUSED_SYMBOLS is not set
  4004. +# CONFIG_DEBUG_FS is not set
  4005. +# CONFIG_HEADERS_CHECK is not set
  4006. +CONFIG_DEBUG_KERNEL=y
  4007. +# CONFIG_DEBUG_SHIRQ is not set
  4008. +CONFIG_DETECT_SOFTLOCKUP=y
  4009. +CONFIG_SCHED_DEBUG=y
  4010. +CONFIG_SCHEDSTATS=y
  4011. +# CONFIG_TIMER_STATS is not set
  4012. +# CONFIG_DEBUG_OBJECTS is not set
  4013. +CONFIG_DEBUG_PREEMPT=y
  4014. +# CONFIG_DEBUG_RT_MUTEXES is not set
  4015. +# CONFIG_RT_MUTEX_TESTER is not set
  4016. +# CONFIG_DEBUG_SPINLOCK is not set
  4017. +# CONFIG_DEBUG_MUTEXES is not set
  4018. +# CONFIG_DEBUG_LOCK_ALLOC is not set
  4019. +# CONFIG_PROVE_LOCKING is not set
  4020. +# CONFIG_LOCK_STAT is not set
  4021. +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
  4022. +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
  4023. +# CONFIG_DEBUG_KOBJECT is not set
  4024. +# CONFIG_DEBUG_BUGVERBOSE is not set
  4025. +CONFIG_DEBUG_INFO=y
  4026. +# CONFIG_DEBUG_VM is not set
  4027. +# CONFIG_DEBUG_WRITECOUNT is not set
  4028. +# CONFIG_DEBUG_LIST is not set
  4029. +# CONFIG_DEBUG_SG is not set
  4030. +CONFIG_FRAME_POINTER=y
  4031. +# CONFIG_BOOT_PRINTK_DELAY is not set
  4032. +# CONFIG_RCU_TORTURE_TEST is not set
  4033. +# CONFIG_KPROBES_SANITY_TEST is not set
  4034. +# CONFIG_BACKTRACE_SELF_TEST is not set
  4035. +# CONFIG_LKDTM is not set
  4036. +# CONFIG_FAULT_INJECTION is not set
  4037. +# CONFIG_LATENCYTOP is not set
  4038. +# CONFIG_SAMPLES is not set
  4039. +CONFIG_DEBUG_USER=y
  4040. +CONFIG_DEBUG_ERRORS=y
  4041. +# CONFIG_DEBUG_STACK_USAGE is not set
  4042. +CONFIG_DEBUG_LL=y
  4043. +# CONFIG_DEBUG_ICEDCC is not set
  4044. +
  4045. +#
  4046. +# Security options
  4047. +#
  4048. +# CONFIG_KEYS is not set
  4049. +# CONFIG_SECURITY is not set
  4050. +# CONFIG_SECURITY_FILE_CAPABILITIES is not set
  4051. +CONFIG_CRYPTO=y
  4052. +
  4053. +#
  4054. +# Crypto core or helper
  4055. +#
  4056. +CONFIG_CRYPTO_ALGAPI=m
  4057. +CONFIG_CRYPTO_BLKCIPHER=m
  4058. +CONFIG_CRYPTO_MANAGER=m
  4059. +# CONFIG_CRYPTO_GF128MUL is not set
  4060. +# CONFIG_CRYPTO_NULL is not set
  4061. +# CONFIG_CRYPTO_CRYPTD is not set
  4062. +# CONFIG_CRYPTO_AUTHENC is not set
  4063. +# CONFIG_CRYPTO_TEST is not set
  4064. +
  4065. +#
  4066. +# Authenticated Encryption with Associated Data
  4067. +#
  4068. +# CONFIG_CRYPTO_CCM is not set
  4069. +# CONFIG_CRYPTO_GCM is not set
  4070. +# CONFIG_CRYPTO_SEQIV is not set
  4071. +
  4072. +#
  4073. +# Block modes
  4074. +#
  4075. +CONFIG_CRYPTO_CBC=m
  4076. +# CONFIG_CRYPTO_CTR is not set
  4077. +# CONFIG_CRYPTO_CTS is not set
  4078. +CONFIG_CRYPTO_ECB=m
  4079. +# CONFIG_CRYPTO_LRW is not set
  4080. +CONFIG_CRYPTO_PCBC=m
  4081. +# CONFIG_CRYPTO_XTS is not set
  4082. +
  4083. +#
  4084. +# Hash modes
  4085. +#
  4086. +# CONFIG_CRYPTO_HMAC is not set
  4087. +# CONFIG_CRYPTO_XCBC is not set
  4088. +
  4089. +#
  4090. +# Digest
  4091. +#
  4092. +# CONFIG_CRYPTO_CRC32C is not set
  4093. +# CONFIG_CRYPTO_MD4 is not set
  4094. +# CONFIG_CRYPTO_MD5 is not set
  4095. +# CONFIG_CRYPTO_MICHAEL_MIC is not set
  4096. +# CONFIG_CRYPTO_SHA1 is not set
  4097. +# CONFIG_CRYPTO_SHA256 is not set
  4098. +# CONFIG_CRYPTO_SHA512 is not set
  4099. +# CONFIG_CRYPTO_TGR192 is not set
  4100. +# CONFIG_CRYPTO_WP512 is not set
  4101. +
  4102. +#
  4103. +# Ciphers
  4104. +#
  4105. +# CONFIG_CRYPTO_AES is not set
  4106. +# CONFIG_CRYPTO_ANUBIS is not set
  4107. +# CONFIG_CRYPTO_ARC4 is not set
  4108. +# CONFIG_CRYPTO_BLOWFISH is not set
  4109. +# CONFIG_CRYPTO_CAMELLIA is not set
  4110. +# CONFIG_CRYPTO_CAST5 is not set
  4111. +# CONFIG_CRYPTO_CAST6 is not set
  4112. +# CONFIG_CRYPTO_DES is not set
  4113. +# CONFIG_CRYPTO_FCRYPT is not set
  4114. +# CONFIG_CRYPTO_KHAZAD is not set
  4115. +# CONFIG_CRYPTO_SALSA20 is not set
  4116. +# CONFIG_CRYPTO_SEED is not set
  4117. +# CONFIG_CRYPTO_SERPENT is not set
  4118. +# CONFIG_CRYPTO_TEA is not set
  4119. +# CONFIG_CRYPTO_TWOFISH is not set
  4120. +
  4121. +#
  4122. +# Compression
  4123. +#
  4124. +# CONFIG_CRYPTO_DEFLATE is not set
  4125. +# CONFIG_CRYPTO_LZO is not set
  4126. +CONFIG_CRYPTO_HW=y
  4127. +# CONFIG_CRYPTO_DEV_HIFN_795X is not set
  4128. +
  4129. +#
  4130. +# Library routines
  4131. +#
  4132. +CONFIG_BITREVERSE=y
  4133. +# CONFIG_GENERIC_FIND_FIRST_BIT is not set
  4134. +# CONFIG_GENERIC_FIND_NEXT_BIT is not set
  4135. +# CONFIG_CRC_CCITT is not set
  4136. +# CONFIG_CRC16 is not set
  4137. +CONFIG_CRC_ITU_T=m
  4138. +CONFIG_CRC32=y
  4139. +# CONFIG_CRC7 is not set
  4140. +# CONFIG_LIBCRC32C is not set
  4141. +CONFIG_ZLIB_INFLATE=y
  4142. +CONFIG_ZLIB_DEFLATE=y
  4143. +CONFIG_PLIST=y
  4144. +CONFIG_HAS_IOMEM=y
  4145. +CONFIG_HAS_IOPORT=y
  4146. +CONFIG_HAS_DMA=y
  4147. --- a/arch/arm/configs/orion5x_defconfig
  4148. +++ b/arch/arm/configs/orion5x_defconfig
  4149. @@ -1,7 +1,7 @@
  4150. #
  4151. # Automatically generated make config: don't edit
  4152. -# Linux kernel version: 2.6.24
  4153. -# Thu Feb 7 14:10:30 2008
  4154. +# Linux kernel version: 2.6.26-rc4
  4155. +# Mon Jun 2 23:54:48 2008
  4156. #
  4157. CONFIG_ARM=y
  4158. CONFIG_SYS_SUPPORTS_APM_EMULATION=y
  4159. @@ -21,6 +21,7 @@
  4160. # CONFIG_ARCH_HAS_ILOG2_U64 is not set
  4161. CONFIG_GENERIC_HWEIGHT=y
  4162. CONFIG_GENERIC_CALIBRATE_DELAY=y
  4163. +CONFIG_ARCH_SUPPORTS_AOUT=y
  4164. CONFIG_ZONE_DMA=y
  4165. CONFIG_VECTORS_BASE=0xffff0000
  4166. CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
  4167. @@ -40,24 +41,24 @@
  4168. # CONFIG_POSIX_MQUEUE is not set
  4169. # CONFIG_BSD_PROCESS_ACCT is not set
  4170. # CONFIG_TASKSTATS is not set
  4171. -# CONFIG_USER_NS is not set
  4172. -# CONFIG_PID_NS is not set
  4173. # CONFIG_AUDIT is not set
  4174. # CONFIG_IKCONFIG is not set
  4175. CONFIG_LOG_BUF_SHIFT=14
  4176. # CONFIG_CGROUPS is not set
  4177. -CONFIG_FAIR_GROUP_SCHED=y
  4178. -CONFIG_FAIR_USER_SCHED=y
  4179. -# CONFIG_FAIR_CGROUP_SCHED is not set
  4180. +# CONFIG_GROUP_SCHED is not set
  4181. CONFIG_SYSFS_DEPRECATED=y
  4182. +CONFIG_SYSFS_DEPRECATED_V2=y
  4183. # CONFIG_RELAY is not set
  4184. +# CONFIG_NAMESPACES is not set
  4185. # CONFIG_BLK_DEV_INITRD is not set
  4186. CONFIG_CC_OPTIMIZE_FOR_SIZE=y
  4187. CONFIG_SYSCTL=y
  4188. CONFIG_EMBEDDED=y
  4189. CONFIG_UID16=y
  4190. CONFIG_SYSCTL_SYSCALL=y
  4191. +CONFIG_SYSCTL_SYSCALL_CHECK=y
  4192. CONFIG_KALLSYMS=y
  4193. +CONFIG_KALLSYMS_ALL=y
  4194. # CONFIG_KALLSYMS_EXTRA_PASS is not set
  4195. CONFIG_HOTPLUG=y
  4196. CONFIG_PRINTK=y
  4197. @@ -73,20 +74,25 @@
  4198. CONFIG_EVENTFD=y
  4199. CONFIG_SHMEM=y
  4200. CONFIG_VM_EVENT_COUNTERS=y
  4201. -CONFIG_SLAB=y
  4202. -# CONFIG_SLUB is not set
  4203. +# CONFIG_SLUB_DEBUG is not set
  4204. +# CONFIG_SLAB is not set
  4205. +CONFIG_SLUB=y
  4206. # CONFIG_SLOB is not set
  4207. -# CONFIG_PROFILING is not set
  4208. +CONFIG_PROFILING=y
  4209. # CONFIG_MARKERS is not set
  4210. +CONFIG_OPROFILE=y
  4211. CONFIG_HAVE_OPROFILE=y
  4212. -# CONFIG_KPROBES is not set
  4213. +CONFIG_KPROBES=y
  4214. +CONFIG_KRETPROBES=y
  4215. CONFIG_HAVE_KPROBES=y
  4216. +CONFIG_HAVE_KRETPROBES=y
  4217. +# CONFIG_HAVE_DMA_ATTRS is not set
  4218. CONFIG_PROC_PAGE_MONITOR=y
  4219. -CONFIG_SLABINFO=y
  4220. CONFIG_RT_MUTEXES=y
  4221. # CONFIG_TINY_SHMEM is not set
  4222. CONFIG_BASE_SMALL=0
  4223. CONFIG_MODULES=y
  4224. +# CONFIG_MODULE_FORCE_LOAD is not set
  4225. CONFIG_MODULE_UNLOAD=y
  4226. # CONFIG_MODULE_FORCE_UNLOAD is not set
  4227. # CONFIG_MODVERSIONS is not set
  4228. @@ -111,7 +117,6 @@
  4229. # CONFIG_DEFAULT_NOOP is not set
  4230. CONFIG_DEFAULT_IOSCHED="cfq"
  4231. CONFIG_CLASSIC_RCU=y
  4232. -# CONFIG_PREEMPT_RCU is not set
  4233. #
  4234. # System Type
  4235. @@ -160,6 +165,7 @@
  4236. CONFIG_MACH_KUROBOX_PRO=y
  4237. CONFIG_MACH_DNS323=y
  4238. CONFIG_MACH_TS209=y
  4239. +CONFIG_MACH_LINKSTATION_PRO=y
  4240. #
  4241. # Boot options
  4242. @@ -168,6 +174,7 @@
  4243. #
  4244. # Power management
  4245. #
  4246. +CONFIG_PLAT_ORION=y
  4247. #
  4248. # Processor Type
  4249. @@ -177,8 +184,9 @@
  4250. CONFIG_CPU_FEROCEON_OLD_ID=y
  4251. CONFIG_CPU_32v5=y
  4252. CONFIG_CPU_ABRT_EV5T=y
  4253. +CONFIG_CPU_PABRT_NOIFAR=y
  4254. CONFIG_CPU_CACHE_VIVT=y
  4255. -CONFIG_CPU_COPY_V4WB=y
  4256. +CONFIG_CPU_COPY_FEROCEON=y
  4257. CONFIG_CPU_TLB_V4WBI=y
  4258. CONFIG_CPU_CP15=y
  4259. CONFIG_CPU_CP15_MMU=y
  4260. @@ -189,7 +197,6 @@
  4261. CONFIG_ARM_THUMB=y
  4262. # CONFIG_CPU_ICACHE_DISABLE is not set
  4263. # CONFIG_CPU_DCACHE_DISABLE is not set
  4264. -# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
  4265. # CONFIG_OUTER_CACHE is not set
  4266. #
  4267. @@ -199,6 +206,7 @@
  4268. CONFIG_PCI_SYSCALL=y
  4269. # CONFIG_ARCH_SUPPORTS_MSI is not set
  4270. CONFIG_PCI_LEGACY=y
  4271. +# CONFIG_PCI_DEBUG is not set
  4272. # CONFIG_PCCARD is not set
  4273. #
  4274. @@ -221,6 +229,7 @@
  4275. CONFIG_FLAT_NODE_MEM_MAP=y
  4276. # CONFIG_SPARSEMEM_STATIC is not set
  4277. # CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
  4278. +CONFIG_PAGEFLAGS_EXTENDED=y
  4279. CONFIG_SPLIT_PTLOCK_CPUS=4096
  4280. # CONFIG_RESOURCES_64BIT is not set
  4281. CONFIG_ZONE_DMA_FLAG=1
  4282. @@ -238,7 +247,6 @@
  4283. CONFIG_CMDLINE=""
  4284. # CONFIG_XIP_KERNEL is not set
  4285. # CONFIG_KEXEC is not set
  4286. -# CONFIG_ATAGS_PROC is not set
  4287. #
  4288. # Floating point emulation
  4289. @@ -311,8 +319,6 @@
  4290. CONFIG_DEFAULT_TCP_CONG="cubic"
  4291. # CONFIG_TCP_MD5SIG is not set
  4292. # CONFIG_IPV6 is not set
  4293. -# CONFIG_INET6_XFRM_TUNNEL is not set
  4294. -# CONFIG_INET6_TUNNEL is not set
  4295. # CONFIG_NETWORK_SECMARK is not set
  4296. # CONFIG_NETFILTER is not set
  4297. # CONFIG_IP_DCCP is not set
  4298. @@ -335,6 +341,7 @@
  4299. # Network testing
  4300. #
  4301. CONFIG_NET_PKTGEN=m
  4302. +# CONFIG_NET_TCPPROBE is not set
  4303. # CONFIG_HAMRADIO is not set
  4304. # CONFIG_CAN is not set
  4305. # CONFIG_IRDA is not set
  4306. @@ -362,6 +369,8 @@
  4307. CONFIG_STANDALONE=y
  4308. CONFIG_PREVENT_FIRMWARE_BUILD=y
  4309. CONFIG_FW_LOADER=y
  4310. +# CONFIG_DEBUG_DRIVER is not set
  4311. +# CONFIG_DEBUG_DEVRES is not set
  4312. # CONFIG_SYS_HYPERVISOR is not set
  4313. # CONFIG_CONNECTOR is not set
  4314. CONFIG_MTD=y
  4315. @@ -371,6 +380,7 @@
  4316. # CONFIG_MTD_REDBOOT_PARTS is not set
  4317. CONFIG_MTD_CMDLINE_PARTS=y
  4318. # CONFIG_MTD_AFS_PARTS is not set
  4319. +# CONFIG_MTD_AR7_PARTS is not set
  4320. #
  4321. # User Modules And Translation Layers
  4322. @@ -378,9 +388,8 @@
  4323. CONFIG_MTD_CHAR=y
  4324. CONFIG_MTD_BLKDEVS=y
  4325. CONFIG_MTD_BLOCK=y
  4326. -CONFIG_FTL=y
  4327. -CONFIG_NFTL=y
  4328. -# CONFIG_NFTL_RW is not set
  4329. +# CONFIG_FTL is not set
  4330. +# CONFIG_NFTL is not set
  4331. # CONFIG_INFTL is not set
  4332. # CONFIG_RFD_FTL is not set
  4333. # CONFIG_SSFDC is not set
  4334. @@ -405,12 +414,12 @@
  4335. # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
  4336. CONFIG_MTD_CFI_I1=y
  4337. CONFIG_MTD_CFI_I2=y
  4338. -CONFIG_MTD_CFI_I4=y
  4339. +# CONFIG_MTD_CFI_I4 is not set
  4340. # CONFIG_MTD_CFI_I8 is not set
  4341. # CONFIG_MTD_OTP is not set
  4342. CONFIG_MTD_CFI_INTELEXT=y
  4343. CONFIG_MTD_CFI_AMDSTD=y
  4344. -CONFIG_MTD_CFI_STAA=y
  4345. +# CONFIG_MTD_CFI_STAA is not set
  4346. CONFIG_MTD_CFI_UTIL=y
  4347. # CONFIG_MTD_RAM is not set
  4348. # CONFIG_MTD_ROM is not set
  4349. @@ -481,6 +490,9 @@
  4350. # CONFIG_EEPROM_93CX6 is not set
  4351. # CONFIG_SGI_IOC4 is not set
  4352. # CONFIG_TIFM_CORE is not set
  4353. +# CONFIG_ENCLOSURE_SERVICES is not set
  4354. +CONFIG_HAVE_IDE=y
  4355. +# CONFIG_IDE is not set
  4356. #
  4357. # SCSI device support
  4358. @@ -542,6 +554,7 @@
  4359. # CONFIG_SCSI_IPS is not set
  4360. # CONFIG_SCSI_INITIO is not set
  4361. # CONFIG_SCSI_INIA100 is not set
  4362. +# CONFIG_SCSI_MVSAS is not set
  4363. # CONFIG_SCSI_STEX is not set
  4364. # CONFIG_SCSI_SYM53C8XX_2 is not set
  4365. # CONFIG_SCSI_IPR is not set
  4366. @@ -556,7 +569,10 @@
  4367. # CONFIG_SCSI_SRP is not set
  4368. CONFIG_ATA=y
  4369. # CONFIG_ATA_NONSTANDARD is not set
  4370. +CONFIG_SATA_PMP=y
  4371. # CONFIG_SATA_AHCI is not set
  4372. +# CONFIG_SATA_SIL24 is not set
  4373. +CONFIG_ATA_SFF=y
  4374. # CONFIG_SATA_SVW is not set
  4375. # CONFIG_ATA_PIIX is not set
  4376. CONFIG_SATA_MV=y
  4377. @@ -566,7 +582,6 @@
  4378. # CONFIG_SATA_PROMISE is not set
  4379. # CONFIG_SATA_SX4 is not set
  4380. # CONFIG_SATA_SIL is not set
  4381. -# CONFIG_SATA_SIL24 is not set
  4382. # CONFIG_SATA_SIS is not set
  4383. # CONFIG_SATA_ULI is not set
  4384. # CONFIG_SATA_VIA is not set
  4385. @@ -611,6 +626,7 @@
  4386. # CONFIG_PATA_VIA is not set
  4387. # CONFIG_PATA_WINBOND is not set
  4388. # CONFIG_PATA_PLATFORM is not set
  4389. +# CONFIG_PATA_SCH is not set
  4390. # CONFIG_MD is not set
  4391. # CONFIG_FUSION is not set
  4392. @@ -652,7 +668,7 @@
  4393. # CONFIG_B44 is not set
  4394. # CONFIG_FORCEDETH is not set
  4395. # CONFIG_EEPRO100 is not set
  4396. -CONFIG_E100=y
  4397. +# CONFIG_E100 is not set
  4398. # CONFIG_FEALNX is not set
  4399. # CONFIG_NATSEMI is not set
  4400. # CONFIG_NE2K_PCI is not set
  4401. @@ -668,9 +684,7 @@
  4402. CONFIG_NETDEV_1000=y
  4403. # CONFIG_ACENIC is not set
  4404. # CONFIG_DL2K is not set
  4405. -CONFIG_E1000=y
  4406. -CONFIG_E1000_NAPI=y
  4407. -# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
  4408. +# CONFIG_E1000 is not set
  4409. # CONFIG_E1000E is not set
  4410. # CONFIG_E1000E_ENABLED is not set
  4411. # CONFIG_IP1000 is not set
  4412. @@ -680,27 +694,15 @@
  4413. # CONFIG_YELLOWFIN is not set
  4414. # CONFIG_R8169 is not set
  4415. # CONFIG_SIS190 is not set
  4416. -CONFIG_SKGE=y
  4417. -CONFIG_SKY2=y
  4418. -# CONFIG_SK98LIN is not set
  4419. +# CONFIG_SKGE is not set
  4420. +# CONFIG_SKY2 is not set
  4421. # CONFIG_VIA_VELOCITY is not set
  4422. -CONFIG_TIGON3=y
  4423. +# CONFIG_TIGON3 is not set
  4424. # CONFIG_BNX2 is not set
  4425. CONFIG_MV643XX_ETH=y
  4426. # CONFIG_QLA3XXX is not set
  4427. # CONFIG_ATL1 is not set
  4428. -CONFIG_NETDEV_10000=y
  4429. -# CONFIG_CHELSIO_T1 is not set
  4430. -# CONFIG_CHELSIO_T3 is not set
  4431. -# CONFIG_IXGBE is not set
  4432. -# CONFIG_IXGB is not set
  4433. -# CONFIG_S2IO is not set
  4434. -# CONFIG_MYRI10GE is not set
  4435. -# CONFIG_NETXEN_NIC is not set
  4436. -# CONFIG_NIU is not set
  4437. -# CONFIG_MLX4_CORE is not set
  4438. -# CONFIG_TEHUTI is not set
  4439. -# CONFIG_BNX2X is not set
  4440. +# CONFIG_NETDEV_10000 is not set
  4441. # CONFIG_TR is not set
  4442. #
  4443. @@ -708,6 +710,7 @@
  4444. #
  4445. # CONFIG_WLAN_PRE80211 is not set
  4446. # CONFIG_WLAN_80211 is not set
  4447. +# CONFIG_IWLWIFI_LEDS is not set
  4448. #
  4449. # USB Network Adapters
  4450. @@ -738,12 +741,9 @@
  4451. #
  4452. # Userland interfaces
  4453. #
  4454. -CONFIG_INPUT_MOUSEDEV=y
  4455. -CONFIG_INPUT_MOUSEDEV_PSAUX=y
  4456. -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
  4457. -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
  4458. +# CONFIG_INPUT_MOUSEDEV is not set
  4459. # CONFIG_INPUT_JOYDEV is not set
  4460. -# CONFIG_INPUT_EVDEV is not set
  4461. +CONFIG_INPUT_EVDEV=y
  4462. # CONFIG_INPUT_EVBUG is not set
  4463. #
  4464. @@ -765,10 +765,8 @@
  4465. #
  4466. # Character devices
  4467. #
  4468. -CONFIG_VT=y
  4469. -CONFIG_VT_CONSOLE=y
  4470. -CONFIG_HW_CONSOLE=y
  4471. -# CONFIG_VT_HW_CONSOLE_BINDING is not set
  4472. +# CONFIG_VT is not set
  4473. +CONFIG_DEVKMEM=y
  4474. # CONFIG_SERIAL_NONSTANDARD is not set
  4475. # CONFIG_NOZOMI is not set
  4476. @@ -777,7 +775,7 @@
  4477. #
  4478. CONFIG_SERIAL_8250=y
  4479. CONFIG_SERIAL_8250_CONSOLE=y
  4480. -CONFIG_SERIAL_8250_PCI=y
  4481. +# CONFIG_SERIAL_8250_PCI is not set
  4482. CONFIG_SERIAL_8250_NR_UARTS=4
  4483. CONFIG_SERIAL_8250_RUNTIME_UARTS=2
  4484. # CONFIG_SERIAL_8250_EXTENDED is not set
  4485. @@ -792,7 +790,7 @@
  4486. CONFIG_LEGACY_PTYS=y
  4487. CONFIG_LEGACY_PTY_COUNT=16
  4488. # CONFIG_IPMI_HANDLER is not set
  4489. -CONFIG_HW_RANDOM=m
  4490. +# CONFIG_HW_RANDOM is not set
  4491. # CONFIG_NVRAM is not set
  4492. # CONFIG_R3964 is not set
  4493. # CONFIG_APPLICOM is not set
  4494. @@ -804,13 +802,6 @@
  4495. CONFIG_I2C_CHARDEV=y
  4496. #
  4497. -# I2C Algorithms
  4498. -#
  4499. -# CONFIG_I2C_ALGOBIT is not set
  4500. -# CONFIG_I2C_ALGOPCF is not set
  4501. -# CONFIG_I2C_ALGOPCA is not set
  4502. -
  4503. -#
  4504. # I2C Hardware Bus support
  4505. #
  4506. # CONFIG_I2C_ALI1535 is not set
  4507. @@ -837,6 +828,7 @@
  4508. # CONFIG_I2C_VIA is not set
  4509. # CONFIG_I2C_VIAPRO is not set
  4510. # CONFIG_I2C_VOODOO3 is not set
  4511. +# CONFIG_I2C_PCA_PLATFORM is not set
  4512. CONFIG_I2C_MV64XXX=y
  4513. #
  4514. @@ -847,19 +839,13 @@
  4515. # CONFIG_SENSORS_PCF8574 is not set
  4516. # CONFIG_PCF8575 is not set
  4517. # CONFIG_SENSORS_PCF8591 is not set
  4518. -# CONFIG_TPS65010 is not set
  4519. # CONFIG_SENSORS_MAX6875 is not set
  4520. # CONFIG_SENSORS_TSL2550 is not set
  4521. # CONFIG_I2C_DEBUG_CORE is not set
  4522. # CONFIG_I2C_DEBUG_ALGO is not set
  4523. # CONFIG_I2C_DEBUG_BUS is not set
  4524. # CONFIG_I2C_DEBUG_CHIP is not set
  4525. -
  4526. -#
  4527. -# SPI support
  4528. -#
  4529. # CONFIG_SPI is not set
  4530. -# CONFIG_SPI_MASTER is not set
  4531. # CONFIG_W1 is not set
  4532. # CONFIG_POWER_SUPPLY is not set
  4533. CONFIG_HWMON=y
  4534. @@ -872,6 +858,7 @@
  4535. # CONFIG_SENSORS_ADM1031 is not set
  4536. # CONFIG_SENSORS_ADM9240 is not set
  4537. # CONFIG_SENSORS_ADT7470 is not set
  4538. +# CONFIG_SENSORS_ADT7473 is not set
  4539. # CONFIG_SENSORS_ATXP1 is not set
  4540. # CONFIG_SENSORS_DS1621 is not set
  4541. # CONFIG_SENSORS_I5K_AMB is not set
  4542. @@ -901,6 +888,7 @@
  4543. # CONFIG_SENSORS_SMSC47M1 is not set
  4544. # CONFIG_SENSORS_SMSC47M192 is not set
  4545. # CONFIG_SENSORS_SMSC47B397 is not set
  4546. +# CONFIG_SENSORS_ADS7828 is not set
  4547. # CONFIG_SENSORS_THMC50 is not set
  4548. # CONFIG_SENSORS_VIA686A is not set
  4549. # CONFIG_SENSORS_VT1211 is not set
  4550. @@ -910,6 +898,7 @@
  4551. # CONFIG_SENSORS_W83792D is not set
  4552. # CONFIG_SENSORS_W83793 is not set
  4553. # CONFIG_SENSORS_W83L785TS is not set
  4554. +# CONFIG_SENSORS_W83L786NG is not set
  4555. # CONFIG_SENSORS_W83627HF is not set
  4556. # CONFIG_SENSORS_W83627EHF is not set
  4557. # CONFIG_HWMON_DEBUG_CHIP is not set
  4558. @@ -925,14 +914,24 @@
  4559. # Multifunction device drivers
  4560. #
  4561. # CONFIG_MFD_SM501 is not set
  4562. +# CONFIG_MFD_ASIC3 is not set
  4563. +# CONFIG_HTC_PASIC3 is not set
  4564. #
  4565. # Multimedia devices
  4566. #
  4567. +
  4568. +#
  4569. +# Multimedia core support
  4570. +#
  4571. # CONFIG_VIDEO_DEV is not set
  4572. # CONFIG_DVB_CORE is not set
  4573. -CONFIG_DAB=y
  4574. -# CONFIG_USB_DABUSB is not set
  4575. +# CONFIG_VIDEO_MEDIA is not set
  4576. +
  4577. +#
  4578. +# Multimedia drivers
  4579. +#
  4580. +# CONFIG_DAB is not set
  4581. #
  4582. # Graphics support
  4583. @@ -949,12 +948,6 @@
  4584. # CONFIG_DISPLAY_SUPPORT is not set
  4585. #
  4586. -# Console display driver support
  4587. -#
  4588. -# CONFIG_VGA_CONSOLE is not set
  4589. -CONFIG_DUMMY_CONSOLE=y
  4590. -
  4591. -#
  4592. # Sound
  4593. #
  4594. # CONFIG_SOUND is not set
  4595. @@ -985,14 +978,18 @@
  4596. CONFIG_USB_DEVICE_CLASS=y
  4597. # CONFIG_USB_DYNAMIC_MINORS is not set
  4598. # CONFIG_USB_OTG is not set
  4599. +# CONFIG_USB_OTG_WHITELIST is not set
  4600. +# CONFIG_USB_OTG_BLACKLIST_HUB is not set
  4601. #
  4602. # USB Host Controller Drivers
  4603. #
  4604. +# CONFIG_USB_C67X00_HCD is not set
  4605. CONFIG_USB_EHCI_HCD=y
  4606. CONFIG_USB_EHCI_ROOT_HUB_TT=y
  4607. CONFIG_USB_EHCI_TT_NEWSCHED=y
  4608. # CONFIG_USB_ISP116X_HCD is not set
  4609. +# CONFIG_USB_ISP1760_HCD is not set
  4610. # CONFIG_USB_OHCI_HCD is not set
  4611. # CONFIG_USB_UHCI_HCD is not set
  4612. # CONFIG_USB_SL811_HCD is not set
  4613. @@ -1003,6 +1000,7 @@
  4614. #
  4615. # CONFIG_USB_ACM is not set
  4616. CONFIG_USB_PRINTER=y
  4617. +# CONFIG_USB_WDM is not set
  4618. #
  4619. # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
  4620. @@ -1022,7 +1020,9 @@
  4621. CONFIG_USB_STORAGE_SDDR55=y
  4622. CONFIG_USB_STORAGE_JUMPSHOT=y
  4623. # CONFIG_USB_STORAGE_ALAUDA is not set
  4624. +# CONFIG_USB_STORAGE_ONETOUCH is not set
  4625. # CONFIG_USB_STORAGE_KARMA is not set
  4626. +# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
  4627. # CONFIG_USB_LIBUSUAL is not set
  4628. #
  4629. @@ -1060,6 +1060,7 @@
  4630. # CONFIG_USB_TRANCEVIBRATOR is not set
  4631. # CONFIG_USB_IOWARRIOR is not set
  4632. # CONFIG_USB_TEST is not set
  4633. +# CONFIG_USB_ISIGHTFW is not set
  4634. # CONFIG_USB_GADGET is not set
  4635. # CONFIG_MMC is not set
  4636. CONFIG_NEW_LEDS=y
  4637. @@ -1076,6 +1077,7 @@
  4638. CONFIG_LEDS_TRIGGERS=y
  4639. CONFIG_LEDS_TRIGGER_TIMER=y
  4640. CONFIG_LEDS_TRIGGER_HEARTBEAT=y
  4641. +# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set
  4642. CONFIG_RTC_LIB=y
  4643. CONFIG_RTC_CLASS=y
  4644. CONFIG_RTC_HCTOSYS=y
  4645. @@ -1105,6 +1107,7 @@
  4646. # CONFIG_RTC_DRV_PCF8583 is not set
  4647. CONFIG_RTC_DRV_M41T80=y
  4648. # CONFIG_RTC_DRV_M41T80_WDT is not set
  4649. +# CONFIG_RTC_DRV_S35390A is not set
  4650. #
  4651. # SPI RTC drivers
  4652. @@ -1125,6 +1128,7 @@
  4653. #
  4654. # on-CPU RTC drivers
  4655. #
  4656. +# CONFIG_UIO is not set
  4657. #
  4658. # File systems
  4659. @@ -1140,14 +1144,11 @@
  4660. # CONFIG_JFS_FS is not set
  4661. # CONFIG_FS_POSIX_ACL is not set
  4662. # CONFIG_XFS_FS is not set
  4663. -# CONFIG_GFS2_FS is not set
  4664. # CONFIG_OCFS2_FS is not set
  4665. -# CONFIG_MINIX_FS is not set
  4666. -# CONFIG_ROMFS_FS is not set
  4667. +CONFIG_DNOTIFY=y
  4668. CONFIG_INOTIFY=y
  4669. CONFIG_INOTIFY_USER=y
  4670. # CONFIG_QUOTA is not set
  4671. -CONFIG_DNOTIFY=y
  4672. # CONFIG_AUTOFS_FS is not set
  4673. # CONFIG_AUTOFS4_FS is not set
  4674. # CONFIG_FUSE_FS is not set
  4675. @@ -1155,8 +1156,8 @@
  4676. #
  4677. # CD-ROM/DVD Filesystems
  4678. #
  4679. -CONFIG_ISO9660_FS=y
  4680. -# CONFIG_JOLIET is not set
  4681. +CONFIG_ISO9660_FS=m
  4682. +CONFIG_JOLIET=y
  4683. # CONFIG_ZISOFS is not set
  4684. CONFIG_UDF_FS=m
  4685. CONFIG_UDF_NLS=y
  4686. @@ -1205,8 +1206,10 @@
  4687. # CONFIG_JFFS2_RUBIN is not set
  4688. CONFIG_CRAMFS=y
  4689. # CONFIG_VXFS_FS is not set
  4690. +# CONFIG_MINIX_FS is not set
  4691. # CONFIG_HPFS_FS is not set
  4692. # CONFIG_QNX4FS_FS is not set
  4693. +# CONFIG_ROMFS_FS is not set
  4694. # CONFIG_SYSV_FS is not set
  4695. # CONFIG_UFS_FS is not set
  4696. CONFIG_NETWORK_FILESYSTEMS=y
  4697. @@ -1214,7 +1217,6 @@
  4698. CONFIG_NFS_V3=y
  4699. # CONFIG_NFS_V3_ACL is not set
  4700. # CONFIG_NFS_V4 is not set
  4701. -# CONFIG_NFS_DIRECTIO is not set
  4702. # CONFIG_NFSD is not set
  4703. CONFIG_ROOT_NFS=y
  4704. CONFIG_LOCKD=y
  4705. @@ -1241,14 +1243,13 @@
  4706. # CONFIG_MAC_PARTITION is not set
  4707. CONFIG_MSDOS_PARTITION=y
  4708. CONFIG_BSD_DISKLABEL=y
  4709. -CONFIG_MINIX_SUBPARTITION=y
  4710. -CONFIG_SOLARIS_X86_PARTITION=y
  4711. -CONFIG_UNIXWARE_DISKLABEL=y
  4712. -CONFIG_LDM_PARTITION=y
  4713. -CONFIG_LDM_DEBUG=y
  4714. +# CONFIG_MINIX_SUBPARTITION is not set
  4715. +# CONFIG_SOLARIS_X86_PARTITION is not set
  4716. +# CONFIG_UNIXWARE_DISKLABEL is not set
  4717. +# CONFIG_LDM_PARTITION is not set
  4718. # CONFIG_SGI_PARTITION is not set
  4719. # CONFIG_ULTRIX_PARTITION is not set
  4720. -CONFIG_SUN_PARTITION=y
  4721. +# CONFIG_SUN_PARTITION is not set
  4722. # CONFIG_KARMA_PARTITION is not set
  4723. # CONFIG_EFI_PARTITION is not set
  4724. # CONFIG_SYSV68_PARTITION is not set
  4725. @@ -1300,15 +1301,48 @@
  4726. # CONFIG_PRINTK_TIME is not set
  4727. CONFIG_ENABLE_WARN_DEPRECATED=y
  4728. CONFIG_ENABLE_MUST_CHECK=y
  4729. -# CONFIG_MAGIC_SYSRQ is not set
  4730. +CONFIG_FRAME_WARN=1024
  4731. +CONFIG_MAGIC_SYSRQ=y
  4732. # CONFIG_UNUSED_SYMBOLS is not set
  4733. # CONFIG_DEBUG_FS is not set
  4734. # CONFIG_HEADERS_CHECK is not set
  4735. -# CONFIG_DEBUG_KERNEL is not set
  4736. +CONFIG_DEBUG_KERNEL=y
  4737. +# CONFIG_DEBUG_SHIRQ is not set
  4738. +CONFIG_DETECT_SOFTLOCKUP=y
  4739. +CONFIG_SCHED_DEBUG=y
  4740. +CONFIG_SCHEDSTATS=y
  4741. +# CONFIG_TIMER_STATS is not set
  4742. +# CONFIG_DEBUG_OBJECTS is not set
  4743. +CONFIG_DEBUG_PREEMPT=y
  4744. +# CONFIG_DEBUG_RT_MUTEXES is not set
  4745. +# CONFIG_RT_MUTEX_TESTER is not set
  4746. +# CONFIG_DEBUG_SPINLOCK is not set
  4747. +# CONFIG_DEBUG_MUTEXES is not set
  4748. +# CONFIG_DEBUG_LOCK_ALLOC is not set
  4749. +# CONFIG_PROVE_LOCKING is not set
  4750. +# CONFIG_LOCK_STAT is not set
  4751. +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
  4752. +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
  4753. +# CONFIG_DEBUG_KOBJECT is not set
  4754. # CONFIG_DEBUG_BUGVERBOSE is not set
  4755. +CONFIG_DEBUG_INFO=y
  4756. +# CONFIG_DEBUG_VM is not set
  4757. +# CONFIG_DEBUG_WRITECOUNT is not set
  4758. +# CONFIG_DEBUG_LIST is not set
  4759. +# CONFIG_DEBUG_SG is not set
  4760. CONFIG_FRAME_POINTER=y
  4761. +# CONFIG_BOOT_PRINTK_DELAY is not set
  4762. +# CONFIG_RCU_TORTURE_TEST is not set
  4763. +# CONFIG_KPROBES_SANITY_TEST is not set
  4764. +# CONFIG_BACKTRACE_SELF_TEST is not set
  4765. +# CONFIG_LKDTM is not set
  4766. +# CONFIG_FAULT_INJECTION is not set
  4767. # CONFIG_SAMPLES is not set
  4768. CONFIG_DEBUG_USER=y
  4769. +CONFIG_DEBUG_ERRORS=y
  4770. +# CONFIG_DEBUG_STACK_USAGE is not set
  4771. +CONFIG_DEBUG_LL=y
  4772. +# CONFIG_DEBUG_ICEDCC is not set
  4773. #
  4774. # Security options
  4775. @@ -1317,50 +1351,79 @@
  4776. # CONFIG_SECURITY is not set
  4777. # CONFIG_SECURITY_FILE_CAPABILITIES is not set
  4778. CONFIG_CRYPTO=y
  4779. +
  4780. +#
  4781. +# Crypto core or helper
  4782. +#
  4783. CONFIG_CRYPTO_ALGAPI=m
  4784. CONFIG_CRYPTO_BLKCIPHER=m
  4785. -# CONFIG_CRYPTO_SEQIV is not set
  4786. CONFIG_CRYPTO_MANAGER=m
  4787. +# CONFIG_CRYPTO_GF128MUL is not set
  4788. +# CONFIG_CRYPTO_NULL is not set
  4789. +# CONFIG_CRYPTO_CRYPTD is not set
  4790. +# CONFIG_CRYPTO_AUTHENC is not set
  4791. +# CONFIG_CRYPTO_TEST is not set
  4792. +
  4793. +#
  4794. +# Authenticated Encryption with Associated Data
  4795. +#
  4796. +# CONFIG_CRYPTO_CCM is not set
  4797. +# CONFIG_CRYPTO_GCM is not set
  4798. +# CONFIG_CRYPTO_SEQIV is not set
  4799. +
  4800. +#
  4801. +# Block modes
  4802. +#
  4803. +CONFIG_CRYPTO_CBC=m
  4804. +# CONFIG_CRYPTO_CTR is not set
  4805. +# CONFIG_CRYPTO_CTS is not set
  4806. +CONFIG_CRYPTO_ECB=m
  4807. +# CONFIG_CRYPTO_LRW is not set
  4808. +CONFIG_CRYPTO_PCBC=m
  4809. +# CONFIG_CRYPTO_XTS is not set
  4810. +
  4811. +#
  4812. +# Hash modes
  4813. +#
  4814. # CONFIG_CRYPTO_HMAC is not set
  4815. # CONFIG_CRYPTO_XCBC is not set
  4816. -# CONFIG_CRYPTO_NULL is not set
  4817. +
  4818. +#
  4819. +# Digest
  4820. +#
  4821. +# CONFIG_CRYPTO_CRC32C is not set
  4822. # CONFIG_CRYPTO_MD4 is not set
  4823. # CONFIG_CRYPTO_MD5 is not set
  4824. +# CONFIG_CRYPTO_MICHAEL_MIC is not set
  4825. # CONFIG_CRYPTO_SHA1 is not set
  4826. # CONFIG_CRYPTO_SHA256 is not set
  4827. # CONFIG_CRYPTO_SHA512 is not set
  4828. -# CONFIG_CRYPTO_WP512 is not set
  4829. # CONFIG_CRYPTO_TGR192 is not set
  4830. -# CONFIG_CRYPTO_GF128MUL is not set
  4831. -CONFIG_CRYPTO_ECB=m
  4832. -CONFIG_CRYPTO_CBC=m
  4833. -CONFIG_CRYPTO_PCBC=m
  4834. -# CONFIG_CRYPTO_LRW is not set
  4835. -# CONFIG_CRYPTO_XTS is not set
  4836. -# CONFIG_CRYPTO_CTR is not set
  4837. -# CONFIG_CRYPTO_GCM is not set
  4838. -# CONFIG_CRYPTO_CCM is not set
  4839. -# CONFIG_CRYPTO_CRYPTD is not set
  4840. -# CONFIG_CRYPTO_DES is not set
  4841. -# CONFIG_CRYPTO_FCRYPT is not set
  4842. -# CONFIG_CRYPTO_BLOWFISH is not set
  4843. -# CONFIG_CRYPTO_TWOFISH is not set
  4844. -# CONFIG_CRYPTO_SERPENT is not set
  4845. +# CONFIG_CRYPTO_WP512 is not set
  4846. +
  4847. +#
  4848. +# Ciphers
  4849. +#
  4850. # CONFIG_CRYPTO_AES is not set
  4851. +# CONFIG_CRYPTO_ANUBIS is not set
  4852. +# CONFIG_CRYPTO_ARC4 is not set
  4853. +# CONFIG_CRYPTO_BLOWFISH is not set
  4854. +# CONFIG_CRYPTO_CAMELLIA is not set
  4855. # CONFIG_CRYPTO_CAST5 is not set
  4856. # CONFIG_CRYPTO_CAST6 is not set
  4857. -# CONFIG_CRYPTO_TEA is not set
  4858. -# CONFIG_CRYPTO_ARC4 is not set
  4859. +# CONFIG_CRYPTO_DES is not set
  4860. +# CONFIG_CRYPTO_FCRYPT is not set
  4861. # CONFIG_CRYPTO_KHAZAD is not set
  4862. -# CONFIG_CRYPTO_ANUBIS is not set
  4863. -# CONFIG_CRYPTO_SEED is not set
  4864. # CONFIG_CRYPTO_SALSA20 is not set
  4865. +# CONFIG_CRYPTO_SEED is not set
  4866. +# CONFIG_CRYPTO_SERPENT is not set
  4867. +# CONFIG_CRYPTO_TEA is not set
  4868. +# CONFIG_CRYPTO_TWOFISH is not set
  4869. +
  4870. +#
  4871. +# Compression
  4872. +#
  4873. # CONFIG_CRYPTO_DEFLATE is not set
  4874. -# CONFIG_CRYPTO_MICHAEL_MIC is not set
  4875. -# CONFIG_CRYPTO_CRC32C is not set
  4876. -# CONFIG_CRYPTO_CAMELLIA is not set
  4877. -# CONFIG_CRYPTO_TEST is not set
  4878. -# CONFIG_CRYPTO_AUTHENC is not set
  4879. # CONFIG_CRYPTO_LZO is not set
  4880. CONFIG_CRYPTO_HW=y
  4881. # CONFIG_CRYPTO_DEV_HIFN_795X is not set
  4882. @@ -1369,12 +1432,14 @@
  4883. # Library routines
  4884. #
  4885. CONFIG_BITREVERSE=y
  4886. -CONFIG_CRC_CCITT=y
  4887. -CONFIG_CRC16=y
  4888. -# CONFIG_CRC_ITU_T is not set
  4889. +# CONFIG_GENERIC_FIND_FIRST_BIT is not set
  4890. +# CONFIG_GENERIC_FIND_NEXT_BIT is not set
  4891. +# CONFIG_CRC_CCITT is not set
  4892. +# CONFIG_CRC16 is not set
  4893. +CONFIG_CRC_ITU_T=m
  4894. CONFIG_CRC32=y
  4895. # CONFIG_CRC7 is not set
  4896. -CONFIG_LIBCRC32C=y
  4897. +# CONFIG_LIBCRC32C is not set
  4898. CONFIG_ZLIB_INFLATE=y
  4899. CONFIG_ZLIB_DEFLATE=y
  4900. CONFIG_PLIST=y
  4901. --- a/arch/arm/kernel/stacktrace.c
  4902. +++ b/arch/arm/kernel/stacktrace.c
  4903. @@ -36,6 +36,7 @@
  4904. #ifdef CONFIG_STACKTRACE
  4905. struct stack_trace_data {
  4906. struct stack_trace *trace;
  4907. + unsigned int no_sched_functions;
  4908. unsigned int skip;
  4909. };
  4910. @@ -43,27 +44,52 @@
  4911. {
  4912. struct stack_trace_data *data = d;
  4913. struct stack_trace *trace = data->trace;
  4914. + unsigned long addr = frame->lr;
  4915. + if (data->no_sched_functions && in_sched_functions(addr))
  4916. + return 0;
  4917. if (data->skip) {
  4918. data->skip--;
  4919. return 0;
  4920. }
  4921. - trace->entries[trace->nr_entries++] = frame->lr;
  4922. + trace->entries[trace->nr_entries++] = addr;
  4923. return trace->nr_entries >= trace->max_entries;
  4924. }
  4925. -void save_stack_trace(struct stack_trace *trace)
  4926. +void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace)
  4927. {
  4928. struct stack_trace_data data;
  4929. unsigned long fp, base;
  4930. data.trace = trace;
  4931. data.skip = trace->skip;
  4932. - base = (unsigned long)task_stack_page(current);
  4933. - asm("mov %0, fp" : "=r" (fp));
  4934. + base = (unsigned long)task_stack_page(tsk);
  4935. +
  4936. + if (tsk != current) {
  4937. +#ifdef CONFIG_SMP
  4938. + /*
  4939. + * What guarantees do we have here that 'tsk'
  4940. + * is not running on another CPU?
  4941. + */
  4942. + BUG();
  4943. +#else
  4944. + data.no_sched_functions = 1;
  4945. + fp = thread_saved_fp(tsk);
  4946. +#endif
  4947. + } else {
  4948. + data.no_sched_functions = 0;
  4949. + asm("mov %0, fp" : "=r" (fp));
  4950. + }
  4951. walk_stackframe(fp, base, base + THREAD_SIZE, save_trace, &data);
  4952. + if (trace->nr_entries < trace->max_entries)
  4953. + trace->entries[trace->nr_entries++] = ULONG_MAX;
  4954. +}
  4955. +
  4956. +void save_stack_trace(struct stack_trace *trace)
  4957. +{
  4958. + save_stack_trace_tsk(current, trace);
  4959. }
  4960. #endif
  4961. --- a/arch/arm/lib/copy_template.S
  4962. +++ b/arch/arm/lib/copy_template.S
  4963. @@ -13,14 +13,6 @@
  4964. */
  4965. /*
  4966. - * This can be used to enable code to cacheline align the source pointer.
  4967. - * Experiments on tested architectures (StrongARM and XScale) didn't show
  4968. - * this a worthwhile thing to do. That might be different in the future.
  4969. - */
  4970. -//#define CALGN(code...) code
  4971. -#define CALGN(code...)
  4972. -
  4973. -/*
  4974. * Theory of operation
  4975. * -------------------
  4976. *
  4977. @@ -82,7 +74,7 @@
  4978. stmfd sp!, {r5 - r8}
  4979. blt 5f
  4980. - CALGN( ands ip, r1, #31 )
  4981. + CALGN( ands ip, r0, #31 )
  4982. CALGN( rsb r3, ip, #32 )
  4983. CALGN( sbcnes r4, r3, r2 ) @ C is always set here
  4984. CALGN( bcs 2f )
  4985. @@ -168,7 +160,7 @@
  4986. subs r2, r2, #28
  4987. blt 14f
  4988. - CALGN( ands ip, r1, #31 )
  4989. + CALGN( ands ip, r0, #31 )
  4990. CALGN( rsb ip, ip, #32 )
  4991. CALGN( sbcnes r4, ip, r2 ) @ C is always set here
  4992. CALGN( subcc r2, r2, ip )
  4993. --- a/arch/arm/lib/memmove.S
  4994. +++ b/arch/arm/lib/memmove.S
  4995. @@ -13,14 +13,6 @@
  4996. #include <linux/linkage.h>
  4997. #include <asm/assembler.h>
  4998. -/*
  4999. - * This can be used to enable code to cacheline align the source pointer.
  5000. - * Experiments on tested architectures (StrongARM and XScale) didn't show
  5001. - * this a worthwhile thing to do. That might be different in the future.
  5002. - */
  5003. -//#define CALGN(code...) code
  5004. -#define CALGN(code...)
  5005. -
  5006. .text
  5007. /*
  5008. @@ -55,11 +47,12 @@
  5009. stmfd sp!, {r5 - r8}
  5010. blt 5f
  5011. - CALGN( ands ip, r1, #31 )
  5012. + CALGN( ands ip, r0, #31 )
  5013. CALGN( sbcnes r4, ip, r2 ) @ C is always set here
  5014. CALGN( bcs 2f )
  5015. CALGN( adr r4, 6f )
  5016. CALGN( subs r2, r2, ip ) @ C is set here
  5017. + CALGN( rsb ip, ip, #32 )
  5018. CALGN( add pc, r4, ip )
  5019. PLD( pld [r1, #-4] )
  5020. @@ -138,8 +131,7 @@
  5021. subs r2, r2, #28
  5022. blt 14f
  5023. - CALGN( ands ip, r1, #31 )
  5024. - CALGN( rsb ip, ip, #32 )
  5025. + CALGN( ands ip, r0, #31 )
  5026. CALGN( sbcnes r4, ip, r2 ) @ C is always set here
  5027. CALGN( subcc r2, r2, ip )
  5028. CALGN( bcc 15f )
  5029. --- a/arch/arm/lib/memset.S
  5030. +++ b/arch/arm/lib/memset.S
  5031. @@ -39,6 +39,9 @@
  5032. mov r3, r1
  5033. cmp r2, #16
  5034. blt 4f
  5035. +
  5036. +#if ! CALGN(1)+0
  5037. +
  5038. /*
  5039. * We need an extra register for this loop - save the return address and
  5040. * use the LR
  5041. @@ -64,6 +67,49 @@
  5042. stmneia r0!, {r1, r3, ip, lr}
  5043. ldr lr, [sp], #4
  5044. +#else
  5045. +
  5046. +/*
  5047. + * This version aligns the destination pointer in order to write
  5048. + * whole cache lines at once.
  5049. + */
  5050. +
  5051. + stmfd sp!, {r4-r7, lr}
  5052. + mov r4, r1
  5053. + mov r5, r1
  5054. + mov r6, r1
  5055. + mov r7, r1
  5056. + mov ip, r1
  5057. + mov lr, r1
  5058. +
  5059. + cmp r2, #96
  5060. + tstgt r0, #31
  5061. + ble 3f
  5062. +
  5063. + and ip, r0, #31
  5064. + rsb ip, ip, #32
  5065. + sub r2, r2, ip
  5066. + movs ip, ip, lsl #(32 - 4)
  5067. + stmcsia r0!, {r4, r5, r6, r7}
  5068. + stmmiia r0!, {r4, r5}
  5069. + tst ip, #(1 << 30)
  5070. + mov ip, r1
  5071. + strne r1, [r0], #4
  5072. +
  5073. +3: subs r2, r2, #64
  5074. + stmgeia r0!, {r1, r3-r7, ip, lr}
  5075. + stmgeia r0!, {r1, r3-r7, ip, lr}
  5076. + bgt 3b
  5077. + ldmeqfd sp!, {r4-r7, pc}
  5078. +
  5079. + tst r2, #32
  5080. + stmneia r0!, {r1, r3-r7, ip, lr}
  5081. + tst r2, #16
  5082. + stmneia r0!, {r4-r7}
  5083. + ldmfd sp!, {r4-r7, lr}
  5084. +
  5085. +#endif
  5086. +
  5087. 4: tst r2, #8
  5088. stmneia r0!, {r1, r3}
  5089. tst r2, #4
  5090. --- a/arch/arm/lib/memzero.S
  5091. +++ b/arch/arm/lib/memzero.S
  5092. @@ -39,6 +39,9 @@
  5093. */
  5094. cmp r1, #16 @ 1 we can skip this chunk if we
  5095. blt 4f @ 1 have < 16 bytes
  5096. +
  5097. +#if ! CALGN(1)+0
  5098. +
  5099. /*
  5100. * We need an extra register for this loop - save the return address and
  5101. * use the LR
  5102. @@ -64,6 +67,47 @@
  5103. stmneia r0!, {r2, r3, ip, lr} @ 4
  5104. ldr lr, [sp], #4 @ 1
  5105. +#else
  5106. +
  5107. +/*
  5108. + * This version aligns the destination pointer in order to write
  5109. + * whole cache lines at once.
  5110. + */
  5111. +
  5112. + stmfd sp!, {r4-r7, lr}
  5113. + mov r4, r2
  5114. + mov r5, r2
  5115. + mov r6, r2
  5116. + mov r7, r2
  5117. + mov ip, r2
  5118. + mov lr, r2
  5119. +
  5120. + cmp r1, #96
  5121. + andgts ip, r0, #31
  5122. + ble 3f
  5123. +
  5124. + rsb ip, ip, #32
  5125. + sub r1, r1, ip
  5126. + movs ip, ip, lsl #(32 - 4)
  5127. + stmcsia r0!, {r4, r5, r6, r7}
  5128. + stmmiia r0!, {r4, r5}
  5129. + movs ip, ip, lsl #2
  5130. + strcs r2, [r0], #4
  5131. +
  5132. +3: subs r1, r1, #64
  5133. + stmgeia r0!, {r2-r7, ip, lr}
  5134. + stmgeia r0!, {r2-r7, ip, lr}
  5135. + bgt 3b
  5136. + ldmeqfd sp!, {r4-r7, pc}
  5137. +
  5138. + tst r1, #32
  5139. + stmneia r0!, {r2-r7, ip, lr}
  5140. + tst r1, #16
  5141. + stmneia r0!, {r4-r7}
  5142. + ldmfd sp!, {r4-r7, lr}
  5143. +
  5144. +#endif
  5145. +
  5146. 4: tst r1, #8 @ 1 8 bytes or more?
  5147. stmneia r0!, {r2, r3} @ 2
  5148. tst r1, #4 @ 1 4 bytes or more?
  5149. --- /dev/null
  5150. +++ b/arch/arm/mach-kirkwood/Kconfig
  5151. @@ -0,0 +1,25 @@
  5152. +if ARCH_KIRKWOOD
  5153. +
  5154. +menu "Marvell Kirkwood Implementations"
  5155. +
  5156. +config MACH_DB88F6281_BP
  5157. + bool "Marvell DB-88F6281-BP Development Board"
  5158. + help
  5159. + Say 'Y' here if you want your kernel to support the
  5160. + Marvell DB-88F6281-BP Development Board.
  5161. +
  5162. +config MACH_RD88F6192_NAS
  5163. + bool "Marvell RD-88F6192-NAS Reference Board"
  5164. + help
  5165. + Say 'Y' here if you want your kernel to support the
  5166. + Marvell RD-88F6192-NAS Reference Board.
  5167. +
  5168. +config MACH_RD88F6281
  5169. + bool "Marvell RD-88F6281 Reference Board"
  5170. + help
  5171. + Say 'Y' here if you want your kernel to support the
  5172. + Marvell RD-88F6281 Reference Board.
  5173. +
  5174. +endmenu
  5175. +
  5176. +endif
  5177. --- /dev/null
  5178. +++ b/arch/arm/mach-kirkwood/Makefile
  5179. @@ -0,0 +1,5 @@
  5180. +obj-y += common.o addr-map.o irq.o pcie.o
  5181. +
  5182. +obj-$(CONFIG_MACH_DB88F6281_BP) += db88f6281-bp-setup.o
  5183. +obj-$(CONFIG_MACH_RD88F6192_NAS) += rd88f6192-nas-setup.o
  5184. +obj-$(CONFIG_MACH_RD88F6192_NAS) += rd88f6281-setup.o
  5185. --- /dev/null
  5186. +++ b/arch/arm/mach-kirkwood/Makefile.boot
  5187. @@ -0,0 +1,3 @@
  5188. + zreladdr-y := 0x00008000
  5189. +params_phys-y := 0x00000100
  5190. +initrd_phys-y := 0x00800000
  5191. --- /dev/null
  5192. +++ b/arch/arm/mach-kirkwood/addr-map.c
  5193. @@ -0,0 +1,139 @@
  5194. +/*
  5195. + * arch/arm/mach-kirkwood/addr-map.c
  5196. + *
  5197. + * Address map functions for Marvell Kirkwood SoCs
  5198. + *
  5199. + * This file is licensed under the terms of the GNU General Public
  5200. + * License version 2. This program is licensed "as is" without any
  5201. + * warranty of any kind, whether express or implied.
  5202. + */
  5203. +
  5204. +#include <linux/kernel.h>
  5205. +#include <linux/init.h>
  5206. +#include <linux/mbus.h>
  5207. +#include <linux/io.h>
  5208. +#include <asm/hardware.h>
  5209. +#include "common.h"
  5210. +
  5211. +/*
  5212. + * Generic Address Decode Windows bit settings
  5213. + */
  5214. +#define TARGET_DDR 0
  5215. +#define TARGET_DEV_BUS 1
  5216. +#define TARGET_PCIE 4
  5217. +#define ATTR_DEV_SPI_ROM 0x1e
  5218. +#define ATTR_DEV_BOOT 0x1d
  5219. +#define ATTR_DEV_NAND 0x2f
  5220. +#define ATTR_DEV_CS3 0x37
  5221. +#define ATTR_DEV_CS2 0x3b
  5222. +#define ATTR_DEV_CS1 0x3d
  5223. +#define ATTR_DEV_CS0 0x3e
  5224. +#define ATTR_PCIE_IO 0xe0
  5225. +#define ATTR_PCIE_MEM 0xe8
  5226. +
  5227. +/*
  5228. + * Helpers to get DDR bank info
  5229. + */
  5230. +#define DDR_BASE_CS_OFF(n) (0x0000 + ((n) << 3))
  5231. +#define DDR_SIZE_CS_OFF(n) (0x0004 + ((n) << 3))
  5232. +
  5233. +/*
  5234. + * CPU Address Decode Windows registers
  5235. + */
  5236. +#define WIN_OFF(n) (BRIDGE_VIRT_BASE + 0x0000 + ((n) << 4))
  5237. +#define WIN_CTRL_OFF 0x0000
  5238. +#define WIN_BASE_OFF 0x0004
  5239. +#define WIN_REMAP_LO_OFF 0x0008
  5240. +#define WIN_REMAP_HI_OFF 0x000c
  5241. +
  5242. +
  5243. +struct mbus_dram_target_info kirkwood_mbus_dram_info;
  5244. +
  5245. +static int __init cpu_win_can_remap(int win)
  5246. +{
  5247. + if (win < 4)
  5248. + return 1;
  5249. +
  5250. + return 0;
  5251. +}
  5252. +
  5253. +static void __init setup_cpu_win(int win, u32 base, u32 size,
  5254. + u8 target, u8 attr, int remap)
  5255. +{
  5256. + void __iomem *addr = (void __iomem *)WIN_OFF(win);
  5257. + u32 ctrl;
  5258. +
  5259. + base &= 0xffff0000;
  5260. + ctrl = ((size - 1) & 0xffff0000) | (attr << 8) | (target << 4) | 1;
  5261. +
  5262. + writel(base, addr + WIN_BASE_OFF);
  5263. + writel(ctrl, addr + WIN_CTRL_OFF);
  5264. + if (cpu_win_can_remap(win)) {
  5265. + if (remap < 0)
  5266. + remap = base;
  5267. +
  5268. + writel(remap & 0xffff0000, addr + WIN_REMAP_LO_OFF);
  5269. + writel(0, addr + WIN_REMAP_HI_OFF);
  5270. + }
  5271. +}
  5272. +
  5273. +void __init kirkwood_setup_cpu_mbus(void)
  5274. +{
  5275. + void __iomem *addr;
  5276. + int i;
  5277. + int cs;
  5278. +
  5279. + /*
  5280. + * First, disable and clear windows.
  5281. + */
  5282. + for (i = 0; i < 8; i++) {
  5283. + addr = (void __iomem *)WIN_OFF(i);
  5284. +
  5285. + writel(0, addr + WIN_BASE_OFF);
  5286. + writel(0, addr + WIN_CTRL_OFF);
  5287. + if (cpu_win_can_remap(i)) {
  5288. + writel(0, addr + WIN_REMAP_LO_OFF);
  5289. + writel(0, addr + WIN_REMAP_HI_OFF);
  5290. + }
  5291. + }
  5292. +
  5293. + /*
  5294. + * Setup windows for PCIe IO+MEM space.
  5295. + */
  5296. + setup_cpu_win(0, KIRKWOOD_PCIE_IO_PHYS_BASE, KIRKWOOD_PCIE_IO_SIZE,
  5297. + TARGET_PCIE, ATTR_PCIE_IO, KIRKWOOD_PCIE_IO_BUS_BASE);
  5298. + setup_cpu_win(1, KIRKWOOD_PCIE_MEM_PHYS_BASE, KIRKWOOD_PCIE_MEM_SIZE,
  5299. + TARGET_PCIE, ATTR_PCIE_MEM, -1);
  5300. +
  5301. + /*
  5302. + * Setup window for NAND controller.
  5303. + */
  5304. + setup_cpu_win(2, KIRKWOOD_NAND_MEM_PHYS_BASE, KIRKWOOD_NAND_MEM_SIZE,
  5305. + TARGET_DEV_BUS, ATTR_DEV_NAND, -1);
  5306. +
  5307. + /*
  5308. + * Setup MBUS dram target info.
  5309. + */
  5310. + kirkwood_mbus_dram_info.mbus_dram_target_id = TARGET_DDR;
  5311. +
  5312. + addr = (void __iomem *)DDR_WINDOW_CPU_BASE;
  5313. +
  5314. + for (i = 0, cs = 0; i < 4; i++) {
  5315. + u32 base = readl(addr + DDR_BASE_CS_OFF(i));
  5316. + u32 size = readl(addr + DDR_SIZE_CS_OFF(i));
  5317. +
  5318. + /*
  5319. + * Chip select enabled?
  5320. + */
  5321. + if (size & 1) {
  5322. + struct mbus_dram_window *w;
  5323. +
  5324. + w = &kirkwood_mbus_dram_info.cs[cs++];
  5325. + w->cs_index = i;
  5326. + w->mbus_attr = 0xf & ~(1 << i);
  5327. + w->base = base & 0xffff0000;
  5328. + w->size = (size | 0x0000ffff) + 1;
  5329. + }
  5330. + }
  5331. + kirkwood_mbus_dram_info.num_cs = cs;
  5332. +}
  5333. --- /dev/null
  5334. +++ b/arch/arm/mach-kirkwood/common.c
  5335. @@ -0,0 +1,326 @@
  5336. +/*
  5337. + * arch/arm/mach-kirkwood/common.c
  5338. + *
  5339. + * Core functions for Marvell Kirkwood SoCs
  5340. + *
  5341. + * This file is licensed under the terms of the GNU General Public
  5342. + * License version 2. This program is licensed "as is" without any
  5343. + * warranty of any kind, whether express or implied.
  5344. + */
  5345. +
  5346. +#include <linux/kernel.h>
  5347. +#include <linux/init.h>
  5348. +#include <linux/platform_device.h>
  5349. +#include <linux/serial_8250.h>
  5350. +#include <linux/mbus.h>
  5351. +#include <linux/mv643xx_eth.h>
  5352. +#include <linux/ata_platform.h>
  5353. +#include <asm/page.h>
  5354. +#include <asm/timex.h>
  5355. +#include <asm/mach/map.h>
  5356. +#include <asm/mach/time.h>
  5357. +#include <asm/arch/kirkwood.h>
  5358. +#include <asm/plat-orion/cache-feroceon-l2.h>
  5359. +#include <asm/plat-orion/ehci-orion.h>
  5360. +#include <asm/plat-orion/orion_nand.h>
  5361. +#include <asm/plat-orion/time.h>
  5362. +#include "common.h"
  5363. +
  5364. +/*****************************************************************************
  5365. + * I/O Address Mapping
  5366. + ****************************************************************************/
  5367. +static struct map_desc kirkwood_io_desc[] __initdata = {
  5368. + {
  5369. + .virtual = KIRKWOOD_PCIE_IO_VIRT_BASE,
  5370. + .pfn = __phys_to_pfn(KIRKWOOD_PCIE_IO_PHYS_BASE),
  5371. + .length = KIRKWOOD_PCIE_IO_SIZE,
  5372. + .type = MT_DEVICE,
  5373. + }, {
  5374. + .virtual = KIRKWOOD_REGS_VIRT_BASE,
  5375. + .pfn = __phys_to_pfn(KIRKWOOD_REGS_PHYS_BASE),
  5376. + .length = KIRKWOOD_REGS_SIZE,
  5377. + .type = MT_DEVICE,
  5378. + },
  5379. +};
  5380. +
  5381. +void __init kirkwood_map_io(void)
  5382. +{
  5383. + iotable_init(kirkwood_io_desc, ARRAY_SIZE(kirkwood_io_desc));
  5384. +}
  5385. +
  5386. +
  5387. +/*****************************************************************************
  5388. + * EHCI
  5389. + ****************************************************************************/
  5390. +static struct orion_ehci_data kirkwood_ehci_data = {
  5391. + .dram = &kirkwood_mbus_dram_info,
  5392. +};
  5393. +
  5394. +static u64 ehci_dmamask = 0xffffffffUL;
  5395. +
  5396. +
  5397. +/*****************************************************************************
  5398. + * EHCI0
  5399. + ****************************************************************************/
  5400. +static struct resource kirkwood_ehci_resources[] = {
  5401. + {
  5402. + .start = USB_PHYS_BASE,
  5403. + .end = USB_PHYS_BASE + 0x0fff,
  5404. + .flags = IORESOURCE_MEM,
  5405. + }, {
  5406. + .start = IRQ_KIRKWOOD_USB,
  5407. + .end = IRQ_KIRKWOOD_USB,
  5408. + .flags = IORESOURCE_IRQ,
  5409. + },
  5410. +};
  5411. +
  5412. +static struct platform_device kirkwood_ehci = {
  5413. + .name = "orion-ehci",
  5414. + .id = 0,
  5415. + .dev = {
  5416. + .dma_mask = &ehci_dmamask,
  5417. + .coherent_dma_mask = 0xffffffff,
  5418. + .platform_data = &kirkwood_ehci_data,
  5419. + },
  5420. + .resource = kirkwood_ehci_resources,
  5421. + .num_resources = ARRAY_SIZE(kirkwood_ehci_resources),
  5422. +};
  5423. +
  5424. +void __init kirkwood_ehci_init(void)
  5425. +{
  5426. + platform_device_register(&kirkwood_ehci);
  5427. +}
  5428. +
  5429. +
  5430. +/*****************************************************************************
  5431. + * GE00
  5432. + ****************************************************************************/
  5433. +struct mv643xx_eth_shared_platform_data kirkwood_ge00_shared_data = {
  5434. + .t_clk = KIRKWOOD_TCLK,
  5435. + .dram = &kirkwood_mbus_dram_info,
  5436. +};
  5437. +
  5438. +static struct resource kirkwood_ge00_shared_resources[] = {
  5439. + {
  5440. + .name = "ge00 base",
  5441. + .start = GE00_PHYS_BASE + 0x2000,
  5442. + .end = GE00_PHYS_BASE + 0x3fff,
  5443. + .flags = IORESOURCE_MEM,
  5444. + },
  5445. +};
  5446. +
  5447. +static struct platform_device kirkwood_ge00_shared = {
  5448. + .name = MV643XX_ETH_SHARED_NAME,
  5449. + .id = 0,
  5450. + .dev = {
  5451. + .platform_data = &kirkwood_ge00_shared_data,
  5452. + },
  5453. + .num_resources = 1,
  5454. + .resource = kirkwood_ge00_shared_resources,
  5455. +};
  5456. +
  5457. +static struct resource kirkwood_ge00_resources[] = {
  5458. + {
  5459. + .name = "ge00 irq",
  5460. + .start = IRQ_KIRKWOOD_GE00_SUM,
  5461. + .end = IRQ_KIRKWOOD_GE00_SUM,
  5462. + .flags = IORESOURCE_IRQ,
  5463. + },
  5464. +};
  5465. +
  5466. +static struct platform_device kirkwood_ge00 = {
  5467. + .name = MV643XX_ETH_NAME,
  5468. + .id = 0,
  5469. + .num_resources = 1,
  5470. + .resource = kirkwood_ge00_resources,
  5471. +};
  5472. +
  5473. +void __init kirkwood_ge00_init(struct mv643xx_eth_platform_data *eth_data)
  5474. +{
  5475. + eth_data->shared = &kirkwood_ge00_shared;
  5476. + kirkwood_ge00.dev.platform_data = eth_data;
  5477. +
  5478. + platform_device_register(&kirkwood_ge00_shared);
  5479. + platform_device_register(&kirkwood_ge00);
  5480. +}
  5481. +
  5482. +
  5483. +/*****************************************************************************
  5484. + * SoC RTC
  5485. + ****************************************************************************/
  5486. +static struct resource kirkwood_rtc_resource = {
  5487. + .start = RTC_PHYS_BASE,
  5488. + .end = RTC_PHYS_BASE + SZ_16 - 1,
  5489. + .flags = IORESOURCE_MEM,
  5490. +};
  5491. +
  5492. +void __init kirkwood_rtc_init(void)
  5493. +{
  5494. + platform_device_register_simple("rtc-mv", -1, &kirkwood_rtc_resource, 1);
  5495. +}
  5496. +
  5497. +
  5498. +/*****************************************************************************
  5499. + * SATA
  5500. + ****************************************************************************/
  5501. +static struct resource kirkwood_sata_resources[] = {
  5502. + {
  5503. + .name = "sata base",
  5504. + .start = SATA_PHYS_BASE,
  5505. + .end = SATA_PHYS_BASE + 0x5000 - 1,
  5506. + .flags = IORESOURCE_MEM,
  5507. + }, {
  5508. + .name = "sata irq",
  5509. + .start = IRQ_KIRKWOOD_SATA,
  5510. + .end = IRQ_KIRKWOOD_SATA,
  5511. + .flags = IORESOURCE_IRQ,
  5512. + },
  5513. +};
  5514. +
  5515. +static struct platform_device kirkwood_sata = {
  5516. + .name = "sata_mv",
  5517. + .id = 0,
  5518. + .dev = {
  5519. + .coherent_dma_mask = 0xffffffff,
  5520. + },
  5521. + .num_resources = ARRAY_SIZE(kirkwood_sata_resources),
  5522. + .resource = kirkwood_sata_resources,
  5523. +};
  5524. +
  5525. +void __init kirkwood_sata_init(struct mv_sata_platform_data *sata_data)
  5526. +{
  5527. + sata_data->dram = &kirkwood_mbus_dram_info;
  5528. + kirkwood_sata.dev.platform_data = sata_data;
  5529. + platform_device_register(&kirkwood_sata);
  5530. +}
  5531. +
  5532. +
  5533. +/*****************************************************************************
  5534. + * UART0
  5535. + ****************************************************************************/
  5536. +static struct plat_serial8250_port kirkwood_uart0_data[] = {
  5537. + {
  5538. + .mapbase = UART0_PHYS_BASE,
  5539. + .membase = (char *)UART0_VIRT_BASE,
  5540. + .irq = IRQ_KIRKWOOD_UART_0,
  5541. + .flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF,
  5542. + .iotype = UPIO_MEM,
  5543. + .regshift = 2,
  5544. + .uartclk = KIRKWOOD_TCLK,
  5545. + }, {
  5546. + },
  5547. +};
  5548. +
  5549. +static struct resource kirkwood_uart0_resources[] = {
  5550. + {
  5551. + .start = UART0_PHYS_BASE,
  5552. + .end = UART0_PHYS_BASE + 0xff,
  5553. + .flags = IORESOURCE_MEM,
  5554. + }, {
  5555. + .start = IRQ_KIRKWOOD_UART_0,
  5556. + .end = IRQ_KIRKWOOD_UART_0,
  5557. + .flags = IORESOURCE_IRQ,
  5558. + },
  5559. +};
  5560. +
  5561. +static struct platform_device kirkwood_uart0 = {
  5562. + .name = "serial8250",
  5563. + .id = 0,
  5564. + .dev = {
  5565. + .platform_data = kirkwood_uart0_data,
  5566. + },
  5567. + .resource = kirkwood_uart0_resources,
  5568. + .num_resources = ARRAY_SIZE(kirkwood_uart0_resources),
  5569. +};
  5570. +
  5571. +void __init kirkwood_uart0_init(void)
  5572. +{
  5573. + platform_device_register(&kirkwood_uart0);
  5574. +}
  5575. +
  5576. +
  5577. +/*****************************************************************************
  5578. + * UART1
  5579. + ****************************************************************************/
  5580. +static struct plat_serial8250_port kirkwood_uart1_data[] = {
  5581. + {
  5582. + .mapbase = UART1_PHYS_BASE,
  5583. + .membase = (char *)UART1_VIRT_BASE,
  5584. + .irq = IRQ_KIRKWOOD_UART_1,
  5585. + .flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF,
  5586. + .iotype = UPIO_MEM,
  5587. + .regshift = 2,
  5588. + .uartclk = KIRKWOOD_TCLK,
  5589. + }, {
  5590. + },
  5591. +};
  5592. +
  5593. +static struct resource kirkwood_uart1_resources[] = {
  5594. + {
  5595. + .start = UART1_PHYS_BASE,
  5596. + .end = UART1_PHYS_BASE + 0xff,
  5597. + .flags = IORESOURCE_MEM,
  5598. + }, {
  5599. + .start = IRQ_KIRKWOOD_UART_1,
  5600. + .end = IRQ_KIRKWOOD_UART_1,
  5601. + .flags = IORESOURCE_IRQ,
  5602. + },
  5603. +};
  5604. +
  5605. +static struct platform_device kirkwood_uart1 = {
  5606. + .name = "serial8250",
  5607. + .id = 1,
  5608. + .dev = {
  5609. + .platform_data = kirkwood_uart1_data,
  5610. + },
  5611. + .resource = kirkwood_uart1_resources,
  5612. + .num_resources = ARRAY_SIZE(kirkwood_uart1_resources),
  5613. +};
  5614. +
  5615. +void __init kirkwood_uart1_init(void)
  5616. +{
  5617. + platform_device_register(&kirkwood_uart1);
  5618. +}
  5619. +
  5620. +
  5621. +/*****************************************************************************
  5622. + * Time handling
  5623. + ****************************************************************************/
  5624. +static void kirkwood_timer_init(void)
  5625. +{
  5626. + orion_time_init(IRQ_KIRKWOOD_BRIDGE, KIRKWOOD_TCLK);
  5627. +}
  5628. +
  5629. +struct sys_timer kirkwood_timer = {
  5630. + .init = kirkwood_timer_init,
  5631. +};
  5632. +
  5633. +
  5634. +/*****************************************************************************
  5635. + * General
  5636. + ****************************************************************************/
  5637. +static char * __init kirkwood_id(void)
  5638. +{
  5639. + switch (readl(DEVICE_ID) & 0x3) {
  5640. + case 0:
  5641. + return "88F6180";
  5642. + case 1:
  5643. + return "88F6192";
  5644. + case 2:
  5645. + return "88F6281";
  5646. + }
  5647. +
  5648. + return "unknown 88F6000 variant";
  5649. +}
  5650. +
  5651. +void __init kirkwood_init(void)
  5652. +{
  5653. + printk(KERN_INFO "Kirkwood: %s, TCLK=%d.\n",
  5654. + kirkwood_id(), KIRKWOOD_TCLK);
  5655. +
  5656. + kirkwood_setup_cpu_mbus();
  5657. +
  5658. +#ifdef CONFIG_CACHE_FEROCEON_L2
  5659. + feroceon_l2_init(1);
  5660. +#endif
  5661. +}
  5662. --- /dev/null
  5663. +++ b/arch/arm/mach-kirkwood/common.h
  5664. @@ -0,0 +1,42 @@
  5665. +/*
  5666. + * arch/arm/mach-kirkwood/common.h
  5667. + *
  5668. + * Core functions for Marvell Kirkwood SoCs
  5669. + *
  5670. + * This file is licensed under the terms of the GNU General Public
  5671. + * License version 2. This program is licensed "as is" without any
  5672. + * warranty of any kind, whether express or implied.
  5673. + */
  5674. +
  5675. +#ifndef __ARCH_KIRKWOOD_COMMON_H
  5676. +#define __ARCH_KIRKWOOD_COMMON_H
  5677. +
  5678. +struct mv643xx_eth_platform_data;
  5679. +struct mv_sata_platform_data;
  5680. +
  5681. +/*
  5682. + * Basic Kirkwood init functions used early by machine-setup.
  5683. + */
  5684. +void kirkwood_map_io(void);
  5685. +void kirkwood_init(void);
  5686. +void kirkwood_init_irq(void);
  5687. +
  5688. +extern struct mbus_dram_target_info kirkwood_mbus_dram_info;
  5689. +void kirkwood_setup_cpu_mbus(void);
  5690. +void kirkwood_setup_pcie_io_win(int window, u32 base, u32 size,
  5691. + int maj, int min);
  5692. +void kirkwood_setup_pcie_mem_win(int window, u32 base, u32 size,
  5693. + int maj, int min);
  5694. +
  5695. +void kirkwood_ehci_init(void);
  5696. +void kirkwood_ge00_init(struct mv643xx_eth_platform_data *eth_data);
  5697. +void kirkwood_pcie_init(void);
  5698. +void kirkwood_rtc_init(void);
  5699. +void kirkwood_sata_init(struct mv_sata_platform_data *sata_data);
  5700. +void kirkwood_uart0_init(void);
  5701. +void kirkwood_uart1_init(void);
  5702. +
  5703. +extern struct sys_timer kirkwood_timer;
  5704. +
  5705. +
  5706. +#endif
  5707. --- /dev/null
  5708. +++ b/arch/arm/mach-kirkwood/db88f6281-bp-setup.c
  5709. @@ -0,0 +1,68 @@
  5710. +/*
  5711. + * arch/arm/mach-kirkwood/db88f6281-bp-setup.c
  5712. + *
  5713. + * Marvell DB-88F6281-BP Development Board Setup
  5714. + *
  5715. + * This file is licensed under the terms of the GNU General Public
  5716. + * License version 2. This program is licensed "as is" without any
  5717. + * warranty of any kind, whether express or implied.
  5718. + */
  5719. +
  5720. +#include <linux/kernel.h>
  5721. +#include <linux/init.h>
  5722. +#include <linux/platform_device.h>
  5723. +#include <linux/pci.h>
  5724. +#include <linux/irq.h>
  5725. +#include <linux/mtd/physmap.h>
  5726. +#include <linux/mtd/nand.h>
  5727. +#include <linux/timer.h>
  5728. +#include <linux/ata_platform.h>
  5729. +#include <linux/mv643xx_eth.h>
  5730. +#include <asm/mach-types.h>
  5731. +#include <asm/mach/arch.h>
  5732. +#include <asm/mach/pci.h>
  5733. +#include <asm/arch/kirkwood.h>
  5734. +#include "common.h"
  5735. +
  5736. +static struct mv643xx_eth_platform_data db88f6281_ge00_data = {
  5737. + .phy_addr = 8,
  5738. +};
  5739. +
  5740. +static struct mv_sata_platform_data db88f6281_sata_data = {
  5741. + .n_ports = 2,
  5742. +};
  5743. +
  5744. +static void __init db88f6281_init(void)
  5745. +{
  5746. + /*
  5747. + * Basic setup. Needs to be called early.
  5748. + */
  5749. + kirkwood_init();
  5750. +
  5751. + kirkwood_ehci_init();
  5752. + kirkwood_ge00_init(&db88f6281_ge00_data);
  5753. + kirkwood_rtc_init();
  5754. + kirkwood_sata_init(&db88f6281_sata_data);
  5755. + kirkwood_uart0_init();
  5756. + kirkwood_uart1_init();
  5757. +}
  5758. +
  5759. +static int __init db88f6281_pci_init(void)
  5760. +{
  5761. + if (machine_is_db88f6281_bp())
  5762. + kirkwood_pcie_init();
  5763. +
  5764. + return 0;
  5765. +}
  5766. +subsys_initcall(db88f6281_pci_init);
  5767. +
  5768. +MACHINE_START(DB88F6281_BP, "Marvell DB-88F6281-BP Development Board")
  5769. + /* Maintainer: Saeed Bishara <[email protected]> */
  5770. + .phys_io = KIRKWOOD_REGS_PHYS_BASE,
  5771. + .io_pg_offst = ((KIRKWOOD_REGS_VIRT_BASE) >> 18) & 0xfffc,
  5772. + .boot_params = 0x00000100,
  5773. + .init_machine = db88f6281_init,
  5774. + .map_io = kirkwood_map_io,
  5775. + .init_irq = kirkwood_init_irq,
  5776. + .timer = &kirkwood_timer,
  5777. +MACHINE_END
  5778. --- /dev/null
  5779. +++ b/arch/arm/mach-kirkwood/irq.c
  5780. @@ -0,0 +1,22 @@
  5781. +/*
  5782. + * arch/arm/mach-kirkwood/irq.c
  5783. + *
  5784. + * Kirkwood IRQ handling.
  5785. + *
  5786. + * This file is licensed under the terms of the GNU General Public
  5787. + * License version 2. This program is licensed "as is" without any
  5788. + * warranty of any kind, whether express or implied.
  5789. + */
  5790. +
  5791. +#include <linux/kernel.h>
  5792. +#include <linux/init.h>
  5793. +#include <linux/irq.h>
  5794. +#include <linux/io.h>
  5795. +#include <asm/plat-orion/irq.h>
  5796. +#include "common.h"
  5797. +
  5798. +void __init kirkwood_init_irq(void)
  5799. +{
  5800. + orion_irq_init(0, (void __iomem *)(IRQ_VIRT_BASE + IRQ_MASK_LOW_OFF));
  5801. + orion_irq_init(32, (void __iomem *)(IRQ_VIRT_BASE + IRQ_MASK_HIGH_OFF));
  5802. +}
  5803. --- /dev/null
  5804. +++ b/arch/arm/mach-kirkwood/pcie.c
  5805. @@ -0,0 +1,180 @@
  5806. +/*
  5807. + * arch/arm/mach-kirkwood/pcie.c
  5808. + *
  5809. + * PCIe functions for Marvell Kirkwood SoCs
  5810. + *
  5811. + * This file is licensed under the terms of the GNU General Public
  5812. + * License version 2. This program is licensed "as is" without any
  5813. + * warranty of any kind, whether express or implied.
  5814. + */
  5815. +
  5816. +#include <linux/kernel.h>
  5817. +#include <linux/pci.h>
  5818. +#include <linux/mbus.h>
  5819. +#include <asm/mach/pci.h>
  5820. +#include <asm/plat-orion/pcie.h>
  5821. +#include "common.h"
  5822. +
  5823. +
  5824. +#define PCIE_BASE ((void __iomem *)PCIE_VIRT_BASE)
  5825. +
  5826. +static int pcie_valid_config(int bus, int dev)
  5827. +{
  5828. + /*
  5829. + * Don't go out when trying to access --
  5830. + * 1. nonexisting device on local bus
  5831. + * 2. where there's no device connected (no link)
  5832. + */
  5833. + if (bus == 0 && dev == 0)
  5834. + return 1;
  5835. +
  5836. + if (!orion_pcie_link_up(PCIE_BASE))
  5837. + return 0;
  5838. +
  5839. + if (bus == 0 && dev != 1)
  5840. + return 0;
  5841. +
  5842. + return 1;
  5843. +}
  5844. +
  5845. +
  5846. +/*
  5847. + * PCIe config cycles are done by programming the PCIE_CONF_ADDR register
  5848. + * and then reading the PCIE_CONF_DATA register. Need to make sure these
  5849. + * transactions are atomic.
  5850. + */
  5851. +static DEFINE_SPINLOCK(kirkwood_pcie_lock);
  5852. +
  5853. +static int pcie_rd_conf(struct pci_bus *bus, u32 devfn, int where,
  5854. + int size, u32 *val)
  5855. +{
  5856. + unsigned long flags;
  5857. + int ret;
  5858. +
  5859. + if (pcie_valid_config(bus->number, PCI_SLOT(devfn)) == 0) {
  5860. + *val = 0xffffffff;
  5861. + return PCIBIOS_DEVICE_NOT_FOUND;
  5862. + }
  5863. +
  5864. + spin_lock_irqsave(&kirkwood_pcie_lock, flags);
  5865. + ret = orion_pcie_rd_conf(PCIE_BASE, bus, devfn, where, size, val);
  5866. + spin_unlock_irqrestore(&kirkwood_pcie_lock, flags);
  5867. +
  5868. + return ret;
  5869. +}
  5870. +
  5871. +static int pcie_wr_conf(struct pci_bus *bus, u32 devfn,
  5872. + int where, int size, u32 val)
  5873. +{
  5874. + unsigned long flags;
  5875. + int ret;
  5876. +
  5877. + if (pcie_valid_config(bus->number, PCI_SLOT(devfn)) == 0)
  5878. + return PCIBIOS_DEVICE_NOT_FOUND;
  5879. +
  5880. + spin_lock_irqsave(&kirkwood_pcie_lock, flags);
  5881. + ret = orion_pcie_wr_conf(PCIE_BASE, bus, devfn, where, size, val);
  5882. + spin_unlock_irqrestore(&kirkwood_pcie_lock, flags);
  5883. +
  5884. + return ret;
  5885. +}
  5886. +
  5887. +static struct pci_ops pcie_ops = {
  5888. + .read = pcie_rd_conf,
  5889. + .write = pcie_wr_conf,
  5890. +};
  5891. +
  5892. +
  5893. +static int kirkwood_pcie_setup(int nr, struct pci_sys_data *sys)
  5894. +{
  5895. + struct resource *res;
  5896. +
  5897. + /*
  5898. + * Generic PCIe unit setup.
  5899. + */
  5900. + orion_pcie_setup(PCIE_BASE, &kirkwood_mbus_dram_info);
  5901. +
  5902. + /*
  5903. + * Request resources.
  5904. + */
  5905. + res = kzalloc(sizeof(struct resource) * 2, GFP_KERNEL);
  5906. + if (!res)
  5907. + panic("pcie_setup unable to alloc resources");
  5908. +
  5909. + /*
  5910. + * IORESOURCE_IO
  5911. + */
  5912. + res[0].name = "PCIe I/O Space";
  5913. + res[0].flags = IORESOURCE_IO;
  5914. + res[0].start = KIRKWOOD_PCIE_IO_PHYS_BASE;
  5915. + res[0].end = res[0].start + KIRKWOOD_PCIE_IO_SIZE - 1;
  5916. + if (request_resource(&ioport_resource, &res[0]))
  5917. + panic("Request PCIe IO resource failed\n");
  5918. + sys->resource[0] = &res[0];
  5919. +
  5920. + /*
  5921. + * IORESOURCE_MEM
  5922. + */
  5923. + res[1].name = "PCIe Memory Space";
  5924. + res[1].flags = IORESOURCE_MEM;
  5925. + res[1].start = KIRKWOOD_PCIE_MEM_PHYS_BASE;
  5926. + res[1].end = res[1].start + KIRKWOOD_PCIE_MEM_SIZE - 1;
  5927. + if (request_resource(&iomem_resource, &res[1]))
  5928. + panic("Request PCIe Memory resource failed\n");
  5929. + sys->resource[1] = &res[1];
  5930. +
  5931. + sys->resource[2] = NULL;
  5932. + sys->io_offset = 0;
  5933. +
  5934. + return 1;
  5935. +}
  5936. +
  5937. +static void __devinit rc_pci_fixup(struct pci_dev *dev)
  5938. +{
  5939. + /*
  5940. + * Prevent enumeration of root complex.
  5941. + */
  5942. + if (dev->bus->parent == NULL && dev->devfn == 0) {
  5943. + int i;
  5944. +
  5945. + for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
  5946. + dev->resource[i].start = 0;
  5947. + dev->resource[i].end = 0;
  5948. + dev->resource[i].flags = 0;
  5949. + }
  5950. + }
  5951. +}
  5952. +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MARVELL, PCI_ANY_ID, rc_pci_fixup);
  5953. +
  5954. +static struct pci_bus __init *
  5955. +kirkwood_pcie_scan_bus(int nr, struct pci_sys_data *sys)
  5956. +{
  5957. + struct pci_bus *bus;
  5958. +
  5959. + if (nr == 0) {
  5960. + bus = pci_scan_bus(sys->busnr, &pcie_ops, sys);
  5961. + } else {
  5962. + bus = NULL;
  5963. + BUG();
  5964. + }
  5965. +
  5966. + return bus;
  5967. +}
  5968. +
  5969. +static int __init kirkwood_pcie_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
  5970. +{
  5971. + return IRQ_KIRKWOOD_PCIE;
  5972. +}
  5973. +
  5974. +static struct hw_pci kirkwood_pci __initdata = {
  5975. + .nr_controllers = 1,
  5976. + .swizzle = pci_std_swizzle,
  5977. + .setup = kirkwood_pcie_setup,
  5978. + .scan = kirkwood_pcie_scan_bus,
  5979. + .map_irq = kirkwood_pcie_map_irq,
  5980. +};
  5981. +
  5982. +void __init kirkwood_pcie_init(void)
  5983. +{
  5984. + pci_common_init(&kirkwood_pci);
  5985. +}
  5986. --- /dev/null
  5987. +++ b/arch/arm/mach-kirkwood/rd88f6192-nas-setup.c
  5988. @@ -0,0 +1,69 @@
  5989. +/*
  5990. + * arch/arm/mach-kirkwood/rd88f6192-nas-setup.c
  5991. + *
  5992. + * Marvell RD-88F6192-NAS Reference Board Setup
  5993. + *
  5994. + * This file is licensed under the terms of the GNU General Public
  5995. + * License version 2. This program is licensed "as is" without any
  5996. + * warranty of any kind, whether express or implied.
  5997. + */
  5998. +
  5999. +#include <linux/kernel.h>
  6000. +#include <linux/init.h>
  6001. +#include <linux/platform_device.h>
  6002. +#include <linux/pci.h>
  6003. +#include <linux/irq.h>
  6004. +#include <linux/mtd/physmap.h>
  6005. +#include <linux/mtd/nand.h>
  6006. +#include <linux/timer.h>
  6007. +#include <linux/ata_platform.h>
  6008. +#include <linux/mv643xx_eth.h>
  6009. +#include <asm/mach-types.h>
  6010. +#include <asm/mach/arch.h>
  6011. +#include <asm/mach/pci.h>
  6012. +#include <asm/arch/kirkwood.h>
  6013. +#include "common.h"
  6014. +
  6015. +#define RD88F6192_GPIO_USB_VBUS 10
  6016. +
  6017. +static struct mv643xx_eth_platform_data rd88f6192_ge00_data = {
  6018. + .phy_addr = 8,
  6019. +};
  6020. +
  6021. +static struct mv_sata_platform_data rd88f6192_sata_data = {
  6022. + .n_ports = 2,
  6023. +};
  6024. +
  6025. +static void __init rd88f6192_init(void)
  6026. +{
  6027. + /*
  6028. + * Basic setup. Needs to be called early.
  6029. + */
  6030. + kirkwood_init();
  6031. +
  6032. + kirkwood_ehci_init();
  6033. + kirkwood_ge00_init(&rd88f6192_ge00_data);
  6034. + kirkwood_rtc_init();
  6035. + kirkwood_sata_init(&rd88f6192_sata_data);
  6036. + kirkwood_uart0_init();
  6037. +}
  6038. +
  6039. +static int __init rd88f6192_pci_init(void)
  6040. +{
  6041. + if (machine_is_rd88f6192_nas())
  6042. + kirkwood_pcie_init();
  6043. +
  6044. + return 0;
  6045. +}
  6046. +subsys_initcall(rd88f6192_pci_init);
  6047. +
  6048. +MACHINE_START(RD88F6192_NAS, "Marvell RD-88F6192-NAS Development Board")
  6049. + /* Maintainer: Saeed Bishara <[email protected]> */
  6050. + .phys_io = KIRKWOOD_REGS_PHYS_BASE,
  6051. + .io_pg_offst = ((KIRKWOOD_REGS_VIRT_BASE) >> 18) & 0xfffc,
  6052. + .boot_params = 0x00000100,
  6053. + .init_machine = rd88f6192_init,
  6054. + .map_io = kirkwood_map_io,
  6055. + .init_irq = kirkwood_init_irq,
  6056. + .timer = &kirkwood_timer,
  6057. +MACHINE_END
  6058. --- /dev/null
  6059. +++ b/arch/arm/mach-kirkwood/rd88f6281-setup.c
  6060. @@ -0,0 +1,112 @@
  6061. +/*
  6062. + * arch/arm/mach-kirkwood/rd88f6281-setup.c
  6063. + *
  6064. + * Marvell RD-88F6281 Reference Board Setup
  6065. + *
  6066. + * This file is licensed under the terms of the GNU General Public
  6067. + * License version 2. This program is licensed "as is" without any
  6068. + * warranty of any kind, whether express or implied.
  6069. + */
  6070. +
  6071. +#include <linux/kernel.h>
  6072. +#include <linux/init.h>
  6073. +#include <linux/platform_device.h>
  6074. +#include <linux/pci.h>
  6075. +#include <linux/irq.h>
  6076. +#include <linux/mtd/physmap.h>
  6077. +#include <linux/mtd/nand.h>
  6078. +#include <linux/timer.h>
  6079. +#include <linux/ata_platform.h>
  6080. +#include <linux/mv643xx_eth.h>
  6081. +#include <asm/mach-types.h>
  6082. +#include <asm/mach/arch.h>
  6083. +#include <asm/mach/pci.h>
  6084. +#include <asm/arch/kirkwood.h>
  6085. +#include <asm/plat-orion/orion_nand.h>
  6086. +#include "common.h"
  6087. +
  6088. +static struct mtd_partition rd88f6281_nand_parts[] = {
  6089. + {
  6090. + .name = "u-boot",
  6091. + .offset = 0,
  6092. + .size = SZ_1M
  6093. + }, {
  6094. + .name = "uImage",
  6095. + .offset = MTDPART_OFS_NXTBLK,
  6096. + .size = SZ_2M
  6097. + }, {
  6098. + .name = "root",
  6099. + .offset = MTDPART_OFS_NXTBLK,
  6100. + .size = MTDPART_SIZ_FULL
  6101. + },
  6102. +};
  6103. +
  6104. +static struct resource rd88f6281_nand_resource = {
  6105. + .flags = IORESOURCE_MEM,
  6106. + .start = KIRKWOOD_NAND_MEM_PHYS_BASE,
  6107. + .end = KIRKWOOD_NAND_MEM_PHYS_BASE +
  6108. + KIRKWOOD_NAND_MEM_SIZE - 1,
  6109. +};
  6110. +
  6111. +static struct orion_nand_data rd88f6281_nand_data = {
  6112. + .parts = rd88f6281_nand_parts,
  6113. + .nr_parts = ARRAY_SIZE(rd88f6281_nand_parts),
  6114. + .cle = 0,
  6115. + .ale = 1,
  6116. + .width = 8,
  6117. +};
  6118. +
  6119. +static struct platform_device rd88f6281_nand_flash = {
  6120. + .name = "orion_nand",
  6121. + .id = -1,
  6122. + .dev = {
  6123. + .platform_data = &rd88f6281_nand_data,
  6124. + },
  6125. + .resource = &rd88f6281_nand_resource,
  6126. + .num_resources = 1,
  6127. +};
  6128. +
  6129. +static struct mv643xx_eth_platform_data rd88f6281_ge00_data = {
  6130. + .phy_addr = -1,
  6131. +};
  6132. +
  6133. +static struct mv_sata_platform_data rd88f6281_sata_data = {
  6134. + .n_ports = 2,
  6135. +};
  6136. +
  6137. +static void __init rd88f6281_init(void)
  6138. +{
  6139. + /*
  6140. + * Basic setup. Needs to be called early.
  6141. + */
  6142. + kirkwood_init();
  6143. +
  6144. + kirkwood_ehci_init();
  6145. + kirkwood_ge00_init(&rd88f6281_ge00_data);
  6146. + kirkwood_rtc_init();
  6147. + kirkwood_sata_init(&rd88f6281_sata_data);
  6148. + kirkwood_uart0_init();
  6149. + kirkwood_uart1_init();
  6150. +
  6151. + platform_device_register(&rd88f6281_nand_flash);
  6152. +}
  6153. +
  6154. +static int __init rd88f6281_pci_init(void)
  6155. +{
  6156. + if (machine_is_rd88f6281())
  6157. + kirkwood_pcie_init();
  6158. +
  6159. + return 0;
  6160. +}
  6161. +subsys_initcall(rd88f6281_pci_init);
  6162. +
  6163. +MACHINE_START(RD88F6281, "Marvell RD-88F6281 Reference Board")
  6164. + /* Maintainer: Saeed Bishara <[email protected]> */
  6165. + .phys_io = KIRKWOOD_REGS_PHYS_BASE,
  6166. + .io_pg_offst = ((KIRKWOOD_REGS_VIRT_BASE) >> 18) & 0xfffc,
  6167. + .boot_params = 0x00000100,
  6168. + .init_machine = rd88f6281_init,
  6169. + .map_io = kirkwood_map_io,
  6170. + .init_irq = kirkwood_init_irq,
  6171. + .timer = &kirkwood_timer,
  6172. +MACHINE_END
  6173. --- /dev/null
  6174. +++ b/arch/arm/mach-loki/Kconfig
  6175. @@ -0,0 +1,13 @@
  6176. +if ARCH_LOKI
  6177. +
  6178. +menu "Marvell Loki (88RC8480) Implementations"
  6179. +
  6180. +config MACH_LB88RC8480
  6181. + bool "Marvell LB88RC8480 Development Board"
  6182. + help
  6183. + Say 'Y' here if you want your kernel to support the
  6184. + Marvell LB88RC8480 Development Board.
  6185. +
  6186. +endmenu
  6187. +
  6188. +endif
  6189. --- /dev/null
  6190. +++ b/arch/arm/mach-loki/Makefile
  6191. @@ -0,0 +1,3 @@
  6192. +obj-y += common.o addr-map.o irq.o
  6193. +
  6194. +obj-$(CONFIG_MACH_LB88RC8480) += lb88rc8480-setup.o
  6195. --- /dev/null
  6196. +++ b/arch/arm/mach-loki/Makefile.boot
  6197. @@ -0,0 +1,3 @@
  6198. + zreladdr-y := 0x00008000
  6199. +params_phys-y := 0x00000100
  6200. +initrd_phys-y := 0x00800000
  6201. --- /dev/null
  6202. +++ b/arch/arm/mach-loki/addr-map.c
  6203. @@ -0,0 +1,121 @@
  6204. +/*
  6205. + * arch/arm/mach-loki/addr-map.c
  6206. + *
  6207. + * Address map functions for Marvell Loki (88RC8480) SoCs
  6208. + *
  6209. + * This file is licensed under the terms of the GNU General Public
  6210. + * License version 2. This program is licensed "as is" without any
  6211. + * warranty of any kind, whether express or implied.
  6212. + */
  6213. +
  6214. +#include <linux/kernel.h>
  6215. +#include <linux/init.h>
  6216. +#include <linux/mbus.h>
  6217. +#include <asm/hardware.h>
  6218. +#include <asm/io.h>
  6219. +#include "common.h"
  6220. +
  6221. +/*
  6222. + * Generic Address Decode Windows bit settings
  6223. + */
  6224. +#define TARGET_DDR 0
  6225. +#define TARGET_DEV_BUS 1
  6226. +#define TARGET_PCIE0 3
  6227. +#define TARGET_PCIE1 4
  6228. +#define ATTR_DEV_BOOT 0x0f
  6229. +#define ATTR_DEV_CS2 0x1b
  6230. +#define ATTR_DEV_CS1 0x1d
  6231. +#define ATTR_DEV_CS0 0x1e
  6232. +#define ATTR_PCIE_IO 0x51
  6233. +#define ATTR_PCIE_MEM 0x59
  6234. +
  6235. +/*
  6236. + * Helpers to get DDR bank info
  6237. + */
  6238. +#define DDR_SIZE_CS(n) DDR_REG(0x1500 + ((n) << 3))
  6239. +#define DDR_BASE_CS(n) DDR_REG(0x1504 + ((n) << 3))
  6240. +
  6241. +/*
  6242. + * CPU Address Decode Windows registers
  6243. + */
  6244. +#define CPU_WIN_CTRL(n) BRIDGE_REG(0x000 | ((n) << 4))
  6245. +#define CPU_WIN_BASE(n) BRIDGE_REG(0x004 | ((n) << 4))
  6246. +#define CPU_WIN_REMAP_LO(n) BRIDGE_REG(0x008 | ((n) << 4))
  6247. +#define CPU_WIN_REMAP_HI(n) BRIDGE_REG(0x00c | ((n) << 4))
  6248. +
  6249. +
  6250. +struct mbus_dram_target_info loki_mbus_dram_info;
  6251. +
  6252. +static void __init setup_cpu_win(int win, u32 base, u32 size,
  6253. + u8 target, u8 attr, int remap)
  6254. +{
  6255. + u32 ctrl;
  6256. +
  6257. + base &= 0xffff0000;
  6258. + ctrl = ((size - 1) & 0xffff0000) | (attr << 8) | (1 << 5) | target;
  6259. +
  6260. + writel(base, CPU_WIN_BASE(win));
  6261. + writel(ctrl, CPU_WIN_CTRL(win));
  6262. + if (win < 2) {
  6263. + if (remap < 0)
  6264. + remap = base;
  6265. +
  6266. + writel(remap & 0xffff0000, CPU_WIN_REMAP_LO(win));
  6267. + writel(0, CPU_WIN_REMAP_HI(win));
  6268. + }
  6269. +}
  6270. +
  6271. +void __init loki_setup_cpu_mbus(void)
  6272. +{
  6273. + int i;
  6274. + int cs;
  6275. +
  6276. + /*
  6277. + * First, disable and clear windows.
  6278. + */
  6279. + for (i = 0; i < 8; i++) {
  6280. + writel(0, CPU_WIN_BASE(i));
  6281. + writel(0, CPU_WIN_CTRL(i));
  6282. + if (i < 2) {
  6283. + writel(0, CPU_WIN_REMAP_LO(i));
  6284. + writel(0, CPU_WIN_REMAP_HI(i));
  6285. + }
  6286. + }
  6287. +
  6288. + /*
  6289. + * Setup windows for PCIe IO+MEM space.
  6290. + */
  6291. + setup_cpu_win(2, LOKI_PCIE0_MEM_PHYS_BASE, LOKI_PCIE0_MEM_SIZE,
  6292. + TARGET_PCIE0, ATTR_PCIE_MEM, -1);
  6293. + setup_cpu_win(3, LOKI_PCIE1_MEM_PHYS_BASE, LOKI_PCIE1_MEM_SIZE,
  6294. + TARGET_PCIE1, ATTR_PCIE_MEM, -1);
  6295. +
  6296. + /*
  6297. + * Setup MBUS dram target info.
  6298. + */
  6299. + loki_mbus_dram_info.mbus_dram_target_id = TARGET_DDR;
  6300. +
  6301. + for (i = 0, cs = 0; i < 4; i++) {
  6302. + u32 base = readl(DDR_BASE_CS(i));
  6303. + u32 size = readl(DDR_SIZE_CS(i));
  6304. +
  6305. + /*
  6306. + * Chip select enabled?
  6307. + */
  6308. + if (size & 1) {
  6309. + struct mbus_dram_window *w;
  6310. +
  6311. + w = &loki_mbus_dram_info.cs[cs++];
  6312. + w->cs_index = i;
  6313. + w->mbus_attr = 0xf & ~(1 << i);
  6314. + w->base = base & 0xffff0000;
  6315. + w->size = (size | 0x0000ffff) + 1;
  6316. + }
  6317. + }
  6318. + loki_mbus_dram_info.num_cs = cs;
  6319. +}
  6320. +
  6321. +void __init loki_setup_dev_boot_win(u32 base, u32 size)
  6322. +{
  6323. + setup_cpu_win(4, base, size, TARGET_DEV_BUS, ATTR_DEV_BOOT, -1);
  6324. +}
  6325. --- /dev/null
  6326. +++ b/arch/arm/mach-loki/common.c
  6327. @@ -0,0 +1,305 @@
  6328. +/*
  6329. + * arch/arm/mach-loki/common.c
  6330. + *
  6331. + * Core functions for Marvell Loki (88RC8480) SoCs
  6332. + *
  6333. + * This file is licensed under the terms of the GNU General Public
  6334. + * License version 2. This program is licensed "as is" without any
  6335. + * warranty of any kind, whether express or implied.
  6336. + */
  6337. +
  6338. +#include <linux/kernel.h>
  6339. +#include <linux/init.h>
  6340. +#include <linux/platform_device.h>
  6341. +#include <linux/serial_8250.h>
  6342. +#include <linux/mbus.h>
  6343. +#include <linux/mv643xx_eth.h>
  6344. +#include <asm/page.h>
  6345. +#include <asm/timex.h>
  6346. +#include <asm/mach/map.h>
  6347. +#include <asm/mach/time.h>
  6348. +#include <asm/arch/loki.h>
  6349. +#include <asm/plat-orion/orion_nand.h>
  6350. +#include <asm/plat-orion/time.h>
  6351. +#include "common.h"
  6352. +
  6353. +/*****************************************************************************
  6354. + * I/O Address Mapping
  6355. + ****************************************************************************/
  6356. +static struct map_desc loki_io_desc[] __initdata = {
  6357. + {
  6358. + .virtual = LOKI_REGS_VIRT_BASE,
  6359. + .pfn = __phys_to_pfn(LOKI_REGS_PHYS_BASE),
  6360. + .length = LOKI_REGS_SIZE,
  6361. + .type = MT_DEVICE,
  6362. + },
  6363. +};
  6364. +
  6365. +void __init loki_map_io(void)
  6366. +{
  6367. + iotable_init(loki_io_desc, ARRAY_SIZE(loki_io_desc));
  6368. +}
  6369. +
  6370. +
  6371. +/*****************************************************************************
  6372. + * GE0
  6373. + ****************************************************************************/
  6374. +struct mv643xx_eth_shared_platform_data loki_ge0_shared_data = {
  6375. + .t_clk = LOKI_TCLK,
  6376. + .dram = &loki_mbus_dram_info,
  6377. +};
  6378. +
  6379. +static struct resource loki_ge0_shared_resources[] = {
  6380. + {
  6381. + .name = "ge0 base",
  6382. + .start = GE0_PHYS_BASE + 0x2000,
  6383. + .end = GE0_PHYS_BASE + 0x3fff,
  6384. + .flags = IORESOURCE_MEM,
  6385. + },
  6386. +};
  6387. +
  6388. +static struct platform_device loki_ge0_shared = {
  6389. + .name = MV643XX_ETH_SHARED_NAME,
  6390. + .id = 0,
  6391. + .dev = {
  6392. + .platform_data = &loki_ge0_shared_data,
  6393. + },
  6394. + .num_resources = 1,
  6395. + .resource = loki_ge0_shared_resources,
  6396. +};
  6397. +
  6398. +static struct resource loki_ge0_resources[] = {
  6399. + {
  6400. + .name = "ge0 irq",
  6401. + .start = IRQ_LOKI_GBE_A_INT,
  6402. + .end = IRQ_LOKI_GBE_A_INT,
  6403. + .flags = IORESOURCE_IRQ,
  6404. + },
  6405. +};
  6406. +
  6407. +static struct platform_device loki_ge0 = {
  6408. + .name = MV643XX_ETH_NAME,
  6409. + .id = 0,
  6410. + .num_resources = 1,
  6411. + .resource = loki_ge0_resources,
  6412. +};
  6413. +
  6414. +void __init loki_ge0_init(struct mv643xx_eth_platform_data *eth_data)
  6415. +{
  6416. + eth_data->shared = &loki_ge0_shared;
  6417. + loki_ge0.dev.platform_data = eth_data;
  6418. +
  6419. + writel(0x00079220, GE0_VIRT_BASE + 0x20b0);
  6420. + platform_device_register(&loki_ge0_shared);
  6421. + platform_device_register(&loki_ge0);
  6422. +}
  6423. +
  6424. +
  6425. +/*****************************************************************************
  6426. + * GE1
  6427. + ****************************************************************************/
  6428. +struct mv643xx_eth_shared_platform_data loki_ge1_shared_data = {
  6429. + .t_clk = LOKI_TCLK,
  6430. + .dram = &loki_mbus_dram_info,
  6431. +};
  6432. +
  6433. +static struct resource loki_ge1_shared_resources[] = {
  6434. + {
  6435. + .name = "ge1 base",
  6436. + .start = GE1_PHYS_BASE + 0x2000,
  6437. + .end = GE1_PHYS_BASE + 0x3fff,
  6438. + .flags = IORESOURCE_MEM,
  6439. + },
  6440. +};
  6441. +
  6442. +static struct platform_device loki_ge1_shared = {
  6443. + .name = MV643XX_ETH_SHARED_NAME,
  6444. + .id = 1,
  6445. + .dev = {
  6446. + .platform_data = &loki_ge1_shared_data,
  6447. + },
  6448. + .num_resources = 1,
  6449. + .resource = loki_ge1_shared_resources,
  6450. +};
  6451. +
  6452. +static struct resource loki_ge1_resources[] = {
  6453. + {
  6454. + .name = "ge1 irq",
  6455. + .start = IRQ_LOKI_GBE_B_INT,
  6456. + .end = IRQ_LOKI_GBE_B_INT,
  6457. + .flags = IORESOURCE_IRQ,
  6458. + },
  6459. +};
  6460. +
  6461. +static struct platform_device loki_ge1 = {
  6462. + .name = MV643XX_ETH_NAME,
  6463. + .id = 1,
  6464. + .num_resources = 1,
  6465. + .resource = loki_ge1_resources,
  6466. +};
  6467. +
  6468. +void __init loki_ge1_init(struct mv643xx_eth_platform_data *eth_data)
  6469. +{
  6470. + eth_data->shared = &loki_ge1_shared;
  6471. + loki_ge1.dev.platform_data = eth_data;
  6472. +
  6473. + writel(0x00079220, GE1_VIRT_BASE + 0x20b0);
  6474. + platform_device_register(&loki_ge1_shared);
  6475. + platform_device_register(&loki_ge1);
  6476. +}
  6477. +
  6478. +
  6479. +/*****************************************************************************
  6480. + * SAS/SATA
  6481. + ****************************************************************************/
  6482. +static struct resource loki_sas_resources[] = {
  6483. + {
  6484. + .name = "mvsas0 mem",
  6485. + .start = SAS0_PHYS_BASE,
  6486. + .end = SAS0_PHYS_BASE + 0x01ff,
  6487. + .flags = IORESOURCE_MEM,
  6488. + }, {
  6489. + .name = "mvsas0 irq",
  6490. + .start = IRQ_LOKI_SAS_A,
  6491. + .end = IRQ_LOKI_SAS_A,
  6492. + .flags = IORESOURCE_IRQ,
  6493. + }, {
  6494. + .name = "mvsas1 mem",
  6495. + .start = SAS1_PHYS_BASE,
  6496. + .end = SAS1_PHYS_BASE + 0x01ff,
  6497. + .flags = IORESOURCE_MEM,
  6498. + }, {
  6499. + .name = "mvsas1 irq",
  6500. + .start = IRQ_LOKI_SAS_B,
  6501. + .end = IRQ_LOKI_SAS_B,
  6502. + .flags = IORESOURCE_IRQ,
  6503. + },
  6504. +};
  6505. +
  6506. +static struct platform_device loki_sas = {
  6507. + .name = "mvsas",
  6508. + .id = 0,
  6509. + .dev = {
  6510. + .coherent_dma_mask = 0xffffffff,
  6511. + },
  6512. + .num_resources = ARRAY_SIZE(loki_sas_resources),
  6513. + .resource = loki_sas_resources,
  6514. +};
  6515. +
  6516. +void __init loki_sas_init(void)
  6517. +{
  6518. + writel(0x8300f707, DDR_REG(0x1424));
  6519. + platform_device_register(&loki_sas);
  6520. +}
  6521. +
  6522. +
  6523. +/*****************************************************************************
  6524. + * UART0
  6525. + ****************************************************************************/
  6526. +static struct plat_serial8250_port loki_uart0_data[] = {
  6527. + {
  6528. + .mapbase = UART0_PHYS_BASE,
  6529. + .membase = (char *)UART0_VIRT_BASE,
  6530. + .irq = IRQ_LOKI_UART0,
  6531. + .flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF,
  6532. + .iotype = UPIO_MEM,
  6533. + .regshift = 2,
  6534. + .uartclk = LOKI_TCLK,
  6535. + }, {
  6536. + },
  6537. +};
  6538. +
  6539. +static struct resource loki_uart0_resources[] = {
  6540. + {
  6541. + .start = UART0_PHYS_BASE,
  6542. + .end = UART0_PHYS_BASE + 0xff,
  6543. + .flags = IORESOURCE_MEM,
  6544. + }, {
  6545. + .start = IRQ_LOKI_UART0,
  6546. + .end = IRQ_LOKI_UART0,
  6547. + .flags = IORESOURCE_IRQ,
  6548. + },
  6549. +};
  6550. +
  6551. +static struct platform_device loki_uart0 = {
  6552. + .name = "serial8250",
  6553. + .id = 0,
  6554. + .dev = {
  6555. + .platform_data = loki_uart0_data,
  6556. + },
  6557. + .resource = loki_uart0_resources,
  6558. + .num_resources = ARRAY_SIZE(loki_uart0_resources),
  6559. +};
  6560. +
  6561. +void __init loki_uart0_init(void)
  6562. +{
  6563. + platform_device_register(&loki_uart0);
  6564. +}
  6565. +
  6566. +
  6567. +/*****************************************************************************
  6568. + * UART1
  6569. + ****************************************************************************/
  6570. +static struct plat_serial8250_port loki_uart1_data[] = {
  6571. + {
  6572. + .mapbase = UART1_PHYS_BASE,
  6573. + .membase = (char *)UART1_VIRT_BASE,
  6574. + .irq = IRQ_LOKI_UART1,
  6575. + .flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF,
  6576. + .iotype = UPIO_MEM,
  6577. + .regshift = 2,
  6578. + .uartclk = LOKI_TCLK,
  6579. + }, {
  6580. + },
  6581. +};
  6582. +
  6583. +static struct resource loki_uart1_resources[] = {
  6584. + {
  6585. + .start = UART1_PHYS_BASE,
  6586. + .end = UART1_PHYS_BASE + 0xff,
  6587. + .flags = IORESOURCE_MEM,
  6588. + }, {
  6589. + .start = IRQ_LOKI_UART1,
  6590. + .end = IRQ_LOKI_UART1,
  6591. + .flags = IORESOURCE_IRQ,
  6592. + },
  6593. +};
  6594. +
  6595. +static struct platform_device loki_uart1 = {
  6596. + .name = "serial8250",
  6597. + .id = 1,
  6598. + .dev = {
  6599. + .platform_data = loki_uart1_data,
  6600. + },
  6601. + .resource = loki_uart1_resources,
  6602. + .num_resources = ARRAY_SIZE(loki_uart1_resources),
  6603. +};
  6604. +
  6605. +void __init loki_uart1_init(void)
  6606. +{
  6607. + platform_device_register(&loki_uart1);
  6608. +}
  6609. +
  6610. +
  6611. +/*****************************************************************************
  6612. + * Time handling
  6613. + ****************************************************************************/
  6614. +static void loki_timer_init(void)
  6615. +{
  6616. + orion_time_init(IRQ_LOKI_BRIDGE, LOKI_TCLK);
  6617. +}
  6618. +
  6619. +struct sys_timer loki_timer = {
  6620. + .init = loki_timer_init,
  6621. +};
  6622. +
  6623. +
  6624. +/*****************************************************************************
  6625. + * General
  6626. + ****************************************************************************/
  6627. +void __init loki_init(void)
  6628. +{
  6629. + printk(KERN_INFO "Loki ID: 88RC8480. TCLK=%d.\n", LOKI_TCLK);
  6630. +
  6631. + loki_setup_cpu_mbus();
  6632. +}
  6633. --- /dev/null
  6634. +++ b/arch/arm/mach-loki/common.h
  6635. @@ -0,0 +1,36 @@
  6636. +/*
  6637. + * arch/arm/mach-loki/common.h
  6638. + *
  6639. + * Core functions for Marvell Loki (88RC8480) SoCs
  6640. + *
  6641. + * This file is licensed under the terms of the GNU General Public
  6642. + * License version 2. This program is licensed "as is" without any
  6643. + * warranty of any kind, whether express or implied.
  6644. + */
  6645. +
  6646. +#ifndef __ARCH_LOKI_COMMON_H
  6647. +#define __ARCH_LOKI_COMMON_H
  6648. +
  6649. +struct mv643xx_eth_platform_data;
  6650. +
  6651. +/*
  6652. + * Basic Loki init functions used early by machine-setup.
  6653. + */
  6654. +void loki_map_io(void);
  6655. +void loki_init(void);
  6656. +void loki_init_irq(void);
  6657. +
  6658. +extern struct mbus_dram_target_info loki_mbus_dram_info;
  6659. +void loki_setup_cpu_mbus(void);
  6660. +void loki_setup_dev_boot_win(u32 base, u32 size);
  6661. +
  6662. +void loki_ge0_init(struct mv643xx_eth_platform_data *eth_data);
  6663. +void loki_ge1_init(struct mv643xx_eth_platform_data *eth_data);
  6664. +void loki_sas_init(void);
  6665. +void loki_uart0_init(void);
  6666. +void loki_uart1_init(void);
  6667. +
  6668. +extern struct sys_timer loki_timer;
  6669. +
  6670. +
  6671. +#endif
  6672. --- /dev/null
  6673. +++ b/arch/arm/mach-loki/irq.c
  6674. @@ -0,0 +1,21 @@
  6675. +/*
  6676. + * arch/arm/mach-loki/irq.c
  6677. + *
  6678. + * Marvell Loki (88RC8480) IRQ handling.
  6679. + *
  6680. + * This file is licensed under the terms of the GNU General Public
  6681. + * License version 2. This program is licensed "as is" without any
  6682. + * warranty of any kind, whether express or implied.
  6683. + */
  6684. +
  6685. +#include <linux/kernel.h>
  6686. +#include <linux/init.h>
  6687. +#include <linux/irq.h>
  6688. +#include <asm/io.h>
  6689. +#include <asm/plat-orion/irq.h>
  6690. +#include "common.h"
  6691. +
  6692. +void __init loki_init_irq(void)
  6693. +{
  6694. + orion_irq_init(0, (void __iomem *)(IRQ_VIRT_BASE + IRQ_MASK_OFF));
  6695. +}
  6696. --- /dev/null
  6697. +++ b/arch/arm/mach-loki/lb88rc8480-setup.c
  6698. @@ -0,0 +1,100 @@
  6699. +/*
  6700. + * arch/arm/mach-loki/lb88rc8480-setup.c
  6701. + *
  6702. + * Marvell LB88RC8480 Development Board Setup
  6703. + *
  6704. + * This file is licensed under the terms of the GNU General Public
  6705. + * License version 2. This program is licensed "as is" without any
  6706. + * warranty of any kind, whether express or implied.
  6707. + */
  6708. +
  6709. +#include <linux/kernel.h>
  6710. +#include <linux/init.h>
  6711. +#include <linux/platform_device.h>
  6712. +#include <linux/irq.h>
  6713. +#include <linux/mtd/physmap.h>
  6714. +#include <linux/mtd/nand.h>
  6715. +#include <linux/timer.h>
  6716. +#include <linux/ata_platform.h>
  6717. +#include <linux/mv643xx_eth.h>
  6718. +#include <asm/mach-types.h>
  6719. +#include <asm/mach/arch.h>
  6720. +#include <asm/arch/loki.h>
  6721. +#include "common.h"
  6722. +
  6723. +#define LB88RC8480_FLASH_BOOT_CS_BASE 0xf8000000
  6724. +#define LB88RC8480_FLASH_BOOT_CS_SIZE SZ_128M
  6725. +
  6726. +#define LB88RC8480_NOR_BOOT_BASE 0xff000000
  6727. +#define LB88RC8480_NOR_BOOT_SIZE SZ_16M
  6728. +
  6729. +static struct mtd_partition lb88rc8480_boot_flash_parts[] = {
  6730. + {
  6731. + .name = "kernel",
  6732. + .offset = 0,
  6733. + .size = SZ_2M,
  6734. + }, {
  6735. + .name = "root-fs",
  6736. + .offset = SZ_2M,
  6737. + .size = (SZ_8M + SZ_4M + SZ_1M),
  6738. + }, {
  6739. + .name = "u-boot",
  6740. + .offset = (SZ_8M + SZ_4M + SZ_2M + SZ_1M),
  6741. + .size = SZ_1M,
  6742. + },
  6743. +};
  6744. +
  6745. +static struct physmap_flash_data lb88rc8480_boot_flash_data = {
  6746. + .parts = lb88rc8480_boot_flash_parts,
  6747. + .nr_parts = ARRAY_SIZE(lb88rc8480_boot_flash_parts),
  6748. + .width = 1, /* 8 bit bus width */
  6749. +};
  6750. +
  6751. +static struct resource lb88rc8480_boot_flash_resource = {
  6752. + .flags = IORESOURCE_MEM,
  6753. + .start = LB88RC8480_NOR_BOOT_BASE,
  6754. + .end = LB88RC8480_NOR_BOOT_BASE + LB88RC8480_NOR_BOOT_SIZE - 1,
  6755. +};
  6756. +
  6757. +static struct platform_device lb88rc8480_boot_flash = {
  6758. + .name = "physmap-flash",
  6759. + .id = 0,
  6760. + .dev = {
  6761. + .platform_data = &lb88rc8480_boot_flash_data,
  6762. + },
  6763. + .num_resources = 1,
  6764. + .resource = &lb88rc8480_boot_flash_resource,
  6765. +};
  6766. +
  6767. +static struct mv643xx_eth_platform_data lb88rc8480_ge0_data = {
  6768. + .phy_addr = 1,
  6769. + .mac_addr = { 0x00, 0x50, 0x43, 0x11, 0x22, 0x33 },
  6770. +};
  6771. +
  6772. +static void __init lb88rc8480_init(void)
  6773. +{
  6774. + /*
  6775. + * Basic setup. Needs to be called early.
  6776. + */
  6777. + loki_init();
  6778. +
  6779. + loki_ge0_init(&lb88rc8480_ge0_data);
  6780. + loki_sas_init();
  6781. + loki_uart0_init();
  6782. + loki_uart1_init();
  6783. +
  6784. + loki_setup_dev_boot_win(LB88RC8480_FLASH_BOOT_CS_BASE,
  6785. + LB88RC8480_FLASH_BOOT_CS_SIZE);
  6786. + platform_device_register(&lb88rc8480_boot_flash);
  6787. +}
  6788. +
  6789. +MACHINE_START(LB88RC8480, "Marvell LB88RC8480 Development Board")
  6790. + /* Maintainer: Ke Wei <[email protected]> */
  6791. + .phys_io = LOKI_REGS_PHYS_BASE,
  6792. + .io_pg_offst = ((LOKI_REGS_VIRT_BASE) >> 18) & 0xfffc,
  6793. + .boot_params = 0x00000100,
  6794. + .init_machine = lb88rc8480_init,
  6795. + .map_io = loki_map_io,
  6796. + .init_irq = loki_init_irq,
  6797. + .timer = &loki_timer,
  6798. +MACHINE_END
  6799. --- /dev/null
  6800. +++ b/arch/arm/mach-mv78xx0/Kconfig
  6801. @@ -0,0 +1,13 @@
  6802. +if ARCH_MV78XX0
  6803. +
  6804. +menu "Marvell MV78xx0 Implementations"
  6805. +
  6806. +config MACH_DB78X00_BP
  6807. + bool "Marvell DB-78x00-BP Development Board"
  6808. + help
  6809. + Say 'Y' here if you want your kernel to support the
  6810. + Marvell DB-78x00-BP Development Board.
  6811. +
  6812. +endmenu
  6813. +
  6814. +endif
  6815. --- /dev/null
  6816. +++ b/arch/arm/mach-mv78xx0/Makefile
  6817. @@ -0,0 +1,2 @@
  6818. +obj-y += common.o addr-map.o irq.o pcie.o
  6819. +obj-$(CONFIG_MACH_DB78X00_BP) += db78x00-bp-setup.o
  6820. --- /dev/null
  6821. +++ b/arch/arm/mach-mv78xx0/Makefile.boot
  6822. @@ -0,0 +1,3 @@
  6823. + zreladdr-y := 0x00008000
  6824. +params_phys-y := 0x00000100
  6825. +initrd_phys-y := 0x00800000
  6826. --- /dev/null
  6827. +++ b/arch/arm/mach-mv78xx0/addr-map.c
  6828. @@ -0,0 +1,156 @@
  6829. +/*
  6830. + * arch/arm/mach-mv78xx0/addr-map.c
  6831. + *
  6832. + * Address map functions for Marvell MV78xx0 SoCs
  6833. + *
  6834. + * This file is licensed under the terms of the GNU General Public
  6835. + * License version 2. This program is licensed "as is" without any
  6836. + * warranty of any kind, whether express or implied.
  6837. + */
  6838. +
  6839. +#include <linux/kernel.h>
  6840. +#include <linux/init.h>
  6841. +#include <linux/mbus.h>
  6842. +#include <asm/io.h>
  6843. +#include "common.h"
  6844. +
  6845. +/*
  6846. + * Generic Address Decode Windows bit settings
  6847. + */
  6848. +#define TARGET_DDR 0
  6849. +#define TARGET_DEV_BUS 1
  6850. +#define TARGET_PCIE0 4
  6851. +#define TARGET_PCIE1 8
  6852. +#define TARGET_PCIE(i) ((i) ? TARGET_PCIE1 : TARGET_PCIE0)
  6853. +#define ATTR_DEV_SPI_ROM 0x1f
  6854. +#define ATTR_DEV_BOOT 0x2f
  6855. +#define ATTR_DEV_CS3 0x37
  6856. +#define ATTR_DEV_CS2 0x3b
  6857. +#define ATTR_DEV_CS1 0x3d
  6858. +#define ATTR_DEV_CS0 0x3e
  6859. +#define ATTR_PCIE_IO(l) (0xf0 & ~(0x10 << (l)))
  6860. +#define ATTR_PCIE_MEM(l) (0xf8 & ~(0x10 << (l)))
  6861. +
  6862. +/*
  6863. + * Helpers to get DDR bank info
  6864. + */
  6865. +#define DDR_BASE_CS_OFF(n) (0x0000 + ((n) << 3))
  6866. +#define DDR_SIZE_CS_OFF(n) (0x0004 + ((n) << 3))
  6867. +
  6868. +/*
  6869. + * CPU Address Decode Windows registers
  6870. + */
  6871. +#define WIN0_OFF(n) (BRIDGE_VIRT_BASE + 0x0000 + ((n) << 4))
  6872. +#define WIN8_OFF(n) (BRIDGE_VIRT_BASE + 0x0900 + (((n) - 8) << 4))
  6873. +#define WIN_CTRL_OFF 0x0000
  6874. +#define WIN_BASE_OFF 0x0004
  6875. +#define WIN_REMAP_LO_OFF 0x0008
  6876. +#define WIN_REMAP_HI_OFF 0x000c
  6877. +
  6878. +
  6879. +struct mbus_dram_target_info mv78xx0_mbus_dram_info;
  6880. +
  6881. +static void __init __iomem *win_cfg_base(int win)
  6882. +{
  6883. + /*
  6884. + * Find the control register base address for this window.
  6885. + *
  6886. + * BRIDGE_VIRT_BASE points to the right (CPU0's or CPU1's)
  6887. + * MBUS bridge depending on which CPU core we're running on,
  6888. + * so we don't need to take that into account here.
  6889. + */
  6890. +
  6891. + return (void __iomem *)((win < 8) ? WIN0_OFF(win) : WIN8_OFF(win));
  6892. +}
  6893. +
  6894. +static int __init cpu_win_can_remap(int win)
  6895. +{
  6896. + if (win < 8)
  6897. + return 1;
  6898. +
  6899. + return 0;
  6900. +}
  6901. +
  6902. +static void __init setup_cpu_win(int win, u32 base, u32 size,
  6903. + u8 target, u8 attr, int remap)
  6904. +{
  6905. + void __iomem *addr = win_cfg_base(win);
  6906. + u32 ctrl;
  6907. +
  6908. + base &= 0xffff0000;
  6909. + ctrl = ((size - 1) & 0xffff0000) | (attr << 8) | (target << 4) | 1;
  6910. +
  6911. + writel(base, addr + WIN_BASE_OFF);
  6912. + writel(ctrl, addr + WIN_CTRL_OFF);
  6913. + if (cpu_win_can_remap(win)) {
  6914. + if (remap < 0)
  6915. + remap = base;
  6916. +
  6917. + writel(remap & 0xffff0000, addr + WIN_REMAP_LO_OFF);
  6918. + writel(0, addr + WIN_REMAP_HI_OFF);
  6919. + }
  6920. +}
  6921. +
  6922. +void __init mv78xx0_setup_cpu_mbus(void)
  6923. +{
  6924. + void __iomem *addr;
  6925. + int i;
  6926. + int cs;
  6927. +
  6928. + /*
  6929. + * First, disable and clear windows.
  6930. + */
  6931. + for (i = 0; i < 14; i++) {
  6932. + addr = win_cfg_base(i);
  6933. +
  6934. + writel(0, addr + WIN_BASE_OFF);
  6935. + writel(0, addr + WIN_CTRL_OFF);
  6936. + if (cpu_win_can_remap(i)) {
  6937. + writel(0, addr + WIN_REMAP_LO_OFF);
  6938. + writel(0, addr + WIN_REMAP_HI_OFF);
  6939. + }
  6940. + }
  6941. +
  6942. + /*
  6943. + * Setup MBUS dram target info.
  6944. + */
  6945. + mv78xx0_mbus_dram_info.mbus_dram_target_id = TARGET_DDR;
  6946. +
  6947. + if (mv78xx0_core_index() == 0)
  6948. + addr = (void __iomem *)DDR_WINDOW_CPU0_BASE;
  6949. + else
  6950. + addr = (void __iomem *)DDR_WINDOW_CPU1_BASE;
  6951. +
  6952. + for (i = 0, cs = 0; i < 4; i++) {
  6953. + u32 base = readl(addr + DDR_BASE_CS_OFF(i));
  6954. + u32 size = readl(addr + DDR_SIZE_CS_OFF(i));
  6955. +
  6956. + /*
  6957. + * Chip select enabled?
  6958. + */
  6959. + if (size & 1) {
  6960. + struct mbus_dram_window *w;
  6961. +
  6962. + w = &mv78xx0_mbus_dram_info.cs[cs++];
  6963. + w->cs_index = i;
  6964. + w->mbus_attr = 0xf & ~(1 << i);
  6965. + w->base = base & 0xffff0000;
  6966. + w->size = (size | 0x0000ffff) + 1;
  6967. + }
  6968. + }
  6969. + mv78xx0_mbus_dram_info.num_cs = cs;
  6970. +}
  6971. +
  6972. +void __init mv78xx0_setup_pcie_io_win(int window, u32 base, u32 size,
  6973. + int maj, int min)
  6974. +{
  6975. + setup_cpu_win(window, base, size, TARGET_PCIE(maj),
  6976. + ATTR_PCIE_IO(min), -1);
  6977. +}
  6978. +
  6979. +void __init mv78xx0_setup_pcie_mem_win(int window, u32 base, u32 size,
  6980. + int maj, int min)
  6981. +{
  6982. + setup_cpu_win(window, base, size, TARGET_PCIE(maj),
  6983. + ATTR_PCIE_MEM(min), -1);
  6984. +}
  6985. --- /dev/null
  6986. +++ b/arch/arm/mach-mv78xx0/common.c
  6987. @@ -0,0 +1,754 @@
  6988. +/*
  6989. + * arch/arm/mach-mv78xx0/common.c
  6990. + *
  6991. + * Core functions for Marvell MV78xx0 SoCs
  6992. + *
  6993. + * This file is licensed under the terms of the GNU General Public
  6994. + * License version 2. This program is licensed "as is" without any
  6995. + * warranty of any kind, whether express or implied.
  6996. + */
  6997. +
  6998. +#include <linux/kernel.h>
  6999. +#include <linux/init.h>
  7000. +#include <linux/platform_device.h>
  7001. +#include <linux/serial_8250.h>
  7002. +#include <linux/mbus.h>
  7003. +#include <linux/mv643xx_eth.h>
  7004. +#include <linux/ata_platform.h>
  7005. +#include <asm/mach/map.h>
  7006. +#include <asm/mach/time.h>
  7007. +#include <asm/arch/mv78xx0.h>
  7008. +#include <asm/plat-orion/cache-feroceon-l2.h>
  7009. +#include <asm/plat-orion/ehci-orion.h>
  7010. +#include <asm/plat-orion/orion_nand.h>
  7011. +#include <asm/plat-orion/time.h>
  7012. +#include "common.h"
  7013. +
  7014. +
  7015. +/*****************************************************************************
  7016. + * Common bits
  7017. + ****************************************************************************/
  7018. +int mv78xx0_core_index(void)
  7019. +{
  7020. + u32 extra;
  7021. +
  7022. + /*
  7023. + * Read Extra Features register.
  7024. + */
  7025. + __asm__("mrc p15, 1, %0, c15, c1, 0" : "=r" (extra));
  7026. +
  7027. + return !!(extra & 0x00004000);
  7028. +}
  7029. +
  7030. +static int get_hclk(void)
  7031. +{
  7032. + int hclk;
  7033. +
  7034. + /*
  7035. + * HCLK tick rate is configured by DEV_D[7:5] pins.
  7036. + */
  7037. + switch ((readl(SAMPLE_AT_RESET_LOW) >> 5) & 7) {
  7038. + case 0:
  7039. + hclk = 166666667;
  7040. + break;
  7041. + case 1:
  7042. + hclk = 200000000;
  7043. + break;
  7044. + case 2:
  7045. + hclk = 266666667;
  7046. + break;
  7047. + case 3:
  7048. + hclk = 333333333;
  7049. + break;
  7050. + case 4:
  7051. + hclk = 400000000;
  7052. + break;
  7053. + default:
  7054. + panic("unknown HCLK PLL setting: %.8x\n",
  7055. + readl(SAMPLE_AT_RESET_LOW));
  7056. + }
  7057. +
  7058. + return hclk;
  7059. +}
  7060. +
  7061. +static void get_pclk_l2clk(int hclk, int core_index, int *pclk, int *l2clk)
  7062. +{
  7063. + u32 cfg;
  7064. +
  7065. + /*
  7066. + * Core #0 PCLK/L2CLK is configured by bits [13:8], core #1
  7067. + * PCLK/L2CLK by bits [19:14].
  7068. + */
  7069. + if (core_index == 0) {
  7070. + cfg = (readl(SAMPLE_AT_RESET_LOW) >> 8) & 0x3f;
  7071. + } else {
  7072. + cfg = (readl(SAMPLE_AT_RESET_LOW) >> 14) & 0x3f;
  7073. + }
  7074. +
  7075. + /*
  7076. + * Bits [11:8] ([17:14] for core #1) configure the PCLK:HCLK
  7077. + * ratio (1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5, 5, 5.5, 6).
  7078. + */
  7079. + *pclk = ((u64)hclk * (2 + (cfg & 0xf))) >> 1;
  7080. +
  7081. + /*
  7082. + * Bits [13:12] ([19:18] for core #1) configure the PCLK:L2CLK
  7083. + * ratio (1, 2, 3).
  7084. + */
  7085. + *l2clk = *pclk / (((cfg >> 4) & 3) + 1);
  7086. +}
  7087. +
  7088. +static int get_tclk(void)
  7089. +{
  7090. + int tclk;
  7091. +
  7092. + /*
  7093. + * TCLK tick rate is configured by DEV_A[2:0] strap pins.
  7094. + */
  7095. + switch ((readl(SAMPLE_AT_RESET_HIGH) >> 6) & 7) {
  7096. + case 1:
  7097. + tclk = 166666667;
  7098. + break;
  7099. + case 3:
  7100. + tclk = 200000000;
  7101. + break;
  7102. + default:
  7103. + panic("unknown TCLK PLL setting: %.8x\n",
  7104. + readl(SAMPLE_AT_RESET_HIGH));
  7105. + }
  7106. +
  7107. + return tclk;
  7108. +}
  7109. +
  7110. +
  7111. +/*****************************************************************************
  7112. + * I/O Address Mapping
  7113. + ****************************************************************************/
  7114. +static struct map_desc mv78xx0_io_desc[] __initdata = {
  7115. + {
  7116. + .virtual = MV78XX0_CORE_REGS_VIRT_BASE,
  7117. + .pfn = 0,
  7118. + .length = MV78XX0_CORE_REGS_SIZE,
  7119. + .type = MT_DEVICE,
  7120. + }, {
  7121. + .virtual = MV78XX0_PCIE_IO_VIRT_BASE(0),
  7122. + .pfn = __phys_to_pfn(MV78XX0_PCIE_IO_PHYS_BASE(0)),
  7123. + .length = MV78XX0_PCIE_IO_SIZE * 8,
  7124. + .type = MT_DEVICE,
  7125. + }, {
  7126. + .virtual = MV78XX0_REGS_VIRT_BASE,
  7127. + .pfn = __phys_to_pfn(MV78XX0_REGS_PHYS_BASE),
  7128. + .length = MV78XX0_REGS_SIZE,
  7129. + .type = MT_DEVICE,
  7130. + },
  7131. +};
  7132. +
  7133. +void __init mv78xx0_map_io(void)
  7134. +{
  7135. + unsigned long phys;
  7136. +
  7137. + /*
  7138. + * Map the right set of per-core registers depending on
  7139. + * which core we are running on.
  7140. + */
  7141. + if (mv78xx0_core_index() == 0) {
  7142. + phys = MV78XX0_CORE0_REGS_PHYS_BASE;
  7143. + } else {
  7144. + phys = MV78XX0_CORE1_REGS_PHYS_BASE;
  7145. + }
  7146. + mv78xx0_io_desc[0].pfn = __phys_to_pfn(phys);
  7147. +
  7148. + iotable_init(mv78xx0_io_desc, ARRAY_SIZE(mv78xx0_io_desc));
  7149. +}
  7150. +
  7151. +
  7152. +/*****************************************************************************
  7153. + * EHCI
  7154. + ****************************************************************************/
  7155. +static struct orion_ehci_data mv78xx0_ehci_data = {
  7156. + .dram = &mv78xx0_mbus_dram_info,
  7157. +};
  7158. +
  7159. +static u64 ehci_dmamask = 0xffffffffUL;
  7160. +
  7161. +
  7162. +/*****************************************************************************
  7163. + * EHCI0
  7164. + ****************************************************************************/
  7165. +static struct resource mv78xx0_ehci0_resources[] = {
  7166. + {
  7167. + .start = USB0_PHYS_BASE,
  7168. + .end = USB0_PHYS_BASE + 0x0fff,
  7169. + .flags = IORESOURCE_MEM,
  7170. + }, {
  7171. + .start = IRQ_MV78XX0_USB_0,
  7172. + .end = IRQ_MV78XX0_USB_0,
  7173. + .flags = IORESOURCE_IRQ,
  7174. + },
  7175. +};
  7176. +
  7177. +static struct platform_device mv78xx0_ehci0 = {
  7178. + .name = "orion-ehci",
  7179. + .id = 0,
  7180. + .dev = {
  7181. + .dma_mask = &ehci_dmamask,
  7182. + .coherent_dma_mask = 0xffffffff,
  7183. + .platform_data = &mv78xx0_ehci_data,
  7184. + },
  7185. + .resource = mv78xx0_ehci0_resources,
  7186. + .num_resources = ARRAY_SIZE(mv78xx0_ehci0_resources),
  7187. +};
  7188. +
  7189. +void __init mv78xx0_ehci0_init(void)
  7190. +{
  7191. + platform_device_register(&mv78xx0_ehci0);
  7192. +}
  7193. +
  7194. +
  7195. +/*****************************************************************************
  7196. + * EHCI1
  7197. + ****************************************************************************/
  7198. +static struct resource mv78xx0_ehci1_resources[] = {
  7199. + {
  7200. + .start = USB1_PHYS_BASE,
  7201. + .end = USB1_PHYS_BASE + 0x0fff,
  7202. + .flags = IORESOURCE_MEM,
  7203. + }, {
  7204. + .start = IRQ_MV78XX0_USB_1,
  7205. + .end = IRQ_MV78XX0_USB_1,
  7206. + .flags = IORESOURCE_IRQ,
  7207. + },
  7208. +};
  7209. +
  7210. +static struct platform_device mv78xx0_ehci1 = {
  7211. + .name = "orion-ehci",
  7212. + .id = 1,
  7213. + .dev = {
  7214. + .dma_mask = &ehci_dmamask,
  7215. + .coherent_dma_mask = 0xffffffff,
  7216. + .platform_data = &mv78xx0_ehci_data,
  7217. + },
  7218. + .resource = mv78xx0_ehci1_resources,
  7219. + .num_resources = ARRAY_SIZE(mv78xx0_ehci1_resources),
  7220. +};
  7221. +
  7222. +void __init mv78xx0_ehci1_init(void)
  7223. +{
  7224. + platform_device_register(&mv78xx0_ehci1);
  7225. +}
  7226. +
  7227. +
  7228. +/*****************************************************************************
  7229. + * EHCI2
  7230. + ****************************************************************************/
  7231. +static struct resource mv78xx0_ehci2_resources[] = {
  7232. + {
  7233. + .start = USB2_PHYS_BASE,
  7234. + .end = USB2_PHYS_BASE + 0x0fff,
  7235. + .flags = IORESOURCE_MEM,
  7236. + }, {
  7237. + .start = IRQ_MV78XX0_USB_2,
  7238. + .end = IRQ_MV78XX0_USB_2,
  7239. + .flags = IORESOURCE_IRQ,
  7240. + },
  7241. +};
  7242. +
  7243. +static struct platform_device mv78xx0_ehci2 = {
  7244. + .name = "orion-ehci",
  7245. + .id = 2,
  7246. + .dev = {
  7247. + .dma_mask = &ehci_dmamask,
  7248. + .coherent_dma_mask = 0xffffffff,
  7249. + .platform_data = &mv78xx0_ehci_data,
  7250. + },
  7251. + .resource = mv78xx0_ehci2_resources,
  7252. + .num_resources = ARRAY_SIZE(mv78xx0_ehci2_resources),
  7253. +};
  7254. +
  7255. +void __init mv78xx0_ehci2_init(void)
  7256. +{
  7257. + platform_device_register(&mv78xx0_ehci2);
  7258. +}
  7259. +
  7260. +
  7261. +/*****************************************************************************
  7262. + * GE00
  7263. + ****************************************************************************/
  7264. +struct mv643xx_eth_shared_platform_data mv78xx0_ge00_shared_data = {
  7265. + .t_clk = 0,
  7266. + .dram = &mv78xx0_mbus_dram_info,
  7267. +};
  7268. +
  7269. +static struct resource mv78xx0_ge00_shared_resources[] = {
  7270. + {
  7271. + .name = "ge00 base",
  7272. + .start = GE00_PHYS_BASE + 0x2000,
  7273. + .end = GE00_PHYS_BASE + 0x3fff,
  7274. + .flags = IORESOURCE_MEM,
  7275. + },
  7276. +};
  7277. +
  7278. +static struct platform_device mv78xx0_ge00_shared = {
  7279. + .name = MV643XX_ETH_SHARED_NAME,
  7280. + .id = 0,
  7281. + .dev = {
  7282. + .platform_data = &mv78xx0_ge00_shared_data,
  7283. + },
  7284. + .num_resources = 1,
  7285. + .resource = mv78xx0_ge00_shared_resources,
  7286. +};
  7287. +
  7288. +static struct resource mv78xx0_ge00_resources[] = {
  7289. + {
  7290. + .name = "ge00 irq",
  7291. + .start = IRQ_MV78XX0_GE00_SUM,
  7292. + .end = IRQ_MV78XX0_GE00_SUM,
  7293. + .flags = IORESOURCE_IRQ,
  7294. + },
  7295. +};
  7296. +
  7297. +static struct platform_device mv78xx0_ge00 = {
  7298. + .name = MV643XX_ETH_NAME,
  7299. + .id = 0,
  7300. + .num_resources = 1,
  7301. + .resource = mv78xx0_ge00_resources,
  7302. +};
  7303. +
  7304. +void __init mv78xx0_ge00_init(struct mv643xx_eth_platform_data *eth_data)
  7305. +{
  7306. + eth_data->shared = &mv78xx0_ge00_shared;
  7307. + mv78xx0_ge00.dev.platform_data = eth_data;
  7308. +
  7309. + platform_device_register(&mv78xx0_ge00_shared);
  7310. + platform_device_register(&mv78xx0_ge00);
  7311. +}
  7312. +
  7313. +
  7314. +/*****************************************************************************
  7315. + * GE01
  7316. + ****************************************************************************/
  7317. +struct mv643xx_eth_shared_platform_data mv78xx0_ge01_shared_data = {
  7318. + .t_clk = 0,
  7319. + .dram = &mv78xx0_mbus_dram_info,
  7320. +};
  7321. +
  7322. +static struct resource mv78xx0_ge01_shared_resources[] = {
  7323. + {
  7324. + .name = "ge01 base",
  7325. + .start = GE01_PHYS_BASE + 0x2000,
  7326. + .end = GE01_PHYS_BASE + 0x3fff,
  7327. + .flags = IORESOURCE_MEM,
  7328. + },
  7329. +};
  7330. +
  7331. +static struct platform_device mv78xx0_ge01_shared = {
  7332. + .name = MV643XX_ETH_SHARED_NAME,
  7333. + .id = 1,
  7334. + .dev = {
  7335. + .platform_data = &mv78xx0_ge01_shared_data,
  7336. + },
  7337. + .num_resources = 1,
  7338. + .resource = mv78xx0_ge01_shared_resources,
  7339. +};
  7340. +
  7341. +static struct resource mv78xx0_ge01_resources[] = {
  7342. + {
  7343. + .name = "ge01 irq",
  7344. + .start = IRQ_MV78XX0_GE01_SUM,
  7345. + .end = IRQ_MV78XX0_GE01_SUM,
  7346. + .flags = IORESOURCE_IRQ,
  7347. + },
  7348. +};
  7349. +
  7350. +static struct platform_device mv78xx0_ge01 = {
  7351. + .name = MV643XX_ETH_NAME,
  7352. + .id = 1,
  7353. + .num_resources = 1,
  7354. + .resource = mv78xx0_ge01_resources,
  7355. +};
  7356. +
  7357. +void __init mv78xx0_ge01_init(struct mv643xx_eth_platform_data *eth_data)
  7358. +{
  7359. + eth_data->shared = &mv78xx0_ge01_shared;
  7360. + eth_data->shared_smi = &mv78xx0_ge00_shared;
  7361. + mv78xx0_ge01.dev.platform_data = eth_data;
  7362. +
  7363. + platform_device_register(&mv78xx0_ge01_shared);
  7364. + platform_device_register(&mv78xx0_ge01);
  7365. +}
  7366. +
  7367. +
  7368. +/*****************************************************************************
  7369. + * GE10
  7370. + ****************************************************************************/
  7371. +struct mv643xx_eth_shared_platform_data mv78xx0_ge10_shared_data = {
  7372. + .t_clk = 0,
  7373. + .dram = &mv78xx0_mbus_dram_info,
  7374. +};
  7375. +
  7376. +static struct resource mv78xx0_ge10_shared_resources[] = {
  7377. + {
  7378. + .name = "ge10 base",
  7379. + .start = GE10_PHYS_BASE + 0x2000,
  7380. + .end = GE10_PHYS_BASE + 0x3fff,
  7381. + .flags = IORESOURCE_MEM,
  7382. + },
  7383. +};
  7384. +
  7385. +static struct platform_device mv78xx0_ge10_shared = {
  7386. + .name = MV643XX_ETH_SHARED_NAME,
  7387. + .id = 2,
  7388. + .dev = {
  7389. + .platform_data = &mv78xx0_ge10_shared_data,
  7390. + },
  7391. + .num_resources = 1,
  7392. + .resource = mv78xx0_ge10_shared_resources,
  7393. +};
  7394. +
  7395. +static struct resource mv78xx0_ge10_resources[] = {
  7396. + {
  7397. + .name = "ge10 irq",
  7398. + .start = IRQ_MV78XX0_GE10_SUM,
  7399. + .end = IRQ_MV78XX0_GE10_SUM,
  7400. + .flags = IORESOURCE_IRQ,
  7401. + },
  7402. +};
  7403. +
  7404. +static struct platform_device mv78xx0_ge10 = {
  7405. + .name = MV643XX_ETH_NAME,
  7406. + .id = 2,
  7407. + .num_resources = 1,
  7408. + .resource = mv78xx0_ge10_resources,
  7409. +};
  7410. +
  7411. +void __init mv78xx0_ge10_init(struct mv643xx_eth_platform_data *eth_data)
  7412. +{
  7413. + eth_data->shared = &mv78xx0_ge10_shared;
  7414. + eth_data->shared_smi = &mv78xx0_ge00_shared;
  7415. + mv78xx0_ge10.dev.platform_data = eth_data;
  7416. +
  7417. + platform_device_register(&mv78xx0_ge10_shared);
  7418. + platform_device_register(&mv78xx0_ge10);
  7419. +}
  7420. +
  7421. +
  7422. +/*****************************************************************************
  7423. + * GE11
  7424. + ****************************************************************************/
  7425. +struct mv643xx_eth_shared_platform_data mv78xx0_ge11_shared_data = {
  7426. + .t_clk = 0,
  7427. + .dram = &mv78xx0_mbus_dram_info,
  7428. +};
  7429. +
  7430. +static struct resource mv78xx0_ge11_shared_resources[] = {
  7431. + {
  7432. + .name = "ge11 base",
  7433. + .start = GE11_PHYS_BASE + 0x2000,
  7434. + .end = GE11_PHYS_BASE + 0x3fff,
  7435. + .flags = IORESOURCE_MEM,
  7436. + },
  7437. +};
  7438. +
  7439. +static struct platform_device mv78xx0_ge11_shared = {
  7440. + .name = MV643XX_ETH_SHARED_NAME,
  7441. + .id = 3,
  7442. + .dev = {
  7443. + .platform_data = &mv78xx0_ge11_shared_data,
  7444. + },
  7445. + .num_resources = 1,
  7446. + .resource = mv78xx0_ge11_shared_resources,
  7447. +};
  7448. +
  7449. +static struct resource mv78xx0_ge11_resources[] = {
  7450. + {
  7451. + .name = "ge11 irq",
  7452. + .start = IRQ_MV78XX0_GE11_SUM,
  7453. + .end = IRQ_MV78XX0_GE11_SUM,
  7454. + .flags = IORESOURCE_IRQ,
  7455. + },
  7456. +};
  7457. +
  7458. +static struct platform_device mv78xx0_ge11 = {
  7459. + .name = MV643XX_ETH_NAME,
  7460. + .id = 3,
  7461. + .num_resources = 1,
  7462. + .resource = mv78xx0_ge11_resources,
  7463. +};
  7464. +
  7465. +void __init mv78xx0_ge11_init(struct mv643xx_eth_platform_data *eth_data)
  7466. +{
  7467. + eth_data->shared = &mv78xx0_ge11_shared;
  7468. + eth_data->shared_smi = &mv78xx0_ge00_shared;
  7469. + mv78xx0_ge11.dev.platform_data = eth_data;
  7470. +
  7471. + platform_device_register(&mv78xx0_ge11_shared);
  7472. + platform_device_register(&mv78xx0_ge11);
  7473. +}
  7474. +
  7475. +
  7476. +/*****************************************************************************
  7477. + * SATA
  7478. + ****************************************************************************/
  7479. +static struct resource mv78xx0_sata_resources[] = {
  7480. + {
  7481. + .name = "sata base",
  7482. + .start = SATA_PHYS_BASE,
  7483. + .end = SATA_PHYS_BASE + 0x5000 - 1,
  7484. + .flags = IORESOURCE_MEM,
  7485. + }, {
  7486. + .name = "sata irq",
  7487. + .start = IRQ_MV78XX0_SATA,
  7488. + .end = IRQ_MV78XX0_SATA,
  7489. + .flags = IORESOURCE_IRQ,
  7490. + },
  7491. +};
  7492. +
  7493. +static struct platform_device mv78xx0_sata = {
  7494. + .name = "sata_mv",
  7495. + .id = 0,
  7496. + .dev = {
  7497. + .coherent_dma_mask = 0xffffffff,
  7498. + },
  7499. + .num_resources = ARRAY_SIZE(mv78xx0_sata_resources),
  7500. + .resource = mv78xx0_sata_resources,
  7501. +};
  7502. +
  7503. +void __init mv78xx0_sata_init(struct mv_sata_platform_data *sata_data)
  7504. +{
  7505. + sata_data->dram = &mv78xx0_mbus_dram_info;
  7506. + mv78xx0_sata.dev.platform_data = sata_data;
  7507. + platform_device_register(&mv78xx0_sata);
  7508. +}
  7509. +
  7510. +
  7511. +/*****************************************************************************
  7512. + * UART0
  7513. + ****************************************************************************/
  7514. +static struct plat_serial8250_port mv78xx0_uart0_data[] = {
  7515. + {
  7516. + .mapbase = UART0_PHYS_BASE,
  7517. + .membase = (char *)UART0_VIRT_BASE,
  7518. + .irq = IRQ_MV78XX0_UART_0,
  7519. + .flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF,
  7520. + .iotype = UPIO_MEM,
  7521. + .regshift = 2,
  7522. + .uartclk = 0,
  7523. + }, {
  7524. + },
  7525. +};
  7526. +
  7527. +static struct resource mv78xx0_uart0_resources[] = {
  7528. + {
  7529. + .start = UART0_PHYS_BASE,
  7530. + .end = UART0_PHYS_BASE + 0xff,
  7531. + .flags = IORESOURCE_MEM,
  7532. + }, {
  7533. + .start = IRQ_MV78XX0_UART_0,
  7534. + .end = IRQ_MV78XX0_UART_0,
  7535. + .flags = IORESOURCE_IRQ,
  7536. + },
  7537. +};
  7538. +
  7539. +static struct platform_device mv78xx0_uart0 = {
  7540. + .name = "serial8250",
  7541. + .id = 0,
  7542. + .dev = {
  7543. + .platform_data = mv78xx0_uart0_data,
  7544. + },
  7545. + .resource = mv78xx0_uart0_resources,
  7546. + .num_resources = ARRAY_SIZE(mv78xx0_uart0_resources),
  7547. +};
  7548. +
  7549. +void __init mv78xx0_uart0_init(void)
  7550. +{
  7551. + platform_device_register(&mv78xx0_uart0);
  7552. +}
  7553. +
  7554. +
  7555. +/*****************************************************************************
  7556. + * UART1
  7557. + ****************************************************************************/
  7558. +static struct plat_serial8250_port mv78xx0_uart1_data[] = {
  7559. + {
  7560. + .mapbase = UART1_PHYS_BASE,
  7561. + .membase = (char *)UART1_VIRT_BASE,
  7562. + .irq = IRQ_MV78XX0_UART_1,
  7563. + .flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF,
  7564. + .iotype = UPIO_MEM,
  7565. + .regshift = 2,
  7566. + .uartclk = 0,
  7567. + }, {
  7568. + },
  7569. +};
  7570. +
  7571. +static struct resource mv78xx0_uart1_resources[] = {
  7572. + {
  7573. + .start = UART1_PHYS_BASE,
  7574. + .end = UART1_PHYS_BASE + 0xff,
  7575. + .flags = IORESOURCE_MEM,
  7576. + }, {
  7577. + .start = IRQ_MV78XX0_UART_1,
  7578. + .end = IRQ_MV78XX0_UART_1,
  7579. + .flags = IORESOURCE_IRQ,
  7580. + },
  7581. +};
  7582. +
  7583. +static struct platform_device mv78xx0_uart1 = {
  7584. + .name = "serial8250",
  7585. + .id = 1,
  7586. + .dev = {
  7587. + .platform_data = mv78xx0_uart1_data,
  7588. + },
  7589. + .resource = mv78xx0_uart1_resources,
  7590. + .num_resources = ARRAY_SIZE(mv78xx0_uart1_resources),
  7591. +};
  7592. +
  7593. +void __init mv78xx0_uart1_init(void)
  7594. +{
  7595. + platform_device_register(&mv78xx0_uart1);
  7596. +}
  7597. +
  7598. +
  7599. +/*****************************************************************************
  7600. + * UART2
  7601. + ****************************************************************************/
  7602. +static struct plat_serial8250_port mv78xx0_uart2_data[] = {
  7603. + {
  7604. + .mapbase = UART2_PHYS_BASE,
  7605. + .membase = (char *)UART2_VIRT_BASE,
  7606. + .irq = IRQ_MV78XX0_UART_2,
  7607. + .flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF,
  7608. + .iotype = UPIO_MEM,
  7609. + .regshift = 2,
  7610. + .uartclk = 0,
  7611. + }, {
  7612. + },
  7613. +};
  7614. +
  7615. +static struct resource mv78xx0_uart2_resources[] = {
  7616. + {
  7617. + .start = UART2_PHYS_BASE,
  7618. + .end = UART2_PHYS_BASE + 0xff,
  7619. + .flags = IORESOURCE_MEM,
  7620. + }, {
  7621. + .start = IRQ_MV78XX0_UART_2,
  7622. + .end = IRQ_MV78XX0_UART_2,
  7623. + .flags = IORESOURCE_IRQ,
  7624. + },
  7625. +};
  7626. +
  7627. +static struct platform_device mv78xx0_uart2 = {
  7628. + .name = "serial8250",
  7629. + .id = 2,
  7630. + .dev = {
  7631. + .platform_data = mv78xx0_uart2_data,
  7632. + },
  7633. + .resource = mv78xx0_uart2_resources,
  7634. + .num_resources = ARRAY_SIZE(mv78xx0_uart2_resources),
  7635. +};
  7636. +
  7637. +void __init mv78xx0_uart2_init(void)
  7638. +{
  7639. + platform_device_register(&mv78xx0_uart2);
  7640. +}
  7641. +
  7642. +
  7643. +/*****************************************************************************
  7644. + * UART3
  7645. + ****************************************************************************/
  7646. +static struct plat_serial8250_port mv78xx0_uart3_data[] = {
  7647. + {
  7648. + .mapbase = UART3_PHYS_BASE,
  7649. + .membase = (char *)UART3_VIRT_BASE,
  7650. + .irq = IRQ_MV78XX0_UART_3,
  7651. + .flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF,
  7652. + .iotype = UPIO_MEM,
  7653. + .regshift = 2,
  7654. + .uartclk = 0,
  7655. + }, {
  7656. + },
  7657. +};
  7658. +
  7659. +static struct resource mv78xx0_uart3_resources[] = {
  7660. + {
  7661. + .start = UART3_PHYS_BASE,
  7662. + .end = UART3_PHYS_BASE + 0xff,
  7663. + .flags = IORESOURCE_MEM,
  7664. + }, {
  7665. + .start = IRQ_MV78XX0_UART_3,
  7666. + .end = IRQ_MV78XX0_UART_3,
  7667. + .flags = IORESOURCE_IRQ,
  7668. + },
  7669. +};
  7670. +
  7671. +static struct platform_device mv78xx0_uart3 = {
  7672. + .name = "serial8250",
  7673. + .id = 3,
  7674. + .dev = {
  7675. + .platform_data = mv78xx0_uart3_data,
  7676. + },
  7677. + .resource = mv78xx0_uart3_resources,
  7678. + .num_resources = ARRAY_SIZE(mv78xx0_uart3_resources),
  7679. +};
  7680. +
  7681. +void __init mv78xx0_uart3_init(void)
  7682. +{
  7683. + platform_device_register(&mv78xx0_uart3);
  7684. +}
  7685. +
  7686. +
  7687. +/*****************************************************************************
  7688. + * Time handling
  7689. + ****************************************************************************/
  7690. +static void mv78xx0_timer_init(void)
  7691. +{
  7692. + orion_time_init(IRQ_MV78XX0_TIMER_1, get_tclk());
  7693. +}
  7694. +
  7695. +struct sys_timer mv78xx0_timer = {
  7696. + .init = mv78xx0_timer_init,
  7697. +};
  7698. +
  7699. +
  7700. +/*****************************************************************************
  7701. + * General
  7702. + ****************************************************************************/
  7703. +static int __init is_l2_writethrough(void)
  7704. +{
  7705. + return !!(readl(CPU_CONTROL) & L2_WRITETHROUGH);
  7706. +}
  7707. +
  7708. +void __init mv78xx0_init(void)
  7709. +{
  7710. + int core_index;
  7711. + int hclk;
  7712. + int pclk;
  7713. + int l2clk;
  7714. + int tclk;
  7715. +
  7716. + core_index = mv78xx0_core_index();
  7717. + hclk = get_hclk();
  7718. + get_pclk_l2clk(hclk, core_index, &pclk, &l2clk);
  7719. + tclk = get_tclk();
  7720. +
  7721. + printk(KERN_INFO "MV78xx0 core #%d, ", core_index);
  7722. + printk("PCLK = %dMHz, ", (pclk + 499999) / 1000000);
  7723. + printk("L2 = %dMHz, ", (l2clk + 499999) / 1000000);
  7724. + printk("HCLK = %dMHz, ", (hclk + 499999) / 1000000);
  7725. + printk("TCLK = %dMHz\n", (tclk + 499999) / 1000000);
  7726. +
  7727. + mv78xx0_setup_cpu_mbus();
  7728. +
  7729. +#ifdef CONFIG_CACHE_FEROCEON_L2
  7730. + feroceon_l2_init(is_l2_writethrough());
  7731. +#endif
  7732. +
  7733. + mv78xx0_ge00_shared_data.t_clk = tclk;
  7734. + mv78xx0_ge01_shared_data.t_clk = tclk;
  7735. + mv78xx0_ge10_shared_data.t_clk = tclk;
  7736. + mv78xx0_ge11_shared_data.t_clk = tclk;
  7737. + mv78xx0_uart0_data[0].uartclk = tclk;
  7738. + mv78xx0_uart1_data[0].uartclk = tclk;
  7739. + mv78xx0_uart2_data[0].uartclk = tclk;
  7740. + mv78xx0_uart3_data[0].uartclk = tclk;
  7741. +}
  7742. --- /dev/null
  7743. +++ b/arch/arm/mach-mv78xx0/common.h
  7744. @@ -0,0 +1,49 @@
  7745. +/*
  7746. + * arch/arm/mach-mv78xx0/common.h
  7747. + *
  7748. + * Core functions for Marvell MV78xx0 SoCs
  7749. + *
  7750. + * This file is licensed under the terms of the GNU General Public
  7751. + * License version 2. This program is licensed "as is" without any
  7752. + * warranty of any kind, whether express or implied.
  7753. + */
  7754. +
  7755. +#ifndef __ARCH_MV78XX0_COMMON_H
  7756. +#define __ARCH_MV78XX0_COMMON_H
  7757. +
  7758. +struct mv643xx_eth_platform_data;
  7759. +struct mv_sata_platform_data;
  7760. +
  7761. +/*
  7762. + * Basic MV78xx0 init functions used early by machine-setup.
  7763. + */
  7764. +int mv78xx0_core_index(void);
  7765. +void mv78xx0_map_io(void);
  7766. +void mv78xx0_init(void);
  7767. +void mv78xx0_init_irq(void);
  7768. +
  7769. +extern struct mbus_dram_target_info mv78xx0_mbus_dram_info;
  7770. +void mv78xx0_setup_cpu_mbus(void);
  7771. +void mv78xx0_setup_pcie_io_win(int window, u32 base, u32 size,
  7772. + int maj, int min);
  7773. +void mv78xx0_setup_pcie_mem_win(int window, u32 base, u32 size,
  7774. + int maj, int min);
  7775. +
  7776. +void mv78xx0_ehci0_init(void);
  7777. +void mv78xx0_ehci1_init(void);
  7778. +void mv78xx0_ehci2_init(void);
  7779. +void mv78xx0_ge00_init(struct mv643xx_eth_platform_data *eth_data);
  7780. +void mv78xx0_ge01_init(struct mv643xx_eth_platform_data *eth_data);
  7781. +void mv78xx0_ge10_init(struct mv643xx_eth_platform_data *eth_data);
  7782. +void mv78xx0_ge11_init(struct mv643xx_eth_platform_data *eth_data);
  7783. +void mv78xx0_pcie_init(int init_port0, int init_port1);
  7784. +void mv78xx0_sata_init(struct mv_sata_platform_data *sata_data);
  7785. +void mv78xx0_uart0_init(void);
  7786. +void mv78xx0_uart1_init(void);
  7787. +void mv78xx0_uart2_init(void);
  7788. +void mv78xx0_uart3_init(void);
  7789. +
  7790. +extern struct sys_timer mv78xx0_timer;
  7791. +
  7792. +
  7793. +#endif
  7794. --- /dev/null
  7795. +++ b/arch/arm/mach-mv78xx0/db78x00-bp-setup.c
  7796. @@ -0,0 +1,94 @@
  7797. +/*
  7798. + * arch/arm/mach-mv78xx0/db78x00-bp-setup.c
  7799. + *
  7800. + * Marvell DB-78x00-BP Development Board Setup
  7801. + *
  7802. + * This file is licensed under the terms of the GNU General Public
  7803. + * License version 2. This program is licensed "as is" without any
  7804. + * warranty of any kind, whether express or implied.
  7805. + */
  7806. +
  7807. +#include <linux/kernel.h>
  7808. +#include <linux/init.h>
  7809. +#include <linux/platform_device.h>
  7810. +#include <linux/ata_platform.h>
  7811. +#include <linux/mv643xx_eth.h>
  7812. +#include <asm/arch/mv78xx0.h>
  7813. +#include <asm/mach-types.h>
  7814. +#include <asm/mach/arch.h>
  7815. +#include "common.h"
  7816. +
  7817. +static struct mv643xx_eth_platform_data db78x00_ge00_data = {
  7818. + .phy_addr = 8,
  7819. +};
  7820. +
  7821. +static struct mv643xx_eth_platform_data db78x00_ge01_data = {
  7822. + .phy_addr = 9,
  7823. +};
  7824. +
  7825. +static struct mv643xx_eth_platform_data db78x00_ge10_data = {
  7826. + .phy_addr = -1,
  7827. +};
  7828. +
  7829. +static struct mv643xx_eth_platform_data db78x00_ge11_data = {
  7830. + .phy_addr = -1,
  7831. +};
  7832. +
  7833. +static struct mv_sata_platform_data db78x00_sata_data = {
  7834. + .n_ports = 2,
  7835. +};
  7836. +
  7837. +static void __init db78x00_init(void)
  7838. +{
  7839. + /*
  7840. + * Basic MV78xx0 setup. Needs to be called early.
  7841. + */
  7842. + mv78xx0_init();
  7843. +
  7844. + /*
  7845. + * Partition on-chip peripherals between the two CPU cores.
  7846. + */
  7847. + if (mv78xx0_core_index() == 0) {
  7848. + mv78xx0_ehci0_init();
  7849. + mv78xx0_ehci1_init();
  7850. + mv78xx0_ehci2_init();
  7851. + mv78xx0_ge00_init(&db78x00_ge00_data);
  7852. + mv78xx0_ge01_init(&db78x00_ge01_data);
  7853. + mv78xx0_ge10_init(&db78x00_ge10_data);
  7854. + mv78xx0_ge11_init(&db78x00_ge11_data);
  7855. + mv78xx0_sata_init(&db78x00_sata_data);
  7856. + mv78xx0_uart0_init();
  7857. + mv78xx0_uart2_init();
  7858. + } else {
  7859. + mv78xx0_uart1_init();
  7860. + mv78xx0_uart3_init();
  7861. + }
  7862. +}
  7863. +
  7864. +static int __init db78x00_pci_init(void)
  7865. +{
  7866. + if (machine_is_db78x00_bp()) {
  7867. + /*
  7868. + * Assign the x16 PCIe slot on the board to CPU core
  7869. + * #0, and let CPU core #1 have the four x1 slots.
  7870. + */
  7871. + if (mv78xx0_core_index() == 0)
  7872. + mv78xx0_pcie_init(0, 1);
  7873. + else
  7874. + mv78xx0_pcie_init(1, 0);
  7875. + }
  7876. +
  7877. + return 0;
  7878. +}
  7879. +subsys_initcall(db78x00_pci_init);
  7880. +
  7881. +MACHINE_START(DB78X00_BP, "Marvell DB-78x00-BP Development Board")
  7882. + /* Maintainer: Lennert Buytenhek <[email protected]> */
  7883. + .phys_io = MV78XX0_REGS_PHYS_BASE,
  7884. + .io_pg_offst = ((MV78XX0_REGS_VIRT_BASE) >> 18) & 0xfffc,
  7885. + .boot_params = 0x00000100,
  7886. + .init_machine = db78x00_init,
  7887. + .map_io = mv78xx0_map_io,
  7888. + .init_irq = mv78xx0_init_irq,
  7889. + .timer = &mv78xx0_timer,
  7890. +MACHINE_END
  7891. --- /dev/null
  7892. +++ b/arch/arm/mach-mv78xx0/irq.c
  7893. @@ -0,0 +1,22 @@
  7894. +/*
  7895. + * arch/arm/mach-mv78xx0/irq.c
  7896. + *
  7897. + * MV78xx0 IRQ handling.
  7898. + *
  7899. + * This file is licensed under the terms of the GNU General Public
  7900. + * License version 2. This program is licensed "as is" without any
  7901. + * warranty of any kind, whether express or implied.
  7902. + */
  7903. +
  7904. +#include <linux/kernel.h>
  7905. +#include <linux/init.h>
  7906. +#include <linux/pci.h>
  7907. +#include <asm/arch/mv78xx0.h>
  7908. +#include <asm/plat-orion/irq.h>
  7909. +#include "common.h"
  7910. +
  7911. +void __init mv78xx0_init_irq(void)
  7912. +{
  7913. + orion_irq_init(0, (void __iomem *)(IRQ_VIRT_BASE + IRQ_MASK_LOW_OFF));
  7914. + orion_irq_init(32, (void __iomem *)(IRQ_VIRT_BASE + IRQ_MASK_HIGH_OFF));
  7915. +}
  7916. --- /dev/null
  7917. +++ b/arch/arm/mach-mv78xx0/pcie.c
  7918. @@ -0,0 +1,312 @@
  7919. +/*
  7920. + * arch/arm/mach-mv78xx0/pcie.c
  7921. + *
  7922. + * PCIe functions for Marvell MV78xx0 SoCs
  7923. + *
  7924. + * This file is licensed under the terms of the GNU General Public
  7925. + * License version 2. This program is licensed "as is" without any
  7926. + * warranty of any kind, whether express or implied.
  7927. + */
  7928. +
  7929. +#include <linux/kernel.h>
  7930. +#include <linux/pci.h>
  7931. +#include <linux/mbus.h>
  7932. +#include <asm/mach/pci.h>
  7933. +#include <asm/plat-orion/pcie.h>
  7934. +#include "common.h"
  7935. +
  7936. +struct pcie_port {
  7937. + u8 maj;
  7938. + u8 min;
  7939. + u8 root_bus_nr;
  7940. + void __iomem *base;
  7941. + spinlock_t conf_lock;
  7942. + char io_space_name[16];
  7943. + char mem_space_name[16];
  7944. + struct resource res[2];
  7945. +};
  7946. +
  7947. +static struct pcie_port pcie_port[8];
  7948. +static int num_pcie_ports;
  7949. +static struct resource pcie_io_space;
  7950. +static struct resource pcie_mem_space;
  7951. +
  7952. +
  7953. +static void __init mv78xx0_pcie_preinit(void)
  7954. +{
  7955. + int i;
  7956. + u32 size_each;
  7957. + u32 start;
  7958. + int win;
  7959. +
  7960. + pcie_io_space.name = "PCIe I/O Space";
  7961. + pcie_io_space.start = MV78XX0_PCIE_IO_PHYS_BASE(0);
  7962. + pcie_io_space.end =
  7963. + MV78XX0_PCIE_IO_PHYS_BASE(0) + MV78XX0_PCIE_IO_SIZE * 8 - 1;
  7964. + pcie_io_space.flags = IORESOURCE_IO;
  7965. + if (request_resource(&iomem_resource, &pcie_io_space))
  7966. + panic("can't allocate PCIe I/O space");
  7967. +
  7968. + pcie_mem_space.name = "PCIe MEM Space";
  7969. + pcie_mem_space.start = MV78XX0_PCIE_MEM_PHYS_BASE;
  7970. + pcie_mem_space.end =
  7971. + MV78XX0_PCIE_MEM_PHYS_BASE + MV78XX0_PCIE_MEM_SIZE - 1;
  7972. + pcie_mem_space.flags = IORESOURCE_MEM;
  7973. + if (request_resource(&iomem_resource, &pcie_mem_space))
  7974. + panic("can't allocate PCIe MEM space");
  7975. +
  7976. + for (i = 0; i < num_pcie_ports; i++) {
  7977. + struct pcie_port *pp = pcie_port + i;
  7978. +
  7979. + snprintf(pp->io_space_name, sizeof(pp->io_space_name),
  7980. + "PCIe %d.%d I/O", pp->maj, pp->min);
  7981. + pp->io_space_name[sizeof(pp->io_space_name) - 1] = 0;
  7982. + pp->res[0].name = pp->io_space_name;
  7983. + pp->res[0].start = MV78XX0_PCIE_IO_PHYS_BASE(i);
  7984. + pp->res[0].end = pp->res[0].start + MV78XX0_PCIE_IO_SIZE - 1;
  7985. + pp->res[0].flags = IORESOURCE_IO;
  7986. +
  7987. + snprintf(pp->mem_space_name, sizeof(pp->mem_space_name),
  7988. + "PCIe %d.%d MEM", pp->maj, pp->min);
  7989. + pp->mem_space_name[sizeof(pp->mem_space_name) - 1] = 0;
  7990. + pp->res[1].name = pp->mem_space_name;
  7991. + pp->res[1].flags = IORESOURCE_MEM;
  7992. + }
  7993. +
  7994. + switch (num_pcie_ports) {
  7995. + case 0:
  7996. + size_each = 0;
  7997. + break;
  7998. +
  7999. + case 1:
  8000. + size_each = 0x30000000;
  8001. + break;
  8002. +
  8003. + case 2 ... 3:
  8004. + size_each = 0x10000000;
  8005. + break;
  8006. +
  8007. + case 4 ... 6:
  8008. + size_each = 0x08000000;
  8009. + break;
  8010. +
  8011. + case 7:
  8012. + size_each = 0x04000000;
  8013. + break;
  8014. +
  8015. + default:
  8016. + panic("invalid number of PCIe ports");
  8017. + }
  8018. +
  8019. + start = MV78XX0_PCIE_MEM_PHYS_BASE;
  8020. + for (i = 0; i < num_pcie_ports; i++) {
  8021. + struct pcie_port *pp = pcie_port + i;
  8022. +
  8023. + pp->res[1].start = start;
  8024. + pp->res[1].end = start + size_each - 1;
  8025. + start += size_each;
  8026. + }
  8027. +
  8028. + for (i = 0; i < num_pcie_ports; i++) {
  8029. + struct pcie_port *pp = pcie_port + i;
  8030. +
  8031. + if (request_resource(&pcie_io_space, &pp->res[0]))
  8032. + panic("can't allocate PCIe I/O sub-space");
  8033. +
  8034. + if (request_resource(&pcie_mem_space, &pp->res[1]))
  8035. + panic("can't allocate PCIe MEM sub-space");
  8036. + }
  8037. +
  8038. + win = 0;
  8039. + for (i = 0; i < num_pcie_ports; i++) {
  8040. + struct pcie_port *pp = pcie_port + i;
  8041. +
  8042. + mv78xx0_setup_pcie_io_win(win++, pp->res[0].start,
  8043. + pp->res[0].end - pp->res[0].start + 1,
  8044. + pp->maj, pp->min);
  8045. +
  8046. + mv78xx0_setup_pcie_mem_win(win++, pp->res[1].start,
  8047. + pp->res[1].end - pp->res[1].start + 1,
  8048. + pp->maj, pp->min);
  8049. + }
  8050. +}
  8051. +
  8052. +static int __init mv78xx0_pcie_setup(int nr, struct pci_sys_data *sys)
  8053. +{
  8054. + struct pcie_port *pp;
  8055. +
  8056. + if (nr >= num_pcie_ports)
  8057. + return 0;
  8058. +
  8059. + pp = &pcie_port[nr];
  8060. + pp->root_bus_nr = sys->busnr;
  8061. +
  8062. + /*
  8063. + * Generic PCIe unit setup.
  8064. + */
  8065. + orion_pcie_set_local_bus_nr(pp->base, sys->busnr);
  8066. + orion_pcie_setup(pp->base, &mv78xx0_mbus_dram_info);
  8067. +
  8068. + sys->resource[0] = &pp->res[0];
  8069. + sys->resource[1] = &pp->res[1];
  8070. + sys->resource[2] = NULL;
  8071. +
  8072. + return 1;
  8073. +}
  8074. +
  8075. +static struct pcie_port *bus_to_port(int bus)
  8076. +{
  8077. + int i;
  8078. +
  8079. + for (i = num_pcie_ports - 1; i >= 0; i--) {
  8080. + int rbus = pcie_port[i].root_bus_nr;
  8081. + if (rbus != -1 && rbus <= bus)
  8082. + break;
  8083. + }
  8084. +
  8085. + return i >= 0 ? pcie_port + i : NULL;
  8086. +}
  8087. +
  8088. +static int pcie_valid_config(struct pcie_port *pp, int bus, int dev)
  8089. +{
  8090. + /*
  8091. + * Don't go out when trying to access nonexisting devices
  8092. + * on the local bus.
  8093. + */
  8094. + if (bus == pp->root_bus_nr && dev > 1)
  8095. + return 0;
  8096. +
  8097. + return 1;
  8098. +}
  8099. +
  8100. +static int pcie_rd_conf(struct pci_bus *bus, u32 devfn, int where,
  8101. + int size, u32 *val)
  8102. +{
  8103. + struct pcie_port *pp = bus_to_port(bus->number);
  8104. + unsigned long flags;
  8105. + int ret;
  8106. +
  8107. + if (pcie_valid_config(pp, bus->number, PCI_SLOT(devfn)) == 0) {
  8108. + *val = 0xffffffff;
  8109. + return PCIBIOS_DEVICE_NOT_FOUND;
  8110. + }
  8111. +
  8112. + spin_lock_irqsave(&pp->conf_lock, flags);
  8113. + ret = orion_pcie_rd_conf(pp->base, bus, devfn, where, size, val);
  8114. + spin_unlock_irqrestore(&pp->conf_lock, flags);
  8115. +
  8116. + return ret;
  8117. +}
  8118. +
  8119. +static int pcie_wr_conf(struct pci_bus *bus, u32 devfn,
  8120. + int where, int size, u32 val)
  8121. +{
  8122. + struct pcie_port *pp = bus_to_port(bus->number);
  8123. + unsigned long flags;
  8124. + int ret;
  8125. +
  8126. + if (pcie_valid_config(pp, bus->number, PCI_SLOT(devfn)) == 0)
  8127. + return PCIBIOS_DEVICE_NOT_FOUND;
  8128. +
  8129. + spin_lock_irqsave(&pp->conf_lock, flags);
  8130. + ret = orion_pcie_wr_conf(pp->base, bus, devfn, where, size, val);
  8131. + spin_unlock_irqrestore(&pp->conf_lock, flags);
  8132. +
  8133. + return ret;
  8134. +}
  8135. +
  8136. +static struct pci_ops pcie_ops = {
  8137. + .read = pcie_rd_conf,
  8138. + .write = pcie_wr_conf,
  8139. +};
  8140. +
  8141. +static void __devinit rc_pci_fixup(struct pci_dev *dev)
  8142. +{
  8143. + /*
  8144. + * Prevent enumeration of root complex.
  8145. + */
  8146. + if (dev->bus->parent == NULL && dev->devfn == 0) {
  8147. + int i;
  8148. +
  8149. + for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
  8150. + dev->resource[i].start = 0;
  8151. + dev->resource[i].end = 0;
  8152. + dev->resource[i].flags = 0;
  8153. + }
  8154. + }
  8155. +}
  8156. +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MARVELL, PCI_ANY_ID, rc_pci_fixup);
  8157. +
  8158. +static struct pci_bus __init *
  8159. +mv78xx0_pcie_scan_bus(int nr, struct pci_sys_data *sys)
  8160. +{
  8161. + struct pci_bus *bus;
  8162. +
  8163. + if (nr < num_pcie_ports) {
  8164. + bus = pci_scan_bus(sys->busnr, &pcie_ops, sys);
  8165. + } else {
  8166. + bus = NULL;
  8167. + BUG();
  8168. + }
  8169. +
  8170. + return bus;
  8171. +}
  8172. +
  8173. +static int __init mv78xx0_pcie_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
  8174. +{
  8175. + struct pcie_port *pp = bus_to_port(dev->bus->number);
  8176. +
  8177. + return IRQ_MV78XX0_PCIE_00 + (pp->maj << 2) + pp->min;
  8178. +}
  8179. +
  8180. +static struct hw_pci mv78xx0_pci __initdata = {
  8181. + .nr_controllers = 8,
  8182. + .preinit = mv78xx0_pcie_preinit,
  8183. + .swizzle = pci_std_swizzle,
  8184. + .setup = mv78xx0_pcie_setup,
  8185. + .scan = mv78xx0_pcie_scan_bus,
  8186. + .map_irq = mv78xx0_pcie_map_irq,
  8187. +};
  8188. +
  8189. +static void __init add_pcie_port(int maj, int min, unsigned long base)
  8190. +{
  8191. + printk(KERN_INFO "MV78xx0 PCIe port %d.%d: ", maj, min);
  8192. +
  8193. + if (orion_pcie_link_up((void __iomem *)base)) {
  8194. + struct pcie_port *pp = &pcie_port[num_pcie_ports++];
  8195. +
  8196. + printk("link up\n");
  8197. +
  8198. + pp->maj = maj;
  8199. + pp->min = min;
  8200. + pp->root_bus_nr = -1;
  8201. + pp->base = (void __iomem *)base;
  8202. + spin_lock_init(&pp->conf_lock);
  8203. + memset(pp->res, 0, sizeof(pp->res));
  8204. + } else {
  8205. + printk("link down, ignoring\n");
  8206. + }
  8207. +}
  8208. +
  8209. +void __init mv78xx0_pcie_init(int init_port0, int init_port1)
  8210. +{
  8211. + if (init_port0) {
  8212. + add_pcie_port(0, 0, PCIE00_VIRT_BASE);
  8213. + if (!orion_pcie_x4_mode((void __iomem *)PCIE00_VIRT_BASE)) {
  8214. + add_pcie_port(0, 1, PCIE01_VIRT_BASE);
  8215. + add_pcie_port(0, 2, PCIE02_VIRT_BASE);
  8216. + add_pcie_port(0, 3, PCIE03_VIRT_BASE);
  8217. + }
  8218. + }
  8219. +
  8220. + if (init_port1) {
  8221. + add_pcie_port(1, 0, PCIE10_VIRT_BASE);
  8222. + if (!orion_pcie_x4_mode((void __iomem *)PCIE10_VIRT_BASE)) {
  8223. + add_pcie_port(1, 1, PCIE11_VIRT_BASE);
  8224. + add_pcie_port(1, 2, PCIE12_VIRT_BASE);
  8225. + add_pcie_port(1, 3, PCIE13_VIRT_BASE);
  8226. + }
  8227. + }
  8228. +
  8229. + pci_common_init(&mv78xx0_pci);
  8230. +}
  8231. --- a/arch/arm/mach-orion5x/Kconfig
  8232. +++ b/arch/arm/mach-orion5x/Kconfig
  8233. @@ -44,6 +44,36 @@
  8234. Buffalo Linkstation Pro/Live platform. Both v1 and
  8235. v2 devices are supported.
  8236. +config MACH_TS409
  8237. + bool "QNAP TS-409"
  8238. + help
  8239. + Say 'Y' here if you want your kernel to support the
  8240. + QNAP TS-409 platform.
  8241. +
  8242. +config MACH_WRT350N_V2
  8243. + bool "Linksys WRT350N v2"
  8244. + help
  8245. + Say 'Y' here if you want your kernel to support the
  8246. + Linksys WRT350N v2 platform.
  8247. +
  8248. +config MACH_TS78XX
  8249. + bool "Technologic Systems TS-78xx"
  8250. + help
  8251. + Say 'Y' here if you want your kernel to support the
  8252. + Technologic Systems TS-78xx platform.
  8253. +
  8254. +config MACH_MV2120
  8255. + bool "HP Media Vault mv2120"
  8256. + help
  8257. + Say 'Y' here if you want your kernel to support the
  8258. + HP Media Vault mv2120 or mv5100.
  8259. +
  8260. +config MACH_MSS2
  8261. + bool "Maxtor Shared Storage II"
  8262. + help
  8263. + Say 'Y' here if you want your kernel to support the
  8264. + Maxtor Shared Storage II platform.
  8265. +
  8266. endmenu
  8267. endif
  8268. --- a/arch/arm/mach-orion5x/Makefile
  8269. +++ b/arch/arm/mach-orion5x/Makefile
  8270. @@ -1,7 +1,12 @@
  8271. -obj-y += common.o addr-map.o pci.o gpio.o irq.o
  8272. +obj-y += common.o addr-map.o pci.o gpio.o irq.o mpp.o
  8273. obj-$(CONFIG_MACH_DB88F5281) += db88f5281-setup.o
  8274. obj-$(CONFIG_MACH_RD88F5182) += rd88f5182-setup.o
  8275. obj-$(CONFIG_MACH_KUROBOX_PRO) += kurobox_pro-setup.o
  8276. obj-$(CONFIG_MACH_LINKSTATION_PRO) += kurobox_pro-setup.o
  8277. obj-$(CONFIG_MACH_DNS323) += dns323-setup.o
  8278. -obj-$(CONFIG_MACH_TS209) += ts209-setup.o
  8279. +obj-$(CONFIG_MACH_TS209) += ts209-setup.o tsx09-common.o
  8280. +obj-$(CONFIG_MACH_TS409) += ts409-setup.o tsx09-common.o
  8281. +obj-$(CONFIG_MACH_WRT350N_V2) += wrt350n-v2-setup.o
  8282. +obj-$(CONFIG_MACH_TS78XX) += ts78xx-setup.o
  8283. +obj-$(CONFIG_MACH_MV2120) += mv2120-setup.o
  8284. +obj-$(CONFIG_MACH_MSS2) += mss2-setup.o
  8285. --- a/arch/arm/mach-orion5x/addr-map.c
  8286. +++ b/arch/arm/mach-orion5x/addr-map.c
  8287. @@ -70,6 +70,7 @@
  8288. struct mbus_dram_target_info orion5x_mbus_dram_info;
  8289. +static int __initdata win_alloc_count;
  8290. static int __init orion5x_cpu_win_can_remap(int win)
  8291. {
  8292. @@ -87,16 +88,22 @@
  8293. static void __init setup_cpu_win(int win, u32 base, u32 size,
  8294. u8 target, u8 attr, int remap)
  8295. {
  8296. - orion5x_write(CPU_WIN_BASE(win), base & 0xffff0000);
  8297. - orion5x_write(CPU_WIN_CTRL(win),
  8298. - ((size - 1) & 0xffff0000) | (attr << 8) | (target << 4) | 1);
  8299. + if (win >= 8) {
  8300. + printk(KERN_ERR "setup_cpu_win: trying to allocate "
  8301. + "window %d\n", win);
  8302. + return;
  8303. + }
  8304. +
  8305. + writel(base & 0xffff0000, CPU_WIN_BASE(win));
  8306. + writel(((size - 1) & 0xffff0000) | (attr << 8) | (target << 4) | 1,
  8307. + CPU_WIN_CTRL(win));
  8308. if (orion5x_cpu_win_can_remap(win)) {
  8309. if (remap < 0)
  8310. remap = base;
  8311. - orion5x_write(CPU_WIN_REMAP_LO(win), remap & 0xffff0000);
  8312. - orion5x_write(CPU_WIN_REMAP_HI(win), 0);
  8313. + writel(remap & 0xffff0000, CPU_WIN_REMAP_LO(win));
  8314. + writel(0, CPU_WIN_REMAP_HI(win));
  8315. }
  8316. }
  8317. @@ -109,11 +116,11 @@
  8318. * First, disable and clear windows.
  8319. */
  8320. for (i = 0; i < 8; i++) {
  8321. - orion5x_write(CPU_WIN_BASE(i), 0);
  8322. - orion5x_write(CPU_WIN_CTRL(i), 0);
  8323. + writel(0, CPU_WIN_BASE(i));
  8324. + writel(0, CPU_WIN_CTRL(i));
  8325. if (orion5x_cpu_win_can_remap(i)) {
  8326. - orion5x_write(CPU_WIN_REMAP_LO(i), 0);
  8327. - orion5x_write(CPU_WIN_REMAP_HI(i), 0);
  8328. + writel(0, CPU_WIN_REMAP_LO(i));
  8329. + writel(0, CPU_WIN_REMAP_HI(i));
  8330. }
  8331. }
  8332. @@ -128,6 +135,7 @@
  8333. TARGET_PCIE, ATTR_PCIE_MEM, -1);
  8334. setup_cpu_win(3, ORION5X_PCI_MEM_PHYS_BASE, ORION5X_PCI_MEM_SIZE,
  8335. TARGET_PCI, ATTR_PCI_MEM, -1);
  8336. + win_alloc_count = 4;
  8337. /*
  8338. * Setup MBUS dram target info.
  8339. @@ -147,8 +155,8 @@
  8340. w = &orion5x_mbus_dram_info.cs[cs++];
  8341. w->cs_index = i;
  8342. w->mbus_attr = 0xf & ~(1 << i);
  8343. - w->base = base & 0xff000000;
  8344. - w->size = (size | 0x00ffffff) + 1;
  8345. + w->base = base & 0xffff0000;
  8346. + w->size = (size | 0x0000ffff) + 1;
  8347. }
  8348. }
  8349. orion5x_mbus_dram_info.num_cs = cs;
  8350. @@ -156,25 +164,30 @@
  8351. void __init orion5x_setup_dev_boot_win(u32 base, u32 size)
  8352. {
  8353. - setup_cpu_win(4, base, size, TARGET_DEV_BUS, ATTR_DEV_BOOT, -1);
  8354. + setup_cpu_win(win_alloc_count++, base, size,
  8355. + TARGET_DEV_BUS, ATTR_DEV_BOOT, -1);
  8356. }
  8357. void __init orion5x_setup_dev0_win(u32 base, u32 size)
  8358. {
  8359. - setup_cpu_win(5, base, size, TARGET_DEV_BUS, ATTR_DEV_CS0, -1);
  8360. + setup_cpu_win(win_alloc_count++, base, size,
  8361. + TARGET_DEV_BUS, ATTR_DEV_CS0, -1);
  8362. }
  8363. void __init orion5x_setup_dev1_win(u32 base, u32 size)
  8364. {
  8365. - setup_cpu_win(6, base, size, TARGET_DEV_BUS, ATTR_DEV_CS1, -1);
  8366. + setup_cpu_win(win_alloc_count++, base, size,
  8367. + TARGET_DEV_BUS, ATTR_DEV_CS1, -1);
  8368. }
  8369. void __init orion5x_setup_dev2_win(u32 base, u32 size)
  8370. {
  8371. - setup_cpu_win(7, base, size, TARGET_DEV_BUS, ATTR_DEV_CS2, -1);
  8372. + setup_cpu_win(win_alloc_count++, base, size,
  8373. + TARGET_DEV_BUS, ATTR_DEV_CS2, -1);
  8374. }
  8375. void __init orion5x_setup_pcie_wa_win(u32 base, u32 size)
  8376. {
  8377. - setup_cpu_win(7, base, size, TARGET_PCIE, ATTR_PCIE_WA, -1);
  8378. + setup_cpu_win(win_alloc_count++, base, size,
  8379. + TARGET_PCIE, ATTR_PCIE_WA, -1);
  8380. }
  8381. --- a/arch/arm/mach-orion5x/common.c
  8382. +++ b/arch/arm/mach-orion5x/common.c
  8383. @@ -39,25 +39,22 @@
  8384. .virtual = ORION5X_REGS_VIRT_BASE,
  8385. .pfn = __phys_to_pfn(ORION5X_REGS_PHYS_BASE),
  8386. .length = ORION5X_REGS_SIZE,
  8387. - .type = MT_DEVICE
  8388. - },
  8389. - {
  8390. + .type = MT_DEVICE,
  8391. + }, {
  8392. .virtual = ORION5X_PCIE_IO_VIRT_BASE,
  8393. .pfn = __phys_to_pfn(ORION5X_PCIE_IO_PHYS_BASE),
  8394. .length = ORION5X_PCIE_IO_SIZE,
  8395. - .type = MT_DEVICE
  8396. - },
  8397. - {
  8398. + .type = MT_DEVICE,
  8399. + }, {
  8400. .virtual = ORION5X_PCI_IO_VIRT_BASE,
  8401. .pfn = __phys_to_pfn(ORION5X_PCI_IO_PHYS_BASE),
  8402. .length = ORION5X_PCI_IO_SIZE,
  8403. - .type = MT_DEVICE
  8404. - },
  8405. - {
  8406. + .type = MT_DEVICE,
  8407. + }, {
  8408. .virtual = ORION5X_PCIE_WA_VIRT_BASE,
  8409. .pfn = __phys_to_pfn(ORION5X_PCIE_WA_PHYS_BASE),
  8410. .length = ORION5X_PCIE_WA_SIZE,
  8411. - .type = MT_DEVICE
  8412. + .type = MT_DEVICE,
  8413. },
  8414. };
  8415. @@ -66,101 +63,32 @@
  8416. iotable_init(orion5x_io_desc, ARRAY_SIZE(orion5x_io_desc));
  8417. }
  8418. +
  8419. /*****************************************************************************
  8420. - * UART
  8421. + * EHCI
  8422. ****************************************************************************/
  8423. -
  8424. -static struct resource orion5x_uart_resources[] = {
  8425. - {
  8426. - .start = UART0_PHYS_BASE,
  8427. - .end = UART0_PHYS_BASE + 0xff,
  8428. - .flags = IORESOURCE_MEM,
  8429. - },
  8430. - {
  8431. - .start = IRQ_ORION5X_UART0,
  8432. - .end = IRQ_ORION5X_UART0,
  8433. - .flags = IORESOURCE_IRQ,
  8434. - },
  8435. - {
  8436. - .start = UART1_PHYS_BASE,
  8437. - .end = UART1_PHYS_BASE + 0xff,
  8438. - .flags = IORESOURCE_MEM,
  8439. - },
  8440. - {
  8441. - .start = IRQ_ORION5X_UART1,
  8442. - .end = IRQ_ORION5X_UART1,
  8443. - .flags = IORESOURCE_IRQ,
  8444. - },
  8445. -};
  8446. -
  8447. -static struct plat_serial8250_port orion5x_uart_data[] = {
  8448. - {
  8449. - .mapbase = UART0_PHYS_BASE,
  8450. - .membase = (char *)UART0_VIRT_BASE,
  8451. - .irq = IRQ_ORION5X_UART0,
  8452. - .flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF,
  8453. - .iotype = UPIO_MEM,
  8454. - .regshift = 2,
  8455. - .uartclk = ORION5X_TCLK,
  8456. - },
  8457. - {
  8458. - .mapbase = UART1_PHYS_BASE,
  8459. - .membase = (char *)UART1_VIRT_BASE,
  8460. - .irq = IRQ_ORION5X_UART1,
  8461. - .flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF,
  8462. - .iotype = UPIO_MEM,
  8463. - .regshift = 2,
  8464. - .uartclk = ORION5X_TCLK,
  8465. - },
  8466. - { },
  8467. +static struct orion_ehci_data orion5x_ehci_data = {
  8468. + .dram = &orion5x_mbus_dram_info,
  8469. };
  8470. -static struct platform_device orion5x_uart = {
  8471. - .name = "serial8250",
  8472. - .id = PLAT8250_DEV_PLATFORM,
  8473. - .dev = {
  8474. - .platform_data = orion5x_uart_data,
  8475. - },
  8476. - .resource = orion5x_uart_resources,
  8477. - .num_resources = ARRAY_SIZE(orion5x_uart_resources),
  8478. -};
  8479. +static u64 ehci_dmamask = 0xffffffffUL;
  8480. -/*******************************************************************************
  8481. - * USB Controller - 2 interfaces
  8482. - ******************************************************************************/
  8483. +/*****************************************************************************
  8484. + * EHCI0
  8485. + ****************************************************************************/
  8486. static struct resource orion5x_ehci0_resources[] = {
  8487. {
  8488. .start = ORION5X_USB0_PHYS_BASE,
  8489. .end = ORION5X_USB0_PHYS_BASE + SZ_4K - 1,
  8490. .flags = IORESOURCE_MEM,
  8491. - },
  8492. - {
  8493. + }, {
  8494. .start = IRQ_ORION5X_USB0_CTRL,
  8495. .end = IRQ_ORION5X_USB0_CTRL,
  8496. .flags = IORESOURCE_IRQ,
  8497. },
  8498. };
  8499. -static struct resource orion5x_ehci1_resources[] = {
  8500. - {
  8501. - .start = ORION5X_USB1_PHYS_BASE,
  8502. - .end = ORION5X_USB1_PHYS_BASE + SZ_4K - 1,
  8503. - .flags = IORESOURCE_MEM,
  8504. - },
  8505. - {
  8506. - .start = IRQ_ORION5X_USB1_CTRL,
  8507. - .end = IRQ_ORION5X_USB1_CTRL,
  8508. - .flags = IORESOURCE_IRQ,
  8509. - },
  8510. -};
  8511. -
  8512. -static struct orion_ehci_data orion5x_ehci_data = {
  8513. - .dram = &orion5x_mbus_dram_info,
  8514. -};
  8515. -
  8516. -static u64 ehci_dmamask = 0xffffffffUL;
  8517. -
  8518. static struct platform_device orion5x_ehci0 = {
  8519. .name = "orion-ehci",
  8520. .id = 0,
  8521. @@ -173,6 +101,27 @@
  8522. .num_resources = ARRAY_SIZE(orion5x_ehci0_resources),
  8523. };
  8524. +void __init orion5x_ehci0_init(void)
  8525. +{
  8526. + platform_device_register(&orion5x_ehci0);
  8527. +}
  8528. +
  8529. +
  8530. +/*****************************************************************************
  8531. + * EHCI1
  8532. + ****************************************************************************/
  8533. +static struct resource orion5x_ehci1_resources[] = {
  8534. + {
  8535. + .start = ORION5X_USB1_PHYS_BASE,
  8536. + .end = ORION5X_USB1_PHYS_BASE + SZ_4K - 1,
  8537. + .flags = IORESOURCE_MEM,
  8538. + }, {
  8539. + .start = IRQ_ORION5X_USB1_CTRL,
  8540. + .end = IRQ_ORION5X_USB1_CTRL,
  8541. + .flags = IORESOURCE_IRQ,
  8542. + },
  8543. +};
  8544. +
  8545. static struct platform_device orion5x_ehci1 = {
  8546. .name = "orion-ehci",
  8547. .id = 1,
  8548. @@ -185,11 +134,15 @@
  8549. .num_resources = ARRAY_SIZE(orion5x_ehci1_resources),
  8550. };
  8551. +void __init orion5x_ehci1_init(void)
  8552. +{
  8553. + platform_device_register(&orion5x_ehci1);
  8554. +}
  8555. +
  8556. +
  8557. /*****************************************************************************
  8558. - * Gigabit Ethernet port
  8559. - * (The Orion and Discovery (MV643xx) families use the same Ethernet driver)
  8560. + * GigE
  8561. ****************************************************************************/
  8562. -
  8563. struct mv643xx_eth_shared_platform_data orion5x_eth_shared_data = {
  8564. .dram = &orion5x_mbus_dram_info,
  8565. .t_clk = ORION5X_TCLK,
  8566. @@ -219,7 +172,7 @@
  8567. .start = IRQ_ORION5X_ETH_SUM,
  8568. .end = IRQ_ORION5X_ETH_SUM,
  8569. .flags = IORESOURCE_IRQ,
  8570. - }
  8571. + },
  8572. };
  8573. static struct platform_device orion5x_eth = {
  8574. @@ -238,11 +191,10 @@
  8575. platform_device_register(&orion5x_eth);
  8576. }
  8577. +
  8578. /*****************************************************************************
  8579. - * I2C controller
  8580. - * (The Orion and Discovery (MV643xx) families share the same I2C controller)
  8581. + * I2C
  8582. ****************************************************************************/
  8583. -
  8584. static struct mv64xxx_i2c_pdata orion5x_i2c_pdata = {
  8585. .freq_m = 8, /* assumes 166 MHz TCLK */
  8586. .freq_n = 3,
  8587. @@ -251,16 +203,15 @@
  8588. static struct resource orion5x_i2c_resources[] = {
  8589. {
  8590. - .name = "i2c base",
  8591. - .start = I2C_PHYS_BASE,
  8592. - .end = I2C_PHYS_BASE + 0x20 -1,
  8593. - .flags = IORESOURCE_MEM,
  8594. - },
  8595. - {
  8596. - .name = "i2c irq",
  8597. - .start = IRQ_ORION5X_I2C,
  8598. - .end = IRQ_ORION5X_I2C,
  8599. - .flags = IORESOURCE_IRQ,
  8600. + .name = "i2c base",
  8601. + .start = I2C_PHYS_BASE,
  8602. + .end = I2C_PHYS_BASE + 0x1f,
  8603. + .flags = IORESOURCE_MEM,
  8604. + }, {
  8605. + .name = "i2c irq",
  8606. + .start = IRQ_ORION5X_I2C,
  8607. + .end = IRQ_ORION5X_I2C,
  8608. + .flags = IORESOURCE_IRQ,
  8609. },
  8610. };
  8611. @@ -270,36 +221,41 @@
  8612. .num_resources = ARRAY_SIZE(orion5x_i2c_resources),
  8613. .resource = orion5x_i2c_resources,
  8614. .dev = {
  8615. - .platform_data = &orion5x_i2c_pdata,
  8616. + .platform_data = &orion5x_i2c_pdata,
  8617. },
  8618. };
  8619. +void __init orion5x_i2c_init(void)
  8620. +{
  8621. + platform_device_register(&orion5x_i2c);
  8622. +}
  8623. +
  8624. +
  8625. /*****************************************************************************
  8626. - * Sata port
  8627. + * SATA
  8628. ****************************************************************************/
  8629. static struct resource orion5x_sata_resources[] = {
  8630. - {
  8631. - .name = "sata base",
  8632. - .start = ORION5X_SATA_PHYS_BASE,
  8633. - .end = ORION5X_SATA_PHYS_BASE + 0x5000 - 1,
  8634. - .flags = IORESOURCE_MEM,
  8635. - },
  8636. {
  8637. - .name = "sata irq",
  8638. - .start = IRQ_ORION5X_SATA,
  8639. - .end = IRQ_ORION5X_SATA,
  8640. - .flags = IORESOURCE_IRQ,
  8641. - },
  8642. + .name = "sata base",
  8643. + .start = ORION5X_SATA_PHYS_BASE,
  8644. + .end = ORION5X_SATA_PHYS_BASE + 0x5000 - 1,
  8645. + .flags = IORESOURCE_MEM,
  8646. + }, {
  8647. + .name = "sata irq",
  8648. + .start = IRQ_ORION5X_SATA,
  8649. + .end = IRQ_ORION5X_SATA,
  8650. + .flags = IORESOURCE_IRQ,
  8651. + },
  8652. };
  8653. static struct platform_device orion5x_sata = {
  8654. - .name = "sata_mv",
  8655. - .id = 0,
  8656. + .name = "sata_mv",
  8657. + .id = 0,
  8658. .dev = {
  8659. .coherent_dma_mask = 0xffffffff,
  8660. },
  8661. - .num_resources = ARRAY_SIZE(orion5x_sata_resources),
  8662. - .resource = orion5x_sata_resources,
  8663. + .num_resources = ARRAY_SIZE(orion5x_sata_resources),
  8664. + .resource = orion5x_sata_resources,
  8665. };
  8666. void __init orion5x_sata_init(struct mv_sata_platform_data *sata_data)
  8667. @@ -309,23 +265,111 @@
  8668. platform_device_register(&orion5x_sata);
  8669. }
  8670. +
  8671. /*****************************************************************************
  8672. - * Time handling
  8673. + * UART0
  8674. + ****************************************************************************/
  8675. +static struct plat_serial8250_port orion5x_uart0_data[] = {
  8676. + {
  8677. + .mapbase = UART0_PHYS_BASE,
  8678. + .membase = (char *)UART0_VIRT_BASE,
  8679. + .irq = IRQ_ORION5X_UART0,
  8680. + .flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF,
  8681. + .iotype = UPIO_MEM,
  8682. + .regshift = 2,
  8683. + .uartclk = ORION5X_TCLK,
  8684. + }, {
  8685. + },
  8686. +};
  8687. +
  8688. +static struct resource orion5x_uart0_resources[] = {
  8689. + {
  8690. + .start = UART0_PHYS_BASE,
  8691. + .end = UART0_PHYS_BASE + 0xff,
  8692. + .flags = IORESOURCE_MEM,
  8693. + }, {
  8694. + .start = IRQ_ORION5X_UART0,
  8695. + .end = IRQ_ORION5X_UART0,
  8696. + .flags = IORESOURCE_IRQ,
  8697. + },
  8698. +};
  8699. +
  8700. +static struct platform_device orion5x_uart0 = {
  8701. + .name = "serial8250",
  8702. + .id = PLAT8250_DEV_PLATFORM,
  8703. + .dev = {
  8704. + .platform_data = orion5x_uart0_data,
  8705. + },
  8706. + .resource = orion5x_uart0_resources,
  8707. + .num_resources = ARRAY_SIZE(orion5x_uart0_resources),
  8708. +};
  8709. +
  8710. +void __init orion5x_uart0_init(void)
  8711. +{
  8712. + platform_device_register(&orion5x_uart0);
  8713. +}
  8714. +
  8715. +
  8716. +/*****************************************************************************
  8717. + * UART1
  8718. ****************************************************************************/
  8719. +static struct plat_serial8250_port orion5x_uart1_data[] = {
  8720. + {
  8721. + .mapbase = UART1_PHYS_BASE,
  8722. + .membase = (char *)UART1_VIRT_BASE,
  8723. + .irq = IRQ_ORION5X_UART1,
  8724. + .flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF,
  8725. + .iotype = UPIO_MEM,
  8726. + .regshift = 2,
  8727. + .uartclk = ORION5X_TCLK,
  8728. + }, {
  8729. + },
  8730. +};
  8731. +
  8732. +static struct resource orion5x_uart1_resources[] = {
  8733. + {
  8734. + .start = UART1_PHYS_BASE,
  8735. + .end = UART1_PHYS_BASE + 0xff,
  8736. + .flags = IORESOURCE_MEM,
  8737. + }, {
  8738. + .start = IRQ_ORION5X_UART1,
  8739. + .end = IRQ_ORION5X_UART1,
  8740. + .flags = IORESOURCE_IRQ,
  8741. + },
  8742. +};
  8743. +
  8744. +static struct platform_device orion5x_uart1 = {
  8745. + .name = "serial8250",
  8746. + .id = PLAT8250_DEV_PLATFORM1,
  8747. + .dev = {
  8748. + .platform_data = orion5x_uart1_data,
  8749. + },
  8750. + .resource = orion5x_uart1_resources,
  8751. + .num_resources = ARRAY_SIZE(orion5x_uart1_resources),
  8752. +};
  8753. +
  8754. +void __init orion5x_uart1_init(void)
  8755. +{
  8756. + platform_device_register(&orion5x_uart1);
  8757. +}
  8758. +
  8759. +/*****************************************************************************
  8760. + * Time handling
  8761. + ****************************************************************************/
  8762. static void orion5x_timer_init(void)
  8763. {
  8764. orion_time_init(IRQ_ORION5X_BRIDGE, ORION5X_TCLK);
  8765. }
  8766. struct sys_timer orion5x_timer = {
  8767. - .init = orion5x_timer_init,
  8768. + .init = orion5x_timer_init,
  8769. };
  8770. +
  8771. /*****************************************************************************
  8772. * General
  8773. ****************************************************************************/
  8774. -
  8775. /*
  8776. * Identify device ID and rev from PCIe configuration header space '0'.
  8777. */
  8778. @@ -350,8 +394,10 @@
  8779. } else if (*dev == MV88F5181_DEV_ID) {
  8780. if (*rev == MV88F5181_REV_B1) {
  8781. *dev_name = "MV88F5181-Rev-B1";
  8782. + } else if (*rev == MV88F5181L_REV_A1) {
  8783. + *dev_name = "MV88F5181L-Rev-A1";
  8784. } else {
  8785. - *dev_name = "MV88F5181-Rev-Unsupported";
  8786. + *dev_name = "MV88F5181(L)-Rev-Unsupported";
  8787. }
  8788. } else {
  8789. *dev_name = "Device-Unknown";
  8790. @@ -370,15 +416,6 @@
  8791. * Setup Orion address map
  8792. */
  8793. orion5x_setup_cpu_mbus_bridge();
  8794. -
  8795. - /*
  8796. - * Register devices.
  8797. - */
  8798. - platform_device_register(&orion5x_uart);
  8799. - platform_device_register(&orion5x_ehci0);
  8800. - if (dev == MV88F5182_DEV_ID)
  8801. - platform_device_register(&orion5x_ehci1);
  8802. - platform_device_register(&orion5x_i2c);
  8803. }
  8804. /*
  8805. --- a/arch/arm/mach-orion5x/common.h
  8806. +++ b/arch/arm/mach-orion5x/common.h
  8807. @@ -1,10 +1,12 @@
  8808. #ifndef __ARCH_ORION5X_COMMON_H
  8809. #define __ARCH_ORION5X_COMMON_H
  8810. +struct mv643xx_eth_platform_data;
  8811. +struct mv_sata_platform_data;
  8812. +
  8813. /*
  8814. * Basic Orion init functions used early by machine-setup.
  8815. */
  8816. -
  8817. void orion5x_map_io(void);
  8818. void orion5x_init_irq(void);
  8819. void orion5x_init(void);
  8820. @@ -23,13 +25,19 @@
  8821. void orion5x_setup_dev2_win(u32 base, u32 size);
  8822. void orion5x_setup_pcie_wa_win(u32 base, u32 size);
  8823. +void orion5x_ehci0_init(void);
  8824. +void orion5x_ehci1_init(void);
  8825. +void orion5x_eth_init(struct mv643xx_eth_platform_data *eth_data);
  8826. +void orion5x_i2c_init(void);
  8827. +void orion5x_sata_init(struct mv_sata_platform_data *sata_data);
  8828. +void orion5x_uart0_init(void);
  8829. +void orion5x_uart1_init(void);
  8830. +
  8831. /*
  8832. - * Shared code used internally by other Orion core functions.
  8833. - * (/mach-orion/pci.c)
  8834. + * PCIe/PCI functions.
  8835. */
  8836. -
  8837. -struct pci_sys_data;
  8838. struct pci_bus;
  8839. +struct pci_sys_data;
  8840. void orion5x_pcie_id(u32 *dev, u32 *rev);
  8841. int orion5x_pci_sys_setup(int nr, struct pci_sys_data *sys);
  8842. @@ -40,26 +48,9 @@
  8843. * Valid GPIO pins according to MPP setup, used by machine-setup.
  8844. * (/mach-orion/gpio.c).
  8845. */
  8846. -
  8847. -void orion5x_gpio_set_valid_pins(u32 pins);
  8848. +void orion5x_gpio_set_valid(unsigned pin, int valid);
  8849. void gpio_display(void); /* debug */
  8850. -/*
  8851. - * Pull in Orion Ethernet platform_data, used by machine-setup
  8852. - */
  8853. -
  8854. -struct mv643xx_eth_platform_data;
  8855. -
  8856. -void orion5x_eth_init(struct mv643xx_eth_platform_data *eth_data);
  8857. -
  8858. -/*
  8859. - * Orion Sata platform_data, used by machine-setup
  8860. - */
  8861. -
  8862. -struct mv_sata_platform_data;
  8863. -
  8864. -void orion5x_sata_init(struct mv_sata_platform_data *sata_data);
  8865. -
  8866. struct machine_desc;
  8867. struct meminfo;
  8868. struct tag;
  8869. --- a/arch/arm/mach-orion5x/db88f5281-setup.c
  8870. +++ b/arch/arm/mach-orion5x/db88f5281-setup.c
  8871. @@ -27,6 +27,7 @@
  8872. #include <asm/arch/orion5x.h>
  8873. #include <asm/plat-orion/orion_nand.h>
  8874. #include "common.h"
  8875. +#include "mpp.h"
  8876. /*****************************************************************************
  8877. * DB-88F5281 on board devices
  8878. @@ -86,7 +87,7 @@
  8879. .name = "physmap-flash",
  8880. .id = 0,
  8881. .dev = {
  8882. - .platform_data = &db88f5281_boot_flash_data,
  8883. + .platform_data = &db88f5281_boot_flash_data,
  8884. },
  8885. .num_resources = 1,
  8886. .resource = &db88f5281_boot_flash_resource,
  8887. @@ -110,7 +111,7 @@
  8888. .name = "physmap-flash",
  8889. .id = 1,
  8890. .dev = {
  8891. - .platform_data = &db88f5281_nor_flash_data,
  8892. + .platform_data = &db88f5281_nor_flash_data,
  8893. },
  8894. .num_resources = 1,
  8895. .resource = &db88f5281_nor_flash_resource,
  8896. @@ -125,18 +126,15 @@
  8897. .name = "kernel",
  8898. .offset = 0,
  8899. .size = SZ_2M,
  8900. - },
  8901. - {
  8902. + }, {
  8903. .name = "root",
  8904. .offset = SZ_2M,
  8905. .size = (SZ_16M - SZ_2M),
  8906. - },
  8907. - {
  8908. + }, {
  8909. .name = "user",
  8910. .offset = SZ_16M,
  8911. .size = SZ_8M,
  8912. - },
  8913. - {
  8914. + }, {
  8915. .name = "recovery",
  8916. .offset = (SZ_16M + SZ_8M),
  8917. .size = SZ_8M,
  8918. @@ -288,7 +286,6 @@
  8919. ****************************************************************************/
  8920. static struct mv643xx_eth_platform_data db88f5281_eth_data = {
  8921. .phy_addr = 8,
  8922. - .force_phy_addr = 1,
  8923. };
  8924. /*****************************************************************************
  8925. @@ -301,11 +298,28 @@
  8926. /*****************************************************************************
  8927. * General Setup
  8928. ****************************************************************************/
  8929. -
  8930. -static struct platform_device *db88f5281_devs[] __initdata = {
  8931. - &db88f5281_boot_flash,
  8932. - &db88f5281_nor_flash,
  8933. - &db88f5281_nand_flash,
  8934. +static struct orion5x_mpp_mode db88f5281_mpp_modes[] __initdata = {
  8935. + { 0, MPP_GPIO }, /* USB Over Current */
  8936. + { 1, MPP_GPIO }, /* USB Vbat input */
  8937. + { 2, MPP_PCI_ARB }, /* PCI_REQn[2] */
  8938. + { 3, MPP_PCI_ARB }, /* PCI_GNTn[2] */
  8939. + { 4, MPP_PCI_ARB }, /* PCI_REQn[3] */
  8940. + { 5, MPP_PCI_ARB }, /* PCI_GNTn[3] */
  8941. + { 6, MPP_GPIO }, /* JP0, CON17.2 */
  8942. + { 7, MPP_GPIO }, /* JP1, CON17.1 */
  8943. + { 8, MPP_GPIO }, /* JP2, CON11.2 */
  8944. + { 9, MPP_GPIO }, /* JP3, CON11.3 */
  8945. + { 10, MPP_GPIO }, /* RTC int */
  8946. + { 11, MPP_GPIO }, /* Baud Rate Generator */
  8947. + { 12, MPP_GPIO }, /* PCI int 1 */
  8948. + { 13, MPP_GPIO }, /* PCI int 2 */
  8949. + { 14, MPP_NAND }, /* NAND_REn[2] */
  8950. + { 15, MPP_NAND }, /* NAND_WEn[2] */
  8951. + { 16, MPP_UART }, /* UART1_RX */
  8952. + { 17, MPP_UART }, /* UART1_TX */
  8953. + { 18, MPP_UART }, /* UART1_CTSn */
  8954. + { 19, MPP_UART }, /* UART1_RTSn */
  8955. + { -1 },
  8956. };
  8957. static void __init db88f5281_init(void)
  8958. @@ -315,39 +329,31 @@
  8959. */
  8960. orion5x_init();
  8961. + orion5x_mpp_conf(db88f5281_mpp_modes);
  8962. + writel(0, MPP_DEV_CTRL); /* DEV_D[31:16] */
  8963. +
  8964. /*
  8965. - * Setup the CPU address decode windows for our on-board devices
  8966. + * Configure peripherals.
  8967. */
  8968. + orion5x_ehci0_init();
  8969. + orion5x_eth_init(&db88f5281_eth_data);
  8970. + orion5x_i2c_init();
  8971. + orion5x_uart0_init();
  8972. + orion5x_uart1_init();
  8973. +
  8974. orion5x_setup_dev_boot_win(DB88F5281_NOR_BOOT_BASE,
  8975. DB88F5281_NOR_BOOT_SIZE);
  8976. + platform_device_register(&db88f5281_boot_flash);
  8977. +
  8978. orion5x_setup_dev0_win(DB88F5281_7SEG_BASE, DB88F5281_7SEG_SIZE);
  8979. - orion5x_setup_dev1_win(DB88F5281_NOR_BASE, DB88F5281_NOR_SIZE);
  8980. - orion5x_setup_dev2_win(DB88F5281_NAND_BASE, DB88F5281_NAND_SIZE);
  8981. - /*
  8982. - * Setup Multiplexing Pins:
  8983. - * MPP0: GPIO (USB Over Current) MPP1: GPIO (USB Vbat input)
  8984. - * MPP2: PCI_REQn[2] MPP3: PCI_GNTn[2]
  8985. - * MPP4: PCI_REQn[3] MPP5: PCI_GNTn[3]
  8986. - * MPP6: GPIO (JP0, CON17.2) MPP7: GPIO (JP1, CON17.1)
  8987. - * MPP8: GPIO (JP2, CON11.2) MPP9: GPIO (JP3, CON11.3)
  8988. - * MPP10: GPIO (RTC int) MPP11: GPIO (Baud Rate Generator)
  8989. - * MPP12: GPIO (PCI int 1) MPP13: GPIO (PCI int 2)
  8990. - * MPP14: NAND_REn[2] MPP15: NAND_WEn[2]
  8991. - * MPP16: UART1_RX MPP17: UART1_TX
  8992. - * MPP18: UART1_CTS MPP19: UART1_RTS
  8993. - * MPP-DEV: DEV_D[16:31]
  8994. - */
  8995. - orion5x_write(MPP_0_7_CTRL, 0x00222203);
  8996. - orion5x_write(MPP_8_15_CTRL, 0x44000000);
  8997. - orion5x_write(MPP_16_19_CTRL, 0);
  8998. - orion5x_write(MPP_DEV_CTRL, 0);
  8999. + orion5x_setup_dev1_win(DB88F5281_NOR_BASE, DB88F5281_NOR_SIZE);
  9000. + platform_device_register(&db88f5281_nor_flash);
  9001. - orion5x_gpio_set_valid_pins(0x00003fc3);
  9002. + orion5x_setup_dev2_win(DB88F5281_NAND_BASE, DB88F5281_NAND_SIZE);
  9003. + platform_device_register(&db88f5281_nand_flash);
  9004. - platform_add_devices(db88f5281_devs, ARRAY_SIZE(db88f5281_devs));
  9005. i2c_register_board_info(0, &db88f5281_i2c_rtc, 1);
  9006. - orion5x_eth_init(&db88f5281_eth_data);
  9007. }
  9008. MACHINE_START(DB88F5281, "Marvell Orion-2 Development Board")
  9009. --- a/arch/arm/mach-orion5x/dns323-setup.c
  9010. +++ b/arch/arm/mach-orion5x/dns323-setup.c
  9011. @@ -27,6 +27,7 @@
  9012. #include <asm/mach/pci.h>
  9013. #include <asm/arch/orion5x.h>
  9014. #include "common.h"
  9015. +#include "mpp.h"
  9016. #define DNS323_GPIO_LED_RIGHT_AMBER 1
  9017. #define DNS323_GPIO_LED_LEFT_AMBER 2
  9018. @@ -52,8 +53,6 @@
  9019. if (irq != -1)
  9020. return irq;
  9021. - pr_err("%s: requested mapping for unknown device\n", __func__);
  9022. -
  9023. return -1;
  9024. }
  9025. @@ -81,7 +80,6 @@
  9026. static struct mv643xx_eth_platform_data dns323_eth_data = {
  9027. .phy_addr = 8,
  9028. - .force_phy_addr = 1,
  9029. };
  9030. /****************************************************************************
  9031. @@ -119,7 +117,7 @@
  9032. .name = "u-boot",
  9033. .size = 0x00030000,
  9034. .offset = 0x007d0000,
  9035. - }
  9036. + },
  9037. };
  9038. static struct physmap_flash_data dns323_nor_flash_data = {
  9039. @@ -137,7 +135,9 @@
  9040. static struct platform_device dns323_nor_flash = {
  9041. .name = "physmap-flash",
  9042. .id = 0,
  9043. - .dev = { .platform_data = &dns323_nor_flash_data, },
  9044. + .dev = {
  9045. + .platform_data = &dns323_nor_flash_data,
  9046. + },
  9047. .resource = &dns323_nor_flash_resource,
  9048. .num_resources = 1,
  9049. };
  9050. @@ -170,7 +170,9 @@
  9051. static struct platform_device dns323_gpio_leds = {
  9052. .name = "leds-gpio",
  9053. .id = -1,
  9054. - .dev = { .platform_data = &dns323_led_data, },
  9055. + .dev = {
  9056. + .platform_data = &dns323_led_data,
  9057. + },
  9058. };
  9059. /****************************************************************************
  9060. @@ -183,35 +185,53 @@
  9061. .gpio = DNS323_GPIO_KEY_RESET,
  9062. .desc = "Reset Button",
  9063. .active_low = 1,
  9064. - },
  9065. - {
  9066. + }, {
  9067. .code = KEY_POWER,
  9068. .gpio = DNS323_GPIO_KEY_POWER,
  9069. .desc = "Power Button",
  9070. .active_low = 1,
  9071. - }
  9072. + },
  9073. };
  9074. static struct gpio_keys_platform_data dns323_button_data = {
  9075. .buttons = dns323_buttons,
  9076. - .nbuttons = ARRAY_SIZE(dns323_buttons),
  9077. + .nbuttons = ARRAY_SIZE(dns323_buttons),
  9078. };
  9079. static struct platform_device dns323_button_device = {
  9080. .name = "gpio-keys",
  9081. .id = -1,
  9082. .num_resources = 0,
  9083. - .dev = { .platform_data = &dns323_button_data, },
  9084. + .dev = {
  9085. + .platform_data = &dns323_button_data,
  9086. + },
  9087. };
  9088. /****************************************************************************
  9089. * General Setup
  9090. */
  9091. -
  9092. -static struct platform_device *dns323_plat_devices[] __initdata = {
  9093. - &dns323_nor_flash,
  9094. - &dns323_gpio_leds,
  9095. - &dns323_button_device,
  9096. +static struct orion5x_mpp_mode dns323_mpp_modes[] __initdata = {
  9097. + { 0, MPP_PCIE_RST_OUTn },
  9098. + { 1, MPP_GPIO }, /* right amber LED (sata ch0) */
  9099. + { 2, MPP_GPIO }, /* left amber LED (sata ch1) */
  9100. + { 3, MPP_UNUSED },
  9101. + { 4, MPP_GPIO }, /* power button LED */
  9102. + { 5, MPP_GPIO }, /* power button LED */
  9103. + { 6, MPP_GPIO }, /* GMT G751-2f overtemp */
  9104. + { 7, MPP_GPIO }, /* M41T80 nIRQ/OUT/SQW */
  9105. + { 8, MPP_GPIO }, /* triggers power off */
  9106. + { 9, MPP_GPIO }, /* power button switch */
  9107. + { 10, MPP_GPIO }, /* reset button switch */
  9108. + { 11, MPP_UNUSED },
  9109. + { 12, MPP_UNUSED },
  9110. + { 13, MPP_UNUSED },
  9111. + { 14, MPP_UNUSED },
  9112. + { 15, MPP_UNUSED },
  9113. + { 16, MPP_UNUSED },
  9114. + { 17, MPP_UNUSED },
  9115. + { 18, MPP_UNUSED },
  9116. + { 19, MPP_UNUSED },
  9117. + { -1 },
  9118. };
  9119. /*
  9120. @@ -225,17 +245,15 @@
  9121. static struct i2c_board_info __initdata dns323_i2c_devices[] = {
  9122. {
  9123. I2C_BOARD_INFO("g760a", 0x3e),
  9124. - },
  9125. #if 0
  9126. /* this entry requires the new-style driver model lm75 driver,
  9127. * for the meantime "insmod lm75.ko force_lm75=0,0x48" is needed */
  9128. - {
  9129. + }, {
  9130. I2C_BOARD_INFO("g751", 0x48),
  9131. - },
  9132. #endif
  9133. - {
  9134. + }, {
  9135. I2C_BOARD_INFO("m41t80", 0x68),
  9136. - }
  9137. + },
  9138. };
  9139. /* DNS-323 specific power off method */
  9140. @@ -250,62 +268,35 @@
  9141. /* Setup basic Orion functions. Need to be called early. */
  9142. orion5x_init();
  9143. + orion5x_mpp_conf(dns323_mpp_modes);
  9144. + writel(0, MPP_DEV_CTRL); /* DEV_D[31:16] */
  9145. +
  9146. + /*
  9147. + * Configure peripherals.
  9148. + */
  9149. + orion5x_ehci0_init();
  9150. + orion5x_eth_init(&dns323_eth_data);
  9151. + orion5x_i2c_init();
  9152. + orion5x_uart0_init();
  9153. +
  9154. /* setup flash mapping
  9155. * CS3 holds a 8 MB Spansion S29GL064M90TFIR4
  9156. */
  9157. orion5x_setup_dev_boot_win(DNS323_NOR_BOOT_BASE, DNS323_NOR_BOOT_SIZE);
  9158. + platform_device_register(&dns323_nor_flash);
  9159. - /* DNS-323 has a Marvell 88X7042 SATA controller attached via PCIe
  9160. - *
  9161. - * Open a special address decode windows for the PCIe WA.
  9162. - */
  9163. - orion5x_setup_pcie_wa_win(ORION5X_PCIE_WA_PHYS_BASE,
  9164. - ORION5X_PCIE_WA_SIZE);
  9165. -
  9166. - /* set MPP to 0 as D-Link's 2.6.12.6 kernel did */
  9167. - orion5x_write(MPP_0_7_CTRL, 0);
  9168. - orion5x_write(MPP_8_15_CTRL, 0);
  9169. - orion5x_write(MPP_16_19_CTRL, 0);
  9170. - orion5x_write(MPP_DEV_CTRL, 0);
  9171. -
  9172. - /* Define used GPIO pins
  9173. -
  9174. - GPIO Map:
  9175. -
  9176. - | 0 | | PEX_RST_OUT (not controlled by GPIO)
  9177. - | 1 | Out | right amber LED (= sata ch0 LED) (low-active)
  9178. - | 2 | Out | left amber LED (= sata ch1 LED) (low-active)
  9179. - | 3 | Out | //unknown//
  9180. - | 4 | Out | power button LED (low-active, together with pin #5)
  9181. - | 5 | Out | power button LED (low-active, together with pin #4)
  9182. - | 6 | In | GMT G751-2f overtemp. shutdown signal (low-active)
  9183. - | 7 | In | M41T80 nIRQ/OUT/SQW signal
  9184. - | 8 | Out | triggers power off (high-active)
  9185. - | 9 | In | power button switch (low-active)
  9186. - | 10 | In | reset button switch (low-active)
  9187. - | 11 | Out | //unknown//
  9188. - | 12 | Out | //unknown//
  9189. - | 13 | Out | //unknown//
  9190. - | 14 | Out | //unknown//
  9191. - | 15 | Out | //unknown//
  9192. - */
  9193. - orion5x_gpio_set_valid_pins(0x07f6);
  9194. -
  9195. - /* register dns323 specific power-off method */
  9196. - if ((gpio_request(DNS323_GPIO_POWER_OFF, "POWEROFF") != 0)
  9197. - || (gpio_direction_output(DNS323_GPIO_POWER_OFF, 0) != 0))
  9198. - pr_err("DNS323: failed to setup power-off GPIO\n");
  9199. -
  9200. - pm_power_off = dns323_power_off;
  9201. + platform_device_register(&dns323_gpio_leds);
  9202. - /* register flash and other platform devices */
  9203. - platform_add_devices(dns323_plat_devices,
  9204. - ARRAY_SIZE(dns323_plat_devices));
  9205. + platform_device_register(&dns323_button_device);
  9206. i2c_register_board_info(0, dns323_i2c_devices,
  9207. ARRAY_SIZE(dns323_i2c_devices));
  9208. - orion5x_eth_init(&dns323_eth_data);
  9209. + /* register dns323 specific power-off method */
  9210. + if (gpio_request(DNS323_GPIO_POWER_OFF, "POWEROFF") != 0 ||
  9211. + gpio_direction_output(DNS323_GPIO_POWER_OFF, 0) != 0)
  9212. + pr_err("DNS323: failed to setup power-off GPIO\n");
  9213. + pm_power_off = dns323_power_off;
  9214. }
  9215. /* Warning: D-Link uses a wrong mach-type (=526) in their bootloader */
  9216. --- a/arch/arm/mach-orion5x/gpio.c
  9217. +++ b/arch/arm/mach-orion5x/gpio.c
  9218. @@ -24,9 +24,12 @@
  9219. static unsigned long gpio_valid[BITS_TO_LONGS(GPIO_MAX)];
  9220. static const char *gpio_label[GPIO_MAX]; /* non null for allocated GPIOs */
  9221. -void __init orion5x_gpio_set_valid_pins(u32 pins)
  9222. +void __init orion5x_gpio_set_valid(unsigned pin, int valid)
  9223. {
  9224. - gpio_valid[0] = pins;
  9225. + if (valid)
  9226. + __set_bit(pin, gpio_valid);
  9227. + else
  9228. + __clear_bit(pin, gpio_valid);
  9229. }
  9230. /*
  9231. @@ -93,10 +96,10 @@
  9232. {
  9233. int val, mask = 1 << pin;
  9234. - if (orion5x_read(GPIO_IO_CONF) & mask)
  9235. - val = orion5x_read(GPIO_DATA_IN) ^ orion5x_read(GPIO_IN_POL);
  9236. + if (readl(GPIO_IO_CONF) & mask)
  9237. + val = readl(GPIO_DATA_IN) ^ readl(GPIO_IN_POL);
  9238. else
  9239. - val = orion5x_read(GPIO_OUT);
  9240. + val = readl(GPIO_OUT);
  9241. return val & mask;
  9242. }
  9243. @@ -188,39 +191,39 @@
  9244. printk("GPIO, free\n");
  9245. } else {
  9246. printk("GPIO, used by %s, ", gpio_label[i]);
  9247. - if (orion5x_read(GPIO_IO_CONF) & (1 << i)) {
  9248. + if (readl(GPIO_IO_CONF) & (1 << i)) {
  9249. printk("input, active %s, level %s, edge %s\n",
  9250. - ((orion5x_read(GPIO_IN_POL) >> i) & 1) ? "low" : "high",
  9251. - ((orion5x_read(GPIO_LEVEL_MASK) >> i) & 1) ? "enabled" : "masked",
  9252. - ((orion5x_read(GPIO_EDGE_MASK) >> i) & 1) ? "enabled" : "masked");
  9253. + ((readl(GPIO_IN_POL) >> i) & 1) ? "low" : "high",
  9254. + ((readl(GPIO_LEVEL_MASK) >> i) & 1) ? "enabled" : "masked",
  9255. + ((readl(GPIO_EDGE_MASK) >> i) & 1) ? "enabled" : "masked");
  9256. } else {
  9257. - printk("output, val=%d\n", (orion5x_read(GPIO_OUT) >> i) & 1);
  9258. + printk("output, val=%d\n", (readl(GPIO_OUT) >> i) & 1);
  9259. }
  9260. }
  9261. }
  9262. printk(KERN_DEBUG "MPP_0_7_CTRL (0x%08x) = 0x%08x\n",
  9263. - MPP_0_7_CTRL, orion5x_read(MPP_0_7_CTRL));
  9264. + MPP_0_7_CTRL, readl(MPP_0_7_CTRL));
  9265. printk(KERN_DEBUG "MPP_8_15_CTRL (0x%08x) = 0x%08x\n",
  9266. - MPP_8_15_CTRL, orion5x_read(MPP_8_15_CTRL));
  9267. + MPP_8_15_CTRL, readl(MPP_8_15_CTRL));
  9268. printk(KERN_DEBUG "MPP_16_19_CTRL (0x%08x) = 0x%08x\n",
  9269. - MPP_16_19_CTRL, orion5x_read(MPP_16_19_CTRL));
  9270. + MPP_16_19_CTRL, readl(MPP_16_19_CTRL));
  9271. printk(KERN_DEBUG "MPP_DEV_CTRL (0x%08x) = 0x%08x\n",
  9272. - MPP_DEV_CTRL, orion5x_read(MPP_DEV_CTRL));
  9273. + MPP_DEV_CTRL, readl(MPP_DEV_CTRL));
  9274. printk(KERN_DEBUG "GPIO_OUT (0x%08x) = 0x%08x\n",
  9275. - GPIO_OUT, orion5x_read(GPIO_OUT));
  9276. + GPIO_OUT, readl(GPIO_OUT));
  9277. printk(KERN_DEBUG "GPIO_IO_CONF (0x%08x) = 0x%08x\n",
  9278. - GPIO_IO_CONF, orion5x_read(GPIO_IO_CONF));
  9279. + GPIO_IO_CONF, readl(GPIO_IO_CONF));
  9280. printk(KERN_DEBUG "GPIO_BLINK_EN (0x%08x) = 0x%08x\n",
  9281. - GPIO_BLINK_EN, orion5x_read(GPIO_BLINK_EN));
  9282. + GPIO_BLINK_EN, readl(GPIO_BLINK_EN));
  9283. printk(KERN_DEBUG "GPIO_IN_POL (0x%08x) = 0x%08x\n",
  9284. - GPIO_IN_POL, orion5x_read(GPIO_IN_POL));
  9285. + GPIO_IN_POL, readl(GPIO_IN_POL));
  9286. printk(KERN_DEBUG "GPIO_DATA_IN (0x%08x) = 0x%08x\n",
  9287. - GPIO_DATA_IN, orion5x_read(GPIO_DATA_IN));
  9288. + GPIO_DATA_IN, readl(GPIO_DATA_IN));
  9289. printk(KERN_DEBUG "GPIO_LEVEL_MASK (0x%08x) = 0x%08x\n",
  9290. - GPIO_LEVEL_MASK, orion5x_read(GPIO_LEVEL_MASK));
  9291. + GPIO_LEVEL_MASK, readl(GPIO_LEVEL_MASK));
  9292. printk(KERN_DEBUG "GPIO_EDGE_CAUSE (0x%08x) = 0x%08x\n",
  9293. - GPIO_EDGE_CAUSE, orion5x_read(GPIO_EDGE_CAUSE));
  9294. + GPIO_EDGE_CAUSE, readl(GPIO_EDGE_CAUSE));
  9295. printk(KERN_DEBUG "GPIO_EDGE_MASK (0x%08x) = 0x%08x\n",
  9296. - GPIO_EDGE_MASK, orion5x_read(GPIO_EDGE_MASK));
  9297. + GPIO_EDGE_MASK, readl(GPIO_EDGE_MASK));
  9298. }
  9299. --- a/arch/arm/mach-orion5x/irq.c
  9300. +++ b/arch/arm/mach-orion5x/irq.c
  9301. @@ -82,7 +82,7 @@
  9302. int pin = irq_to_gpio(irq);
  9303. struct irq_desc *desc;
  9304. - if ((orion5x_read(GPIO_IO_CONF) & (1 << pin)) == 0) {
  9305. + if ((readl(GPIO_IO_CONF) & (1 << pin)) == 0) {
  9306. printk(KERN_ERR "orion5x_gpio_set_irq_type failed "
  9307. "(irq %d, pin %d).\n", irq, pin);
  9308. return -EINVAL;
  9309. @@ -117,7 +117,7 @@
  9310. /*
  9311. * set initial polarity based on current input level
  9312. */
  9313. - if ((orion5x_read(GPIO_IN_POL) ^ orion5x_read(GPIO_DATA_IN))
  9314. + if ((readl(GPIO_IN_POL) ^ readl(GPIO_DATA_IN))
  9315. & (1 << pin))
  9316. orion5x_setbits(GPIO_IN_POL, (1 << pin)); /* falling */
  9317. else
  9318. @@ -149,8 +149,8 @@
  9319. BUG_ON(irq < IRQ_ORION5X_GPIO_0_7 || irq > IRQ_ORION5X_GPIO_24_31);
  9320. offs = (irq - IRQ_ORION5X_GPIO_0_7) * 8;
  9321. - cause = (orion5x_read(GPIO_DATA_IN) & orion5x_read(GPIO_LEVEL_MASK)) |
  9322. - (orion5x_read(GPIO_EDGE_CAUSE) & orion5x_read(GPIO_EDGE_MASK));
  9323. + cause = (readl(GPIO_DATA_IN) & readl(GPIO_LEVEL_MASK)) |
  9324. + (readl(GPIO_EDGE_CAUSE) & readl(GPIO_EDGE_MASK));
  9325. for (pin = offs; pin < offs + 8; pin++) {
  9326. if (cause & (1 << pin)) {
  9327. @@ -158,9 +158,9 @@
  9328. desc = irq_desc + irq;
  9329. if ((desc->status & IRQ_TYPE_SENSE_MASK) == IRQT_BOTHEDGE) {
  9330. /* Swap polarity (race with GPIO line) */
  9331. - u32 polarity = orion5x_read(GPIO_IN_POL);
  9332. + u32 polarity = readl(GPIO_IN_POL);
  9333. polarity ^= 1 << pin;
  9334. - orion5x_write(GPIO_IN_POL, polarity);
  9335. + writel(polarity, GPIO_IN_POL);
  9336. }
  9337. desc_handle_irq(irq, desc);
  9338. }
  9339. @@ -175,9 +175,9 @@
  9340. /*
  9341. * Mask and clear GPIO IRQ interrupts
  9342. */
  9343. - orion5x_write(GPIO_LEVEL_MASK, 0x0);
  9344. - orion5x_write(GPIO_EDGE_MASK, 0x0);
  9345. - orion5x_write(GPIO_EDGE_CAUSE, 0x0);
  9346. + writel(0x0, GPIO_LEVEL_MASK);
  9347. + writel(0x0, GPIO_EDGE_MASK);
  9348. + writel(0x0, GPIO_EDGE_CAUSE);
  9349. /*
  9350. * Register chained level handlers for GPIO IRQs by default.
  9351. --- a/arch/arm/mach-orion5x/kurobox_pro-setup.c
  9352. +++ b/arch/arm/mach-orion5x/kurobox_pro-setup.c
  9353. @@ -13,10 +13,12 @@
  9354. #include <linux/platform_device.h>
  9355. #include <linux/pci.h>
  9356. #include <linux/irq.h>
  9357. +#include <linux/delay.h>
  9358. #include <linux/mtd/physmap.h>
  9359. #include <linux/mtd/nand.h>
  9360. #include <linux/mv643xx_eth.h>
  9361. #include <linux/i2c.h>
  9362. +#include <linux/serial_reg.h>
  9363. #include <linux/ata_platform.h>
  9364. #include <asm/mach-types.h>
  9365. #include <asm/gpio.h>
  9366. @@ -25,6 +27,7 @@
  9367. #include <asm/arch/orion5x.h>
  9368. #include <asm/plat-orion/orion_nand.h>
  9369. #include "common.h"
  9370. +#include "mpp.h"
  9371. /*****************************************************************************
  9372. * KUROBOX-PRO Info
  9373. @@ -53,13 +56,11 @@
  9374. .name = "uImage",
  9375. .offset = 0,
  9376. .size = SZ_4M,
  9377. - },
  9378. - {
  9379. + }, {
  9380. .name = "rootfs",
  9381. .offset = SZ_4M,
  9382. .size = SZ_64M,
  9383. - },
  9384. - {
  9385. + }, {
  9386. .name = "extra",
  9387. .offset = SZ_4M + SZ_64M,
  9388. .size = SZ_256M - (SZ_4M + SZ_64M),
  9389. @@ -132,8 +133,6 @@
  9390. /*
  9391. * PCI isn't used on the Kuro
  9392. */
  9393. - printk(KERN_ERR "kurobox_pro_pci_map_irq failed, unknown bus\n");
  9394. -
  9395. return -1;
  9396. }
  9397. @@ -161,7 +160,6 @@
  9398. static struct mv643xx_eth_platform_data kurobox_pro_eth_data = {
  9399. .phy_addr = 8,
  9400. - .force_phy_addr = 1,
  9401. };
  9402. /*****************************************************************************
  9403. @@ -175,12 +173,169 @@
  9404. * SATA
  9405. ****************************************************************************/
  9406. static struct mv_sata_platform_data kurobox_pro_sata_data = {
  9407. - .n_ports = 2,
  9408. + .n_ports = 2,
  9409. };
  9410. /*****************************************************************************
  9411. + * Kurobox Pro specific power off method via UART1-attached microcontroller
  9412. + ****************************************************************************/
  9413. +
  9414. +#define UART1_REG(x) (UART1_VIRT_BASE + ((UART_##x) << 2))
  9415. +
  9416. +static int kurobox_pro_miconread(unsigned char *buf, int count)
  9417. +{
  9418. + int i;
  9419. + int timeout;
  9420. +
  9421. + for (i = 0; i < count; i++) {
  9422. + timeout = 10;
  9423. +
  9424. + while (!(readl(UART1_REG(LSR)) & UART_LSR_DR)) {
  9425. + if (--timeout == 0)
  9426. + break;
  9427. + udelay(1000);
  9428. + }
  9429. +
  9430. + if (timeout == 0)
  9431. + break;
  9432. + buf[i] = readl(UART1_REG(RX));
  9433. + }
  9434. +
  9435. + /* return read bytes */
  9436. + return i;
  9437. +}
  9438. +
  9439. +static int kurobox_pro_miconwrite(const unsigned char *buf, int count)
  9440. +{
  9441. + int i = 0;
  9442. +
  9443. + while (count--) {
  9444. + while (!(readl(UART1_REG(LSR)) & UART_LSR_THRE))
  9445. + barrier();
  9446. + writel(buf[i++], UART1_REG(TX));
  9447. + }
  9448. +
  9449. + return 0;
  9450. +}
  9451. +
  9452. +static int kurobox_pro_miconsend(const unsigned char *data, int count)
  9453. +{
  9454. + int i;
  9455. + unsigned char checksum = 0;
  9456. + unsigned char recv_buf[40];
  9457. + unsigned char send_buf[40];
  9458. + unsigned char correct_ack[3];
  9459. + int retry = 2;
  9460. +
  9461. + /* Generate checksum */
  9462. + for (i = 0; i < count; i++)
  9463. + checksum -= data[i];
  9464. +
  9465. + do {
  9466. + /* Send data */
  9467. + kurobox_pro_miconwrite(data, count);
  9468. +
  9469. + /* send checksum */
  9470. + kurobox_pro_miconwrite(&checksum, 1);
  9471. +
  9472. + if (kurobox_pro_miconread(recv_buf, sizeof(recv_buf)) <= 3) {
  9473. + printk(KERN_ERR ">%s: receive failed.\n", __func__);
  9474. +
  9475. + /* send preamble to clear the receive buffer */
  9476. + memset(&send_buf, 0xff, sizeof(send_buf));
  9477. + kurobox_pro_miconwrite(send_buf, sizeof(send_buf));
  9478. +
  9479. + /* make dummy reads */
  9480. + mdelay(100);
  9481. + kurobox_pro_miconread(recv_buf, sizeof(recv_buf));
  9482. + } else {
  9483. + /* Generate expected ack */
  9484. + correct_ack[0] = 0x01;
  9485. + correct_ack[1] = data[1];
  9486. + correct_ack[2] = 0x00;
  9487. +
  9488. + /* checksum Check */
  9489. + if ((recv_buf[0] + recv_buf[1] + recv_buf[2] +
  9490. + recv_buf[3]) & 0xFF) {
  9491. + printk(KERN_ERR ">%s: Checksum Error : "
  9492. + "Received data[%02x, %02x, %02x, %02x]"
  9493. + "\n", __func__, recv_buf[0],
  9494. + recv_buf[1], recv_buf[2], recv_buf[3]);
  9495. + } else {
  9496. + /* Check Received Data */
  9497. + if (correct_ack[0] == recv_buf[0] &&
  9498. + correct_ack[1] == recv_buf[1] &&
  9499. + correct_ack[2] == recv_buf[2]) {
  9500. + /* Interval for next command */
  9501. + mdelay(10);
  9502. +
  9503. + /* Receive ACK */
  9504. + return 0;
  9505. + }
  9506. + }
  9507. + /* Received NAK or illegal Data */
  9508. + printk(KERN_ERR ">%s: Error : NAK or Illegal Data "
  9509. + "Received\n", __func__);
  9510. + }
  9511. + } while (retry--);
  9512. +
  9513. + /* Interval for next command */
  9514. + mdelay(10);
  9515. +
  9516. + return -1;
  9517. +}
  9518. +
  9519. +static void kurobox_pro_power_off(void)
  9520. +{
  9521. + const unsigned char watchdogkill[] = {0x01, 0x35, 0x00};
  9522. + const unsigned char shutdownwait[] = {0x00, 0x0c};
  9523. + const unsigned char poweroff[] = {0x00, 0x06};
  9524. + /* 38400 baud divisor */
  9525. + const unsigned divisor = ((ORION5X_TCLK + (8 * 38400)) / (16 * 38400));
  9526. +
  9527. + pr_info("%s: triggering power-off...\n", __func__);
  9528. +
  9529. + /* hijack uart1 and reset into sane state (38400,8n1,even parity) */
  9530. + writel(0x83, UART1_REG(LCR));
  9531. + writel(divisor & 0xff, UART1_REG(DLL));
  9532. + writel((divisor >> 8) & 0xff, UART1_REG(DLM));
  9533. + writel(0x1b, UART1_REG(LCR));
  9534. + writel(0x00, UART1_REG(IER));
  9535. + writel(0x07, UART1_REG(FCR));
  9536. + writel(0x00, UART1_REG(MCR));
  9537. +
  9538. + /* Send the commands to shutdown the Kurobox Pro */
  9539. + kurobox_pro_miconsend(watchdogkill, sizeof(watchdogkill)) ;
  9540. + kurobox_pro_miconsend(shutdownwait, sizeof(shutdownwait)) ;
  9541. + kurobox_pro_miconsend(poweroff, sizeof(poweroff));
  9542. +}
  9543. +
  9544. +/*****************************************************************************
  9545. * General Setup
  9546. ****************************************************************************/
  9547. +static struct orion5x_mpp_mode kurobox_pro_mpp_modes[] __initdata = {
  9548. + { 0, MPP_UNUSED },
  9549. + { 1, MPP_UNUSED },
  9550. + { 2, MPP_GPIO }, /* GPIO Micon */
  9551. + { 3, MPP_GPIO }, /* GPIO Rtc */
  9552. + { 4, MPP_UNUSED },
  9553. + { 5, MPP_UNUSED },
  9554. + { 6, MPP_NAND }, /* NAND Flash REn */
  9555. + { 7, MPP_NAND }, /* NAND Flash WEn */
  9556. + { 8, MPP_UNUSED },
  9557. + { 9, MPP_UNUSED },
  9558. + { 10, MPP_UNUSED },
  9559. + { 11, MPP_UNUSED },
  9560. + { 12, MPP_SATA_LED }, /* SATA 0 presence */
  9561. + { 13, MPP_SATA_LED }, /* SATA 1 presence */
  9562. + { 14, MPP_SATA_LED }, /* SATA 0 active */
  9563. + { 15, MPP_SATA_LED }, /* SATA 1 active */
  9564. + { 16, MPP_UART }, /* UART1 RXD */
  9565. + { 17, MPP_UART }, /* UART1 TXD */
  9566. + { 18, MPP_UART }, /* UART1 CTSn */
  9567. + { 19, MPP_UART }, /* UART1 RTSn */
  9568. + { -1 },
  9569. +};
  9570. static void __init kurobox_pro_init(void)
  9571. {
  9572. @@ -189,46 +344,32 @@
  9573. */
  9574. orion5x_init();
  9575. - /*
  9576. - * Setup the CPU address decode windows for our devices
  9577. - */
  9578. - orion5x_setup_dev_boot_win(KUROBOX_PRO_NOR_BOOT_BASE,
  9579. - KUROBOX_PRO_NOR_BOOT_SIZE);
  9580. - orion5x_setup_dev0_win(KUROBOX_PRO_NAND_BASE, KUROBOX_PRO_NAND_SIZE);
  9581. + orion5x_mpp_conf(kurobox_pro_mpp_modes);
  9582. /*
  9583. - * Open a special address decode windows for the PCIe WA.
  9584. + * Configure peripherals.
  9585. */
  9586. - orion5x_setup_pcie_wa_win(ORION5X_PCIE_WA_PHYS_BASE,
  9587. - ORION5X_PCIE_WA_SIZE);
  9588. -
  9589. - /*
  9590. - * Setup Multiplexing Pins --
  9591. - * MPP[0-1] Not used
  9592. - * MPP[2] GPIO Micon
  9593. - * MPP[3] GPIO RTC
  9594. - * MPP[4-5] Not used
  9595. - * MPP[6] Nand Flash REn
  9596. - * MPP[7] Nand Flash WEn
  9597. - * MPP[8-11] Not used
  9598. - * MPP[12] SATA 0 presence Indication
  9599. - * MPP[13] SATA 1 presence Indication
  9600. - * MPP[14] SATA 0 active Indication
  9601. - * MPP[15] SATA 1 active indication
  9602. - * MPP[16-19] Not used
  9603. - */
  9604. - orion5x_write(MPP_0_7_CTRL, 0x44220003);
  9605. - orion5x_write(MPP_8_15_CTRL, 0x55550000);
  9606. - orion5x_write(MPP_16_19_CTRL, 0x0);
  9607. -
  9608. - orion5x_gpio_set_valid_pins(0x0000000c);
  9609. + orion5x_ehci0_init();
  9610. + orion5x_ehci1_init();
  9611. + orion5x_eth_init(&kurobox_pro_eth_data);
  9612. + orion5x_i2c_init();
  9613. + orion5x_sata_init(&kurobox_pro_sata_data);
  9614. + orion5x_uart0_init();
  9615. + orion5x_setup_dev_boot_win(KUROBOX_PRO_NOR_BOOT_BASE,
  9616. + KUROBOX_PRO_NOR_BOOT_SIZE);
  9617. platform_device_register(&kurobox_pro_nor_flash);
  9618. - if (machine_is_kurobox_pro())
  9619. +
  9620. + if (machine_is_kurobox_pro()) {
  9621. + orion5x_setup_dev0_win(KUROBOX_PRO_NAND_BASE,
  9622. + KUROBOX_PRO_NAND_SIZE);
  9623. platform_device_register(&kurobox_pro_nand_flash);
  9624. + }
  9625. +
  9626. i2c_register_board_info(0, &kurobox_pro_i2c_rtc, 1);
  9627. - orion5x_eth_init(&kurobox_pro_eth_data);
  9628. - orion5x_sata_init(&kurobox_pro_sata_data);
  9629. +
  9630. + /* register Kurobox Pro specific power-off method */
  9631. + pm_power_off = kurobox_pro_power_off;
  9632. }
  9633. #ifdef CONFIG_MACH_KUROBOX_PRO
  9634. --- /dev/null
  9635. +++ b/arch/arm/mach-orion5x/mpp.c
  9636. @@ -0,0 +1,163 @@
  9637. +/*
  9638. + * arch/arm/mach-orion5x/mpp.c
  9639. + *
  9640. + * MPP functions for Marvell Orion 5x SoCs
  9641. + *
  9642. + * This file is licensed under the terms of the GNU General Public
  9643. + * License version 2. This program is licensed "as is" without any
  9644. + * warranty of any kind, whether express or implied.
  9645. + */
  9646. +
  9647. +#include <linux/kernel.h>
  9648. +#include <linux/init.h>
  9649. +#include <linux/mbus.h>
  9650. +#include <asm/hardware.h>
  9651. +#include <asm/io.h>
  9652. +#include "common.h"
  9653. +#include "mpp.h"
  9654. +
  9655. +static int is_5181l(void)
  9656. +{
  9657. + u32 dev;
  9658. + u32 rev;
  9659. +
  9660. + orion5x_pcie_id(&dev, &rev);
  9661. +
  9662. + return !!(dev == MV88F5181_DEV_ID && rev >= MV88F5181L_REV_A0);
  9663. +}
  9664. +
  9665. +static int is_5182(void)
  9666. +{
  9667. + u32 dev;
  9668. + u32 rev;
  9669. +
  9670. + orion5x_pcie_id(&dev, &rev);
  9671. +
  9672. + return !!(dev == MV88F5182_DEV_ID);
  9673. +}
  9674. +
  9675. +static int is_5281(void)
  9676. +{
  9677. + u32 dev;
  9678. + u32 rev;
  9679. +
  9680. + orion5x_pcie_id(&dev, &rev);
  9681. +
  9682. + return !!(dev == MV88F5281_DEV_ID);
  9683. +}
  9684. +
  9685. +static int __init determine_type_encoding(int mpp, enum orion5x_mpp_type type)
  9686. +{
  9687. + switch (type) {
  9688. + case MPP_UNUSED:
  9689. + case MPP_GPIO:
  9690. + if (mpp == 0)
  9691. + return 3;
  9692. + if (mpp >= 1 && mpp <= 15)
  9693. + return 0;
  9694. + if (mpp >= 16 && mpp <= 19) {
  9695. + if (is_5182())
  9696. + return 5;
  9697. + if (type == MPP_UNUSED)
  9698. + return 0;
  9699. + }
  9700. + return -1;
  9701. +
  9702. + case MPP_PCIE_RST_OUTn:
  9703. + if (mpp == 0)
  9704. + return 0;
  9705. + return -1;
  9706. +
  9707. + case MPP_PCI_ARB:
  9708. + if (mpp >= 0 && mpp <= 7)
  9709. + return 2;
  9710. + return -1;
  9711. +
  9712. + case MPP_PCI_PMEn:
  9713. + if (mpp == 2)
  9714. + return 3;
  9715. + return -1;
  9716. +
  9717. + case MPP_GIGE:
  9718. + if (mpp >= 8 && mpp <= 19)
  9719. + return 1;
  9720. + return -1;
  9721. +
  9722. + case MPP_NAND:
  9723. + if (is_5182() || is_5281()) {
  9724. + if (mpp >= 4 && mpp <= 7)
  9725. + return 4;
  9726. + if (mpp >= 12 && mpp <= 17)
  9727. + return 4;
  9728. + }
  9729. + return -1;
  9730. +
  9731. + case MPP_PCI_CLK:
  9732. + if (is_5181l() && mpp >= 6 && mpp <= 7)
  9733. + return 5;
  9734. + return -1;
  9735. +
  9736. + case MPP_SATA_LED:
  9737. + if (is_5182()) {
  9738. + if (mpp >= 4 && mpp <= 7)
  9739. + return 5;
  9740. + if (mpp >= 12 && mpp <= 15)
  9741. + return 5;
  9742. + }
  9743. + return -1;
  9744. +
  9745. + case MPP_UART:
  9746. + if (mpp >= 16 && mpp <= 19)
  9747. + return 0;
  9748. + return -1;
  9749. + }
  9750. +
  9751. + printk(KERN_INFO "unknown MPP type %d\n", type);
  9752. +
  9753. + return -1;
  9754. +}
  9755. +
  9756. +void __init orion5x_mpp_conf(struct orion5x_mpp_mode *mode)
  9757. +{
  9758. + u32 mpp_0_7_ctrl = readl(MPP_0_7_CTRL);
  9759. + u32 mpp_8_15_ctrl = readl(MPP_8_15_CTRL);
  9760. + u32 mpp_16_19_ctrl = readl(MPP_16_19_CTRL);
  9761. +
  9762. + while (mode->mpp >= 0) {
  9763. + u32 *reg;
  9764. + int num_type;
  9765. + int shift;
  9766. +
  9767. + if (mode->mpp >= 0 && mode->mpp <= 7)
  9768. + reg = &mpp_0_7_ctrl;
  9769. + else if (mode->mpp >= 8 && mode->mpp <= 15)
  9770. + reg = &mpp_8_15_ctrl;
  9771. + else if (mode->mpp >= 16 && mode->mpp <= 19)
  9772. + reg = &mpp_16_19_ctrl;
  9773. + else {
  9774. + printk(KERN_ERR "orion5x_mpp_conf: invalid MPP "
  9775. + "(%d)\n", mode->mpp);
  9776. + continue;
  9777. + }
  9778. +
  9779. + num_type = determine_type_encoding(mode->mpp, mode->type);
  9780. + if (num_type < 0) {
  9781. + printk(KERN_ERR "orion5x_mpp_conf: invalid MPP "
  9782. + "combination (%d, %d)\n", mode->mpp,
  9783. + mode->type);
  9784. + continue;
  9785. + }
  9786. +
  9787. + shift = (mode->mpp & 7) << 2;
  9788. + *reg &= ~(0xf << shift);
  9789. + *reg |= (num_type & 0xf) << shift;
  9790. +
  9791. + orion5x_gpio_set_valid(mode->mpp, !!(mode->type == MPP_GPIO));
  9792. +
  9793. + mode++;
  9794. + }
  9795. +
  9796. + writel(mpp_0_7_ctrl, MPP_0_7_CTRL);
  9797. + writel(mpp_8_15_ctrl, MPP_8_15_CTRL);
  9798. + writel(mpp_16_19_ctrl, MPP_16_19_CTRL);
  9799. +}
  9800. --- /dev/null
  9801. +++ b/arch/arm/mach-orion5x/mpp.h
  9802. @@ -0,0 +1,74 @@
  9803. +#ifndef __ARCH_ORION5X_MPP_H
  9804. +#define __ARCH_ORION5X_MPP_H
  9805. +
  9806. +enum orion5x_mpp_type {
  9807. + /*
  9808. + * This MPP is unused.
  9809. + */
  9810. + MPP_UNUSED,
  9811. +
  9812. + /*
  9813. + * This MPP pin is used as a generic GPIO pin. Valid for
  9814. + * MPPs 0-15 and device bus data pins 16-31. On 5182, also
  9815. + * valid for MPPs 16-19.
  9816. + */
  9817. + MPP_GPIO,
  9818. +
  9819. + /*
  9820. + * This MPP is used as PCIe_RST_OUTn pin. Valid for
  9821. + * MPP 0 only.
  9822. + */
  9823. + MPP_PCIE_RST_OUTn,
  9824. +
  9825. + /*
  9826. + * This MPP is used as PCI arbiter pin (REQn/GNTn).
  9827. + * Valid for MPPs 0-7 only.
  9828. + */
  9829. + MPP_PCI_ARB,
  9830. +
  9831. + /*
  9832. + * This MPP is used as PCI_PMEn pin. Valid for MPP 2 only.
  9833. + */
  9834. + MPP_PCI_PMEn,
  9835. +
  9836. + /*
  9837. + * This MPP is used as GigE half-duplex (COL, CRS) or GMII
  9838. + * (RXERR, CRS, TXERR, TXD[7:4], RXD[7:4]) pin. Valid for
  9839. + * MPPs 8-19 only.
  9840. + */
  9841. + MPP_GIGE,
  9842. +
  9843. + /*
  9844. + * This MPP is used as NAND REn/WEn pin. Valid for MPPs
  9845. + * 4-7 and 12-17 only, and only on the 5181l/5182/5281.
  9846. + */
  9847. + MPP_NAND,
  9848. +
  9849. + /*
  9850. + * This MPP is used as a PCI clock output pin. Valid for
  9851. + * MPPs 6-7 only, and only on the 5181l.
  9852. + */
  9853. + MPP_PCI_CLK,
  9854. +
  9855. + /*
  9856. + * This MPP is used as a SATA presence/activity LED.
  9857. + * Valid for MPPs 4-7 and 12-15 only, and only on the 5182.
  9858. + */
  9859. + MPP_SATA_LED,
  9860. +
  9861. + /*
  9862. + * This MPP is used as UART1 RXD/TXD/CTSn/RTSn pin.
  9863. + * Valid for MPPs 16-19 only.
  9864. + */
  9865. + MPP_UART,
  9866. +};
  9867. +
  9868. +struct orion5x_mpp_mode {
  9869. + int mpp;
  9870. + enum orion5x_mpp_type type;
  9871. +};
  9872. +
  9873. +void orion5x_mpp_conf(struct orion5x_mpp_mode *mode);
  9874. +
  9875. +
  9876. +#endif
  9877. --- /dev/null
  9878. +++ b/arch/arm/mach-orion5x/mss2-setup.c
  9879. @@ -0,0 +1,270 @@
  9880. +/*
  9881. + * Maxtor Shared Storage II Board Setup
  9882. + *
  9883. + * Maintainer: Sylver Bruneau <[email protected]>
  9884. + *
  9885. + * This program is free software; you can redistribute it and/or
  9886. + * modify it under the terms of the GNU General Public License
  9887. + * as published by the Free Software Foundation; either version
  9888. + * 2 of the License, or (at your option) any later version.
  9889. + */
  9890. +
  9891. +#include <linux/kernel.h>
  9892. +#include <linux/init.h>
  9893. +#include <linux/platform_device.h>
  9894. +#include <linux/pci.h>
  9895. +#include <linux/irq.h>
  9896. +#include <linux/mtd/physmap.h>
  9897. +#include <linux/mv643xx_eth.h>
  9898. +#include <linux/leds.h>
  9899. +#include <linux/gpio_keys.h>
  9900. +#include <linux/input.h>
  9901. +#include <linux/i2c.h>
  9902. +#include <linux/ata_platform.h>
  9903. +#include <linux/gpio.h>
  9904. +#include <asm/mach-types.h>
  9905. +#include <asm/mach/arch.h>
  9906. +#include <asm/mach/pci.h>
  9907. +#include <asm/arch/orion5x.h>
  9908. +#include "common.h"
  9909. +#include "mpp.h"
  9910. +
  9911. +#define MSS2_NOR_BOOT_BASE 0xff800000
  9912. +#define MSS2_NOR_BOOT_SIZE SZ_256K
  9913. +
  9914. +/*****************************************************************************
  9915. + * Maxtor Shared Storage II Info
  9916. + ****************************************************************************/
  9917. +
  9918. +/*
  9919. + * Maxtor Shared Storage II hardware :
  9920. + * - Marvell 88F5182-A2 C500
  9921. + * - Marvell 88E1111 Gigabit Ethernet PHY
  9922. + * - RTC M41T81 (@0x68) on I2C bus
  9923. + * - 256KB NOR flash
  9924. + * - 64MB of RAM
  9925. + */
  9926. +
  9927. +/*****************************************************************************
  9928. + * 256KB NOR Flash on BOOT Device
  9929. + ****************************************************************************/
  9930. +
  9931. +static struct physmap_flash_data mss2_nor_flash_data = {
  9932. + .width = 1,
  9933. +};
  9934. +
  9935. +static struct resource mss2_nor_flash_resource = {
  9936. + .flags = IORESOURCE_MEM,
  9937. + .start = MSS2_NOR_BOOT_BASE,
  9938. + .end = MSS2_NOR_BOOT_BASE + MSS2_NOR_BOOT_SIZE - 1,
  9939. +};
  9940. +
  9941. +static struct platform_device mss2_nor_flash = {
  9942. + .name = "physmap-flash",
  9943. + .id = 0,
  9944. + .dev = {
  9945. + .platform_data = &mss2_nor_flash_data,
  9946. + },
  9947. + .resource = &mss2_nor_flash_resource,
  9948. + .num_resources = 1,
  9949. +};
  9950. +
  9951. +/****************************************************************************
  9952. + * PCI setup
  9953. + ****************************************************************************/
  9954. +static int __init mss2_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
  9955. +{
  9956. + int irq;
  9957. +
  9958. + /*
  9959. + * Check for devices with hard-wired IRQs.
  9960. + */
  9961. + irq = orion5x_pci_map_irq(dev, slot, pin);
  9962. + if (irq != -1)
  9963. + return irq;
  9964. +
  9965. + return -1;
  9966. +}
  9967. +
  9968. +static struct hw_pci mss2_pci __initdata = {
  9969. + .nr_controllers = 2,
  9970. + .swizzle = pci_std_swizzle,
  9971. + .setup = orion5x_pci_sys_setup,
  9972. + .scan = orion5x_pci_sys_scan_bus,
  9973. + .map_irq = mss2_pci_map_irq,
  9974. +};
  9975. +
  9976. +static int __init mss2_pci_init(void)
  9977. +{
  9978. + if (machine_is_mss2())
  9979. + pci_common_init(&mss2_pci);
  9980. +
  9981. + return 0;
  9982. +}
  9983. +subsys_initcall(mss2_pci_init);
  9984. +
  9985. +
  9986. +/*****************************************************************************
  9987. + * Ethernet
  9988. + ****************************************************************************/
  9989. +
  9990. +static struct mv643xx_eth_platform_data mss2_eth_data = {
  9991. + .phy_addr = 8,
  9992. +};
  9993. +
  9994. +/*****************************************************************************
  9995. + * SATA
  9996. + ****************************************************************************/
  9997. +
  9998. +static struct mv_sata_platform_data mss2_sata_data = {
  9999. + .n_ports = 2,
  10000. +};
  10001. +
  10002. +/*****************************************************************************
  10003. + * GPIO buttons
  10004. + ****************************************************************************/
  10005. +
  10006. +#define MSS2_GPIO_KEY_RESET 12
  10007. +#define MSS2_GPIO_KEY_POWER 11
  10008. +
  10009. +static struct gpio_keys_button mss2_buttons[] = {
  10010. + {
  10011. + .code = KEY_POWER,
  10012. + .gpio = MSS2_GPIO_KEY_POWER,
  10013. + .desc = "Power",
  10014. + .active_low = 1,
  10015. + }, {
  10016. + .code = KEY_RESTART,
  10017. + .gpio = MSS2_GPIO_KEY_RESET,
  10018. + .desc = "Reset",
  10019. + .active_low = 1,
  10020. + },
  10021. +};
  10022. +
  10023. +static struct gpio_keys_platform_data mss2_button_data = {
  10024. + .buttons = mss2_buttons,
  10025. + .nbuttons = ARRAY_SIZE(mss2_buttons),
  10026. +};
  10027. +
  10028. +static struct platform_device mss2_button_device = {
  10029. + .name = "gpio-keys",
  10030. + .id = -1,
  10031. + .dev = {
  10032. + .platform_data = &mss2_button_data,
  10033. + },
  10034. +};
  10035. +
  10036. +/*****************************************************************************
  10037. + * RTC m41t81 on I2C bus
  10038. + ****************************************************************************/
  10039. +
  10040. +#define MSS2_GPIO_RTC_IRQ 3
  10041. +
  10042. +static struct i2c_board_info __initdata mss2_i2c_rtc = {
  10043. + I2C_BOARD_INFO("m41t81", 0x68),
  10044. +};
  10045. +
  10046. +/*****************************************************************************
  10047. + * MSS2 power off method
  10048. + ****************************************************************************/
  10049. +/*
  10050. + * On the Maxtor Shared Storage II, the shutdown process is the following :
  10051. + * - Userland modifies U-boot env to tell U-boot to go idle at next boot
  10052. + * - The board reboots
  10053. + * - U-boot starts and go into an idle mode until the user press "power"
  10054. + */
  10055. +static void mss2_power_off(void)
  10056. +{
  10057. + u32 reg;
  10058. +
  10059. + /*
  10060. + * Enable and issue soft reset
  10061. + */
  10062. + reg = readl(CPU_RESET_MASK);
  10063. + reg |= 1 << 2;
  10064. + writel(reg, CPU_RESET_MASK);
  10065. +
  10066. + reg = readl(CPU_SOFT_RESET);
  10067. + reg |= 1;
  10068. + writel(reg, CPU_SOFT_RESET);
  10069. +}
  10070. +
  10071. +/****************************************************************************
  10072. + * General Setup
  10073. + ****************************************************************************/
  10074. +static struct orion5x_mpp_mode mss2_mpp_modes[] __initdata = {
  10075. + { 0, MPP_GPIO }, /* Power LED */
  10076. + { 1, MPP_GPIO }, /* Error LED */
  10077. + { 2, MPP_UNUSED },
  10078. + { 3, MPP_GPIO }, /* RTC interrupt */
  10079. + { 4, MPP_GPIO }, /* HDD ind. (Single/Dual)*/
  10080. + { 5, MPP_GPIO }, /* HD0 5V control */
  10081. + { 6, MPP_GPIO }, /* HD0 12V control */
  10082. + { 7, MPP_GPIO }, /* HD1 5V control */
  10083. + { 8, MPP_GPIO }, /* HD1 12V control */
  10084. + { 9, MPP_UNUSED },
  10085. + { 10, MPP_GPIO }, /* Fan control */
  10086. + { 11, MPP_GPIO }, /* Power button */
  10087. + { 12, MPP_GPIO }, /* Reset button */
  10088. + { 13, MPP_UNUSED },
  10089. + { 14, MPP_SATA_LED }, /* SATA 0 active */
  10090. + { 15, MPP_SATA_LED }, /* SATA 1 active */
  10091. + { 16, MPP_UNUSED },
  10092. + { 17, MPP_UNUSED },
  10093. + { 18, MPP_UNUSED },
  10094. + { 19, MPP_UNUSED },
  10095. + { -1 },
  10096. +};
  10097. +
  10098. +static void __init mss2_init(void)
  10099. +{
  10100. + /* Setup basic Orion functions. Need to be called early. */
  10101. + orion5x_init();
  10102. +
  10103. + orion5x_mpp_conf(mss2_mpp_modes);
  10104. +
  10105. + /*
  10106. + * MPP[20] Unused
  10107. + * MPP[21] PCI clock
  10108. + * MPP[22] USB 0 over current
  10109. + * MPP[23] USB 1 over current
  10110. + */
  10111. +
  10112. + /*
  10113. + * Configure peripherals.
  10114. + */
  10115. + orion5x_ehci0_init();
  10116. + orion5x_ehci1_init();
  10117. + orion5x_eth_init(&mss2_eth_data);
  10118. + orion5x_i2c_init();
  10119. + orion5x_sata_init(&mss2_sata_data);
  10120. + orion5x_uart0_init();
  10121. +
  10122. + orion5x_setup_dev_boot_win(MSS2_NOR_BOOT_BASE, MSS2_NOR_BOOT_SIZE);
  10123. + platform_device_register(&mss2_nor_flash);
  10124. +
  10125. + platform_device_register(&mss2_button_device);
  10126. +
  10127. + if (gpio_request(MSS2_GPIO_RTC_IRQ, "rtc") == 0) {
  10128. + if (gpio_direction_input(MSS2_GPIO_RTC_IRQ) == 0)
  10129. + mss2_i2c_rtc.irq = gpio_to_irq(MSS2_GPIO_RTC_IRQ);
  10130. + else
  10131. + gpio_free(MSS2_GPIO_RTC_IRQ);
  10132. + }
  10133. + i2c_register_board_info(0, &mss2_i2c_rtc, 1);
  10134. +
  10135. + /* register mss2 specific power-off method */
  10136. + pm_power_off = mss2_power_off;
  10137. +}
  10138. +
  10139. +MACHINE_START(MSS2, "Maxtor Shared Storage II")
  10140. + /* Maintainer: Sylver Bruneau <[email protected]> */
  10141. + .phys_io = ORION5X_REGS_PHYS_BASE,
  10142. + .io_pg_offst = ((ORION5X_REGS_VIRT_BASE) >> 18) & 0xFFFC,
  10143. + .boot_params = 0x00000100,
  10144. + .init_machine = mss2_init,
  10145. + .map_io = orion5x_map_io,
  10146. + .init_irq = orion5x_init_irq,
  10147. + .timer = &orion5x_timer,
  10148. + .fixup = tag_fixup_mem32
  10149. +MACHINE_END
  10150. --- /dev/null
  10151. +++ b/arch/arm/mach-orion5x/mv2120-setup.c
  10152. @@ -0,0 +1,194 @@
  10153. +/*
  10154. + * Copyright (C) 2007 Herbert Valerio Riedel <[email protected]>
  10155. + * Copyright (C) 2008 Martin Michlmayr <[email protected]>
  10156. + *
  10157. + * This program is free software; you can redistribute it and/or modify
  10158. + * it under the terms of the GNU Lesser General Public License as
  10159. + * published by the Free Software Foundation; either version 2 of the
  10160. + * License, or (at your option) any later version.
  10161. + */
  10162. +
  10163. +#include <linux/kernel.h>
  10164. +#include <linux/init.h>
  10165. +#include <linux/platform_device.h>
  10166. +#include <linux/irq.h>
  10167. +#include <linux/mtd/physmap.h>
  10168. +#include <linux/mv643xx_eth.h>
  10169. +#include <linux/leds.h>
  10170. +#include <linux/gpio_keys.h>
  10171. +#include <linux/input.h>
  10172. +#include <linux/i2c.h>
  10173. +#include <linux/ata_platform.h>
  10174. +#include <asm/mach-types.h>
  10175. +#include <asm/gpio.h>
  10176. +#include <asm/mach/arch.h>
  10177. +#include <asm/arch/orion5x.h>
  10178. +#include "common.h"
  10179. +#include "mpp.h"
  10180. +
  10181. +#define MV2120_NOR_BOOT_BASE 0xf4000000
  10182. +#define MV2120_NOR_BOOT_SIZE SZ_512K
  10183. +
  10184. +#define MV2120_GPIO_RTC_IRQ 3
  10185. +#define MV2120_GPIO_KEY_RESET 17
  10186. +#define MV2120_GPIO_KEY_POWER 18
  10187. +#define MV2120_GPIO_POWER_OFF 19
  10188. +
  10189. +
  10190. +/*****************************************************************************
  10191. + * Ethernet
  10192. + ****************************************************************************/
  10193. +static struct mv643xx_eth_platform_data mv2120_eth_data = {
  10194. + .phy_addr = 8,
  10195. +};
  10196. +
  10197. +static struct mv_sata_platform_data mv2120_sata_data = {
  10198. + .n_ports = 2,
  10199. +};
  10200. +
  10201. +static struct mtd_partition mv2120_partitions[] = {
  10202. + {
  10203. + .name = "firmware",
  10204. + .size = 0x00080000,
  10205. + .offset = 0,
  10206. + },
  10207. +};
  10208. +
  10209. +static struct physmap_flash_data mv2120_nor_flash_data = {
  10210. + .width = 1,
  10211. + .parts = mv2120_partitions,
  10212. + .nr_parts = ARRAY_SIZE(mv2120_partitions)
  10213. +};
  10214. +
  10215. +static struct resource mv2120_nor_flash_resource = {
  10216. + .flags = IORESOURCE_MEM,
  10217. + .start = MV2120_NOR_BOOT_BASE,
  10218. + .end = MV2120_NOR_BOOT_BASE + MV2120_NOR_BOOT_SIZE - 1,
  10219. +};
  10220. +
  10221. +static struct platform_device mv2120_nor_flash = {
  10222. + .name = "physmap-flash",
  10223. + .id = 0,
  10224. + .dev = {
  10225. + .platform_data = &mv2120_nor_flash_data,
  10226. + },
  10227. + .resource = &mv2120_nor_flash_resource,
  10228. + .num_resources = 1,
  10229. +};
  10230. +
  10231. +static struct gpio_keys_button mv2120_buttons[] = {
  10232. + {
  10233. + .code = KEY_RESTART,
  10234. + .gpio = MV2120_GPIO_KEY_RESET,
  10235. + .desc = "reset",
  10236. + .active_low = 1,
  10237. + }, {
  10238. + .code = KEY_POWER,
  10239. + .gpio = MV2120_GPIO_KEY_POWER,
  10240. + .desc = "power",
  10241. + .active_low = 1,
  10242. + },
  10243. +};
  10244. +
  10245. +static struct gpio_keys_platform_data mv2120_button_data = {
  10246. + .buttons = mv2120_buttons,
  10247. + .nbuttons = ARRAY_SIZE(mv2120_buttons),
  10248. +};
  10249. +
  10250. +static struct platform_device mv2120_button_device = {
  10251. + .name = "gpio-keys",
  10252. + .id = -1,
  10253. + .num_resources = 0,
  10254. + .dev = {
  10255. + .platform_data = &mv2120_button_data,
  10256. + },
  10257. +};
  10258. +
  10259. +
  10260. +/****************************************************************************
  10261. + * General Setup
  10262. + ****************************************************************************/
  10263. +static struct orion5x_mpp_mode mv2120_mpp_modes[] __initdata = {
  10264. + { 0, MPP_GPIO }, /* Sys status LED */
  10265. + { 1, MPP_GPIO }, /* Sys error LED */
  10266. + { 2, MPP_GPIO }, /* OverTemp interrupt */
  10267. + { 3, MPP_GPIO }, /* RTC interrupt */
  10268. + { 4, MPP_GPIO }, /* V_LED 5V */
  10269. + { 5, MPP_GPIO }, /* V_LED 3.3V */
  10270. + { 6, MPP_UNUSED },
  10271. + { 7, MPP_UNUSED },
  10272. + { 8, MPP_GPIO }, /* SATA 0 fail LED */
  10273. + { 9, MPP_GPIO }, /* SATA 1 fail LED */
  10274. + { 10, MPP_UNUSED },
  10275. + { 11, MPP_UNUSED },
  10276. + { 12, MPP_SATA_LED }, /* SATA 0 presence */
  10277. + { 13, MPP_SATA_LED }, /* SATA 1 presence */
  10278. + { 14, MPP_SATA_LED }, /* SATA 0 active */
  10279. + { 15, MPP_SATA_LED }, /* SATA 1 active */
  10280. + { 16, MPP_UNUSED },
  10281. + { 17, MPP_GPIO }, /* Reset button */
  10282. + { 18, MPP_GPIO }, /* Power button */
  10283. + { 19, MPP_GPIO }, /* Power off */
  10284. + { -1 },
  10285. +};
  10286. +
  10287. +static struct i2c_board_info __initdata mv2120_i2c_rtc = {
  10288. + I2C_BOARD_INFO("rtc-pcf8563", 0x51),
  10289. + .irq = 0,
  10290. +};
  10291. +
  10292. +static void mv2120_power_off(void)
  10293. +{
  10294. + pr_info("%s: triggering power-off...\n", __func__);
  10295. + gpio_set_value(MV2120_GPIO_POWER_OFF, 0);
  10296. +}
  10297. +
  10298. +static void __init mv2120_init(void)
  10299. +{
  10300. + /* Setup basic Orion functions. Need to be called early. */
  10301. + orion5x_init();
  10302. +
  10303. + orion5x_mpp_conf(mv2120_mpp_modes);
  10304. +
  10305. + /*
  10306. + * Configure peripherals.
  10307. + */
  10308. + orion5x_ehci0_init();
  10309. + orion5x_ehci1_init();
  10310. + orion5x_eth_init(&mv2120_eth_data);
  10311. + orion5x_i2c_init();
  10312. + orion5x_sata_init(&mv2120_sata_data);
  10313. + orion5x_uart0_init();
  10314. +
  10315. + orion5x_setup_dev_boot_win(MV2120_NOR_BOOT_BASE, MV2120_NOR_BOOT_SIZE);
  10316. + platform_device_register(&mv2120_nor_flash);
  10317. +
  10318. + platform_device_register(&mv2120_button_device);
  10319. +
  10320. + if (gpio_request(MV2120_GPIO_RTC_IRQ, "rtc") == 0) {
  10321. + if (gpio_direction_input(MV2120_GPIO_RTC_IRQ) == 0)
  10322. + mv2120_i2c_rtc.irq = gpio_to_irq(MV2120_GPIO_RTC_IRQ);
  10323. + else
  10324. + gpio_free(MV2120_GPIO_RTC_IRQ);
  10325. + }
  10326. + i2c_register_board_info(0, &mv2120_i2c_rtc, 1);
  10327. +
  10328. + /* register mv2120 specific power-off method */
  10329. + if (gpio_request(MV2120_GPIO_POWER_OFF, "POWEROFF") != 0 ||
  10330. + gpio_direction_output(MV2120_GPIO_POWER_OFF, 1) != 0)
  10331. + pr_err("mv2120: failed to setup power-off GPIO\n");
  10332. + pm_power_off = mv2120_power_off;
  10333. +}
  10334. +
  10335. +/* Warning: HP uses a wrong mach-type (=526) in their bootloader */
  10336. +MACHINE_START(MV2120, "HP Media Vault mv2120")
  10337. + /* Maintainer: Martin Michlmayr <[email protected]> */
  10338. + .phys_io = ORION5X_REGS_PHYS_BASE,
  10339. + .io_pg_offst = ((ORION5X_REGS_VIRT_BASE) >> 18) & 0xFFFC,
  10340. + .boot_params = 0x00000100,
  10341. + .init_machine = mv2120_init,
  10342. + .map_io = orion5x_map_io,
  10343. + .init_irq = orion5x_init_irq,
  10344. + .timer = &orion5x_timer,
  10345. + .fixup = tag_fixup_mem32
  10346. +MACHINE_END
  10347. --- a/arch/arm/mach-orion5x/pci.c
  10348. +++ b/arch/arm/mach-orion5x/pci.c
  10349. @@ -152,6 +152,8 @@
  10350. if (dev == MV88F5181_DEV_ID || dev == MV88F5182_DEV_ID) {
  10351. printk(KERN_NOTICE "Applying Orion-1/Orion-NAS PCIe config "
  10352. "read transaction workaround\n");
  10353. + orion5x_setup_pcie_wa_win(ORION5X_PCIE_WA_PHYS_BASE,
  10354. + ORION5X_PCIE_WA_SIZE);
  10355. pcie_ops.read = pcie_rd_conf_wa;
  10356. }
  10357. @@ -240,13 +242,13 @@
  10358. * PCI Address Decode Windows registers
  10359. */
  10360. #define PCI_BAR_SIZE_DDR_CS(n) (((n) == 0) ? ORION5X_PCI_REG(0xc08) : \
  10361. - ((n) == 1) ? ORION5X_PCI_REG(0xd08) : \
  10362. - ((n) == 2) ? ORION5X_PCI_REG(0xc0c) : \
  10363. - ((n) == 3) ? ORION5X_PCI_REG(0xd0c) : 0)
  10364. -#define PCI_BAR_REMAP_DDR_CS(n) (((n) ==0) ? ORION5X_PCI_REG(0xc48) : \
  10365. - ((n) == 1) ? ORION5X_PCI_REG(0xd48) : \
  10366. - ((n) == 2) ? ORION5X_PCI_REG(0xc4c) : \
  10367. - ((n) == 3) ? ORION5X_PCI_REG(0xd4c) : 0)
  10368. + ((n) == 1) ? ORION5X_PCI_REG(0xd08) : \
  10369. + ((n) == 2) ? ORION5X_PCI_REG(0xc0c) : \
  10370. + ((n) == 3) ? ORION5X_PCI_REG(0xd0c) : 0)
  10371. +#define PCI_BAR_REMAP_DDR_CS(n) (((n) == 0) ? ORION5X_PCI_REG(0xc48) : \
  10372. + ((n) == 1) ? ORION5X_PCI_REG(0xd48) : \
  10373. + ((n) == 2) ? ORION5X_PCI_REG(0xc4c) : \
  10374. + ((n) == 3) ? ORION5X_PCI_REG(0xd4c) : 0)
  10375. #define PCI_BAR_ENABLE ORION5X_PCI_REG(0xc3c)
  10376. #define PCI_ADDR_DECODE_CTRL ORION5X_PCI_REG(0xd3c)
  10377. @@ -266,7 +268,7 @@
  10378. static int orion5x_pci_local_bus_nr(void)
  10379. {
  10380. - u32 conf = orion5x_read(PCI_P2P_CONF);
  10381. + u32 conf = readl(PCI_P2P_CONF);
  10382. return((conf & PCI_P2P_BUS_MASK) >> PCI_P2P_BUS_OFFS);
  10383. }
  10384. @@ -276,11 +278,11 @@
  10385. unsigned long flags;
  10386. spin_lock_irqsave(&orion5x_pci_lock, flags);
  10387. - orion5x_write(PCI_CONF_ADDR, PCI_CONF_BUS(bus) |
  10388. - PCI_CONF_DEV(dev) | PCI_CONF_REG(where) |
  10389. - PCI_CONF_FUNC(func) | PCI_CONF_ADDR_EN);
  10390. + writel(PCI_CONF_BUS(bus) |
  10391. + PCI_CONF_DEV(dev) | PCI_CONF_REG(where) |
  10392. + PCI_CONF_FUNC(func) | PCI_CONF_ADDR_EN, PCI_CONF_ADDR);
  10393. - *val = orion5x_read(PCI_CONF_DATA);
  10394. + *val = readl(PCI_CONF_DATA);
  10395. if (size == 1)
  10396. *val = (*val >> (8*(where & 0x3))) & 0xff;
  10397. @@ -300,9 +302,9 @@
  10398. spin_lock_irqsave(&orion5x_pci_lock, flags);
  10399. - orion5x_write(PCI_CONF_ADDR, PCI_CONF_BUS(bus) |
  10400. - PCI_CONF_DEV(dev) | PCI_CONF_REG(where) |
  10401. - PCI_CONF_FUNC(func) | PCI_CONF_ADDR_EN);
  10402. + writel(PCI_CONF_BUS(bus) |
  10403. + PCI_CONF_DEV(dev) | PCI_CONF_REG(where) |
  10404. + PCI_CONF_FUNC(func) | PCI_CONF_ADDR_EN, PCI_CONF_ADDR);
  10405. if (size == 4) {
  10406. __raw_writel(val, PCI_CONF_DATA);
  10407. @@ -353,9 +355,9 @@
  10408. static void __init orion5x_pci_set_bus_nr(int nr)
  10409. {
  10410. - u32 p2p = orion5x_read(PCI_P2P_CONF);
  10411. + u32 p2p = readl(PCI_P2P_CONF);
  10412. - if (orion5x_read(PCI_MODE) & PCI_MODE_PCIX) {
  10413. + if (readl(PCI_MODE) & PCI_MODE_PCIX) {
  10414. /*
  10415. * PCI-X mode
  10416. */
  10417. @@ -372,7 +374,7 @@
  10418. */
  10419. p2p &= ~PCI_P2P_BUS_MASK;
  10420. p2p |= (nr << PCI_P2P_BUS_OFFS);
  10421. - orion5x_write(PCI_P2P_CONF, p2p);
  10422. + writel(p2p, PCI_P2P_CONF);
  10423. }
  10424. }
  10425. @@ -399,7 +401,7 @@
  10426. * First, disable windows.
  10427. */
  10428. win_enable = 0xffffffff;
  10429. - orion5x_write(PCI_BAR_ENABLE, win_enable);
  10430. + writel(win_enable, PCI_BAR_ENABLE);
  10431. /*
  10432. * Setup windows for DDR banks.
  10433. @@ -425,10 +427,10 @@
  10434. */
  10435. reg = PCI_CONF_REG_BAR_HI_CS(cs->cs_index);
  10436. orion5x_pci_hw_wr_conf(bus, 0, func, reg, 4, 0);
  10437. - orion5x_write(PCI_BAR_SIZE_DDR_CS(cs->cs_index),
  10438. - (cs->size - 1) & 0xfffff000);
  10439. - orion5x_write(PCI_BAR_REMAP_DDR_CS(cs->cs_index),
  10440. - cs->base & 0xfffff000);
  10441. + writel((cs->size - 1) & 0xfffff000,
  10442. + PCI_BAR_SIZE_DDR_CS(cs->cs_index));
  10443. + writel(cs->base & 0xfffff000,
  10444. + PCI_BAR_REMAP_DDR_CS(cs->cs_index));
  10445. /*
  10446. * Enable decode window for this chip select.
  10447. @@ -439,7 +441,7 @@
  10448. /*
  10449. * Re-enable decode windows.
  10450. */
  10451. - orion5x_write(PCI_BAR_ENABLE, win_enable);
  10452. + writel(win_enable, PCI_BAR_ENABLE);
  10453. /*
  10454. * Disable automatic update of address remaping when writing to BARs.
  10455. --- a/arch/arm/mach-orion5x/rd88f5182-setup.c
  10456. +++ b/arch/arm/mach-orion5x/rd88f5182-setup.c
  10457. @@ -26,6 +26,7 @@
  10458. #include <asm/mach/pci.h>
  10459. #include <asm/arch/orion5x.h>
  10460. #include "common.h"
  10461. +#include "mpp.h"
  10462. /*****************************************************************************
  10463. * RD-88F5182 Info
  10464. @@ -125,6 +126,7 @@
  10465. leds_event = rd88f5182_dbgled_event;
  10466. }
  10467. +
  10468. return 0;
  10469. }
  10470. @@ -220,7 +222,6 @@
  10471. static struct mv643xx_eth_platform_data rd88f5182_eth_data = {
  10472. .phy_addr = 8,
  10473. - .force_phy_addr = 1,
  10474. };
  10475. /*****************************************************************************
  10476. @@ -234,15 +235,34 @@
  10477. * Sata
  10478. ****************************************************************************/
  10479. static struct mv_sata_platform_data rd88f5182_sata_data = {
  10480. - .n_ports = 2,
  10481. + .n_ports = 2,
  10482. };
  10483. /*****************************************************************************
  10484. * General Setup
  10485. ****************************************************************************/
  10486. -
  10487. -static struct platform_device *rd88f5182_devices[] __initdata = {
  10488. - &rd88f5182_nor_flash,
  10489. +static struct orion5x_mpp_mode rd88f5182_mpp_modes[] __initdata = {
  10490. + { 0, MPP_GPIO }, /* Debug Led */
  10491. + { 1, MPP_GPIO }, /* Reset Switch */
  10492. + { 2, MPP_UNUSED },
  10493. + { 3, MPP_GPIO }, /* RTC Int */
  10494. + { 4, MPP_GPIO },
  10495. + { 5, MPP_GPIO },
  10496. + { 6, MPP_GPIO }, /* PCI_intA */
  10497. + { 7, MPP_GPIO }, /* PCI_intB */
  10498. + { 8, MPP_UNUSED },
  10499. + { 9, MPP_UNUSED },
  10500. + { 10, MPP_UNUSED },
  10501. + { 11, MPP_UNUSED },
  10502. + { 12, MPP_SATA_LED }, /* SATA 0 presence */
  10503. + { 13, MPP_SATA_LED }, /* SATA 1 presence */
  10504. + { 14, MPP_SATA_LED }, /* SATA 0 active */
  10505. + { 15, MPP_SATA_LED }, /* SATA 1 active */
  10506. + { 16, MPP_UNUSED },
  10507. + { 17, MPP_UNUSED },
  10508. + { 18, MPP_UNUSED },
  10509. + { 19, MPP_UNUSED },
  10510. + { -1 },
  10511. };
  10512. static void __init rd88f5182_init(void)
  10513. @@ -252,35 +272,9 @@
  10514. */
  10515. orion5x_init();
  10516. - /*
  10517. - * Setup the CPU address decode windows for our devices
  10518. - */
  10519. - orion5x_setup_dev_boot_win(RD88F5182_NOR_BOOT_BASE,
  10520. - RD88F5182_NOR_BOOT_SIZE);
  10521. - orion5x_setup_dev1_win(RD88F5182_NOR_BASE, RD88F5182_NOR_SIZE);
  10522. -
  10523. - /*
  10524. - * Open a special address decode windows for the PCIe WA.
  10525. - */
  10526. - orion5x_setup_pcie_wa_win(ORION5X_PCIE_WA_PHYS_BASE,
  10527. - ORION5X_PCIE_WA_SIZE);
  10528. + orion5x_mpp_conf(rd88f5182_mpp_modes);
  10529. /*
  10530. - * Setup Multiplexing Pins --
  10531. - * MPP[0] Debug Led (GPIO - Out)
  10532. - * MPP[1] Debug Led (GPIO - Out)
  10533. - * MPP[2] N/A
  10534. - * MPP[3] RTC_Int (GPIO - In)
  10535. - * MPP[4] GPIO
  10536. - * MPP[5] GPIO
  10537. - * MPP[6] PCI_intA (GPIO - In)
  10538. - * MPP[7] PCI_intB (GPIO - In)
  10539. - * MPP[8-11] N/A
  10540. - * MPP[12] SATA 0 presence Indication
  10541. - * MPP[13] SATA 1 presence Indication
  10542. - * MPP[14] SATA 0 active Indication
  10543. - * MPP[15] SATA 1 active indication
  10544. - * MPP[16-19] Not used
  10545. * MPP[20] PCI Clock to MV88F5182
  10546. * MPP[21] PCI Clock to mini PCI CON11
  10547. * MPP[22] USB 0 over current indication
  10548. @@ -289,16 +283,23 @@
  10549. * MPP[25] USB 0 over current enable
  10550. */
  10551. - orion5x_write(MPP_0_7_CTRL, 0x00000003);
  10552. - orion5x_write(MPP_8_15_CTRL, 0x55550000);
  10553. - orion5x_write(MPP_16_19_CTRL, 0x5555);
  10554. + /*
  10555. + * Configure peripherals.
  10556. + */
  10557. + orion5x_ehci0_init();
  10558. + orion5x_ehci1_init();
  10559. + orion5x_eth_init(&rd88f5182_eth_data);
  10560. + orion5x_i2c_init();
  10561. + orion5x_sata_init(&rd88f5182_sata_data);
  10562. + orion5x_uart0_init();
  10563. - orion5x_gpio_set_valid_pins(0x000000fb);
  10564. + orion5x_setup_dev_boot_win(RD88F5182_NOR_BOOT_BASE,
  10565. + RD88F5182_NOR_BOOT_SIZE);
  10566. +
  10567. + orion5x_setup_dev1_win(RD88F5182_NOR_BASE, RD88F5182_NOR_SIZE);
  10568. + platform_device_register(&rd88f5182_nor_flash);
  10569. - platform_add_devices(rd88f5182_devices, ARRAY_SIZE(rd88f5182_devices));
  10570. i2c_register_board_info(0, &rd88f5182_i2c_rtc, 1);
  10571. - orion5x_eth_init(&rd88f5182_eth_data);
  10572. - orion5x_sata_init(&rd88f5182_sata_data);
  10573. }
  10574. MACHINE_START(RD88F5182, "Marvell Orion-NAS Reference Design")
  10575. --- a/arch/arm/mach-orion5x/ts209-setup.c
  10576. +++ b/arch/arm/mach-orion5x/ts209-setup.c
  10577. @@ -28,6 +28,8 @@
  10578. #include <asm/mach/pci.h>
  10579. #include <asm/arch/orion5x.h>
  10580. #include "common.h"
  10581. +#include "mpp.h"
  10582. +#include "tsx09-common.h"
  10583. #define QNAP_TS209_NOR_BOOT_BASE 0xf4000000
  10584. #define QNAP_TS209_NOR_BOOT_SIZE SZ_8M
  10585. @@ -47,52 +49,54 @@
  10586. ***************************************************************************/
  10587. static struct mtd_partition qnap_ts209_partitions[] = {
  10588. {
  10589. - .name = "U-Boot",
  10590. - .size = 0x00080000,
  10591. - .offset = 0x00780000,
  10592. - .mask_flags = MTD_WRITEABLE,
  10593. + .name = "U-Boot",
  10594. + .size = 0x00080000,
  10595. + .offset = 0x00780000,
  10596. + .mask_flags = MTD_WRITEABLE,
  10597. }, {
  10598. - .name = "Kernel",
  10599. - .size = 0x00200000,
  10600. - .offset = 0,
  10601. + .name = "Kernel",
  10602. + .size = 0x00200000,
  10603. + .offset = 0,
  10604. }, {
  10605. - .name = "RootFS1",
  10606. - .size = 0x00400000,
  10607. - .offset = 0x00200000,
  10608. + .name = "RootFS1",
  10609. + .size = 0x00400000,
  10610. + .offset = 0x00200000,
  10611. }, {
  10612. - .name = "RootFS2",
  10613. - .size = 0x00100000,
  10614. - .offset = 0x00600000,
  10615. + .name = "RootFS2",
  10616. + .size = 0x00100000,
  10617. + .offset = 0x00600000,
  10618. }, {
  10619. - .name = "U-Boot Config",
  10620. - .size = 0x00020000,
  10621. - .offset = 0x00760000,
  10622. + .name = "U-Boot Config",
  10623. + .size = 0x00020000,
  10624. + .offset = 0x00760000,
  10625. }, {
  10626. - .name = "NAS Config",
  10627. - .size = 0x00060000,
  10628. - .offset = 0x00700000,
  10629. - .mask_flags = MTD_WRITEABLE,
  10630. - }
  10631. + .name = "NAS Config",
  10632. + .size = 0x00060000,
  10633. + .offset = 0x00700000,
  10634. + .mask_flags = MTD_WRITEABLE,
  10635. + },
  10636. };
  10637. static struct physmap_flash_data qnap_ts209_nor_flash_data = {
  10638. - .width = 1,
  10639. - .parts = qnap_ts209_partitions,
  10640. - .nr_parts = ARRAY_SIZE(qnap_ts209_partitions)
  10641. + .width = 1,
  10642. + .parts = qnap_ts209_partitions,
  10643. + .nr_parts = ARRAY_SIZE(qnap_ts209_partitions)
  10644. };
  10645. static struct resource qnap_ts209_nor_flash_resource = {
  10646. - .flags = IORESOURCE_MEM,
  10647. - .start = QNAP_TS209_NOR_BOOT_BASE,
  10648. - .end = QNAP_TS209_NOR_BOOT_BASE + QNAP_TS209_NOR_BOOT_SIZE - 1,
  10649. + .flags = IORESOURCE_MEM,
  10650. + .start = QNAP_TS209_NOR_BOOT_BASE,
  10651. + .end = QNAP_TS209_NOR_BOOT_BASE + QNAP_TS209_NOR_BOOT_SIZE - 1,
  10652. };
  10653. static struct platform_device qnap_ts209_nor_flash = {
  10654. - .name = "physmap-flash",
  10655. - .id = 0,
  10656. - .dev = { .platform_data = &qnap_ts209_nor_flash_data, },
  10657. - .resource = &qnap_ts209_nor_flash_resource,
  10658. - .num_resources = 1,
  10659. + .name = "physmap-flash",
  10660. + .id = 0,
  10661. + .dev = {
  10662. + .platform_data = &qnap_ts209_nor_flash_data,
  10663. + },
  10664. + .resource = &qnap_ts209_nor_flash_resource,
  10665. + .num_resources = 1,
  10666. };
  10667. /*****************************************************************************
  10668. @@ -164,12 +168,12 @@
  10669. }
  10670. static struct hw_pci qnap_ts209_pci __initdata = {
  10671. - .nr_controllers = 2,
  10672. - .preinit = qnap_ts209_pci_preinit,
  10673. - .swizzle = pci_std_swizzle,
  10674. - .setup = orion5x_pci_sys_setup,
  10675. - .scan = orion5x_pci_sys_scan_bus,
  10676. - .map_irq = qnap_ts209_pci_map_irq,
  10677. + .nr_controllers = 2,
  10678. + .preinit = qnap_ts209_pci_preinit,
  10679. + .swizzle = pci_std_swizzle,
  10680. + .setup = orion5x_pci_sys_setup,
  10681. + .scan = orion5x_pci_sys_scan_bus,
  10682. + .map_irq = qnap_ts209_pci_map_irq,
  10683. };
  10684. static int __init qnap_ts209_pci_init(void)
  10685. @@ -183,96 +187,6 @@
  10686. subsys_initcall(qnap_ts209_pci_init);
  10687. /*****************************************************************************
  10688. - * Ethernet
  10689. - ****************************************************************************/
  10690. -
  10691. -static struct mv643xx_eth_platform_data qnap_ts209_eth_data = {
  10692. - .phy_addr = 8,
  10693. - .force_phy_addr = 1,
  10694. -};
  10695. -
  10696. -static int __init parse_hex_nibble(char n)
  10697. -{
  10698. - if (n >= '0' && n <= '9')
  10699. - return n - '0';
  10700. -
  10701. - if (n >= 'A' && n <= 'F')
  10702. - return n - 'A' + 10;
  10703. -
  10704. - if (n >= 'a' && n <= 'f')
  10705. - return n - 'a' + 10;
  10706. -
  10707. - return -1;
  10708. -}
  10709. -
  10710. -static int __init parse_hex_byte(const char *b)
  10711. -{
  10712. - int hi;
  10713. - int lo;
  10714. -
  10715. - hi = parse_hex_nibble(b[0]);
  10716. - lo = parse_hex_nibble(b[1]);
  10717. -
  10718. - if (hi < 0 || lo < 0)
  10719. - return -1;
  10720. -
  10721. - return (hi << 4) | lo;
  10722. -}
  10723. -
  10724. -static int __init check_mac_addr(const char *addr_str)
  10725. -{
  10726. - u_int8_t addr[6];
  10727. - int i;
  10728. -
  10729. - for (i = 0; i < 6; i++) {
  10730. - int byte;
  10731. -
  10732. - /*
  10733. - * Enforce "xx:xx:xx:xx:xx:xx\n" format.
  10734. - */
  10735. - if (addr_str[(i * 3) + 2] != ((i < 5) ? ':' : '\n'))
  10736. - return -1;
  10737. -
  10738. - byte = parse_hex_byte(addr_str + (i * 3));
  10739. - if (byte < 0)
  10740. - return -1;
  10741. - addr[i] = byte;
  10742. - }
  10743. -
  10744. - printk(KERN_INFO "ts209: found ethernet mac address ");
  10745. - for (i = 0; i < 6; i++)
  10746. - printk("%.2x%s", addr[i], (i < 5) ? ":" : ".\n");
  10747. -
  10748. - memcpy(qnap_ts209_eth_data.mac_addr, addr, 6);
  10749. -
  10750. - return 0;
  10751. -}
  10752. -
  10753. -/*
  10754. - * The 'NAS Config' flash partition has an ext2 filesystem which
  10755. - * contains a file that has the ethernet MAC address in plain text
  10756. - * (format "xx:xx:xx:xx:xx:xx\n".)
  10757. - */
  10758. -static void __init ts209_find_mac_addr(void)
  10759. -{
  10760. - unsigned long addr;
  10761. -
  10762. - for (addr = 0x00700000; addr < 0x00760000; addr += 1024) {
  10763. - char *nor_page;
  10764. - int ret = 0;
  10765. -
  10766. - nor_page = ioremap(QNAP_TS209_NOR_BOOT_BASE + addr, 1024);
  10767. - if (nor_page != NULL) {
  10768. - ret = check_mac_addr(nor_page);
  10769. - iounmap(nor_page);
  10770. - }
  10771. -
  10772. - if (ret == 0)
  10773. - break;
  10774. - }
  10775. -}
  10776. -
  10777. -/*****************************************************************************
  10778. * RTC S35390A on I2C bus
  10779. ****************************************************************************/
  10780. @@ -280,7 +194,7 @@
  10781. static struct i2c_board_info __initdata qnap_ts209_i2c_rtc = {
  10782. I2C_BOARD_INFO("s35390a", 0x30),
  10783. - .irq = 0,
  10784. + .irq = 0,
  10785. };
  10786. /****************************************************************************
  10787. @@ -297,70 +211,63 @@
  10788. .gpio = QNAP_TS209_GPIO_KEY_MEDIA,
  10789. .desc = "USB Copy Button",
  10790. .active_low = 1,
  10791. - },
  10792. - {
  10793. + }, {
  10794. .code = KEY_POWER,
  10795. .gpio = QNAP_TS209_GPIO_KEY_RESET,
  10796. .desc = "Reset Button",
  10797. .active_low = 1,
  10798. - }
  10799. + },
  10800. };
  10801. static struct gpio_keys_platform_data qnap_ts209_button_data = {
  10802. .buttons = qnap_ts209_buttons,
  10803. - .nbuttons = ARRAY_SIZE(qnap_ts209_buttons),
  10804. + .nbuttons = ARRAY_SIZE(qnap_ts209_buttons),
  10805. };
  10806. static struct platform_device qnap_ts209_button_device = {
  10807. .name = "gpio-keys",
  10808. .id = -1,
  10809. .num_resources = 0,
  10810. - .dev = { .platform_data = &qnap_ts209_button_data, },
  10811. + .dev = {
  10812. + .platform_data = &qnap_ts209_button_data,
  10813. + },
  10814. };
  10815. /*****************************************************************************
  10816. * SATA
  10817. ****************************************************************************/
  10818. static struct mv_sata_platform_data qnap_ts209_sata_data = {
  10819. - .n_ports = 2,
  10820. + .n_ports = 2,
  10821. };
  10822. /*****************************************************************************
  10823. * General Setup
  10824. ****************************************************************************/
  10825. -
  10826. -static struct platform_device *qnap_ts209_devices[] __initdata = {
  10827. - &qnap_ts209_nor_flash,
  10828. - &qnap_ts209_button_device,
  10829. +static struct orion5x_mpp_mode ts209_mpp_modes[] __initdata = {
  10830. + { 0, MPP_UNUSED },
  10831. + { 1, MPP_GPIO }, /* USB copy button */
  10832. + { 2, MPP_GPIO }, /* Load defaults button */
  10833. + { 3, MPP_GPIO }, /* GPIO RTC */
  10834. + { 4, MPP_UNUSED },
  10835. + { 5, MPP_UNUSED },
  10836. + { 6, MPP_GPIO }, /* PCI Int A */
  10837. + { 7, MPP_GPIO }, /* PCI Int B */
  10838. + { 8, MPP_UNUSED },
  10839. + { 9, MPP_UNUSED },
  10840. + { 10, MPP_UNUSED },
  10841. + { 11, MPP_UNUSED },
  10842. + { 12, MPP_SATA_LED }, /* SATA 0 presence */
  10843. + { 13, MPP_SATA_LED }, /* SATA 1 presence */
  10844. + { 14, MPP_SATA_LED }, /* SATA 0 active */
  10845. + { 15, MPP_SATA_LED }, /* SATA 1 active */
  10846. + { 16, MPP_UART }, /* UART1 RXD */
  10847. + { 17, MPP_UART }, /* UART1 TXD */
  10848. + { 18, MPP_GPIO }, /* SW_RST */
  10849. + { 19, MPP_UNUSED },
  10850. + { -1 },
  10851. };
  10852. -/*
  10853. - * QNAP TS-[12]09 specific power off method via UART1-attached PIC
  10854. - */
  10855. -
  10856. -#define UART1_REG(x) (UART1_VIRT_BASE + ((UART_##x) << 2))
  10857. -
  10858. -static void qnap_ts209_power_off(void)
  10859. -{
  10860. - /* 19200 baud divisor */
  10861. - const unsigned divisor = ((ORION5X_TCLK + (8 * 19200)) / (16 * 19200));
  10862. -
  10863. - pr_info("%s: triggering power-off...\n", __func__);
  10864. -
  10865. - /* hijack uart1 and reset into sane state (19200,8n1) */
  10866. - orion5x_write(UART1_REG(LCR), 0x83);
  10867. - orion5x_write(UART1_REG(DLL), divisor & 0xff);
  10868. - orion5x_write(UART1_REG(DLM), (divisor >> 8) & 0xff);
  10869. - orion5x_write(UART1_REG(LCR), 0x03);
  10870. - orion5x_write(UART1_REG(IER), 0x00);
  10871. - orion5x_write(UART1_REG(FCR), 0x00);
  10872. - orion5x_write(UART1_REG(MCR), 0x00);
  10873. -
  10874. - /* send the power-off command 'A' to PIC */
  10875. - orion5x_write(UART1_REG(TX), 'A');
  10876. -}
  10877. -
  10878. static void __init qnap_ts209_init(void)
  10879. {
  10880. /*
  10881. @@ -368,51 +275,33 @@
  10882. */
  10883. orion5x_init();
  10884. - /*
  10885. - * Setup flash mapping
  10886. - */
  10887. - orion5x_setup_dev_boot_win(QNAP_TS209_NOR_BOOT_BASE,
  10888. - QNAP_TS209_NOR_BOOT_SIZE);
  10889. -
  10890. - /*
  10891. - * Open a special address decode windows for the PCIe WA.
  10892. - */
  10893. - orion5x_setup_pcie_wa_win(ORION5X_PCIE_WA_PHYS_BASE,
  10894. - ORION5X_PCIE_WA_SIZE);
  10895. + orion5x_mpp_conf(ts209_mpp_modes);
  10896. /*
  10897. - * Setup Multiplexing Pins --
  10898. - * MPP[0] Reserved
  10899. - * MPP[1] USB copy button (0 active)
  10900. - * MPP[2] Load defaults button (0 active)
  10901. - * MPP[3] GPIO RTC
  10902. - * MPP[4-5] Reserved
  10903. - * MPP[6] PCI Int A
  10904. - * MPP[7] PCI Int B
  10905. - * MPP[8-11] Reserved
  10906. - * MPP[12] SATA 0 presence
  10907. - * MPP[13] SATA 1 presence
  10908. - * MPP[14] SATA 0 active
  10909. - * MPP[15] SATA 1 active
  10910. - * MPP[16] UART1 RXD
  10911. - * MPP[17] UART1 TXD
  10912. - * MPP[18] SW_RST (0 active)
  10913. - * MPP[19] Reserved
  10914. * MPP[20] PCI clock 0
  10915. * MPP[21] PCI clock 1
  10916. * MPP[22] USB 0 over current
  10917. * MPP[23-25] Reserved
  10918. */
  10919. - orion5x_write(MPP_0_7_CTRL, 0x3);
  10920. - orion5x_write(MPP_8_15_CTRL, 0x55550000);
  10921. - orion5x_write(MPP_16_19_CTRL, 0x5500);
  10922. - orion5x_gpio_set_valid_pins(0x3cc0fff);
  10923. - /* register ts209 specific power-off method */
  10924. - pm_power_off = qnap_ts209_power_off;
  10925. + /*
  10926. + * Configure peripherals.
  10927. + */
  10928. + orion5x_ehci0_init();
  10929. + orion5x_ehci1_init();
  10930. + qnap_tsx09_find_mac_addr(QNAP_TS209_NOR_BOOT_BASE +
  10931. + qnap_ts209_partitions[5].offset,
  10932. + qnap_ts209_partitions[5].size);
  10933. + orion5x_eth_init(&qnap_tsx09_eth_data);
  10934. + orion5x_i2c_init();
  10935. + orion5x_sata_init(&qnap_ts209_sata_data);
  10936. + orion5x_uart0_init();
  10937. +
  10938. + orion5x_setup_dev_boot_win(QNAP_TS209_NOR_BOOT_BASE,
  10939. + QNAP_TS209_NOR_BOOT_SIZE);
  10940. + platform_device_register(&qnap_ts209_nor_flash);
  10941. - platform_add_devices(qnap_ts209_devices,
  10942. - ARRAY_SIZE(qnap_ts209_devices));
  10943. + platform_device_register(&qnap_ts209_button_device);
  10944. /* Get RTC IRQ and register the chip */
  10945. if (gpio_request(TS209_RTC_GPIO, "rtc") == 0) {
  10946. @@ -425,14 +314,12 @@
  10947. pr_warning("qnap_ts209_init: failed to get RTC IRQ\n");
  10948. i2c_register_board_info(0, &qnap_ts209_i2c_rtc, 1);
  10949. - ts209_find_mac_addr();
  10950. - orion5x_eth_init(&qnap_ts209_eth_data);
  10951. -
  10952. - orion5x_sata_init(&qnap_ts209_sata_data);
  10953. + /* register tsx09 specific power-off method */
  10954. + pm_power_off = qnap_tsx09_power_off;
  10955. }
  10956. MACHINE_START(TS209, "QNAP TS-109/TS-209")
  10957. - /* Maintainer: Byron Bradley <[email protected]> */
  10958. + /* Maintainer: Byron Bradley <[email protected]> */
  10959. .phys_io = ORION5X_REGS_PHYS_BASE,
  10960. .io_pg_offst = ((ORION5X_REGS_VIRT_BASE) >> 18) & 0xFFFC,
  10961. .boot_params = 0x00000100,
  10962. --- /dev/null
  10963. +++ b/arch/arm/mach-orion5x/ts409-setup.c
  10964. @@ -0,0 +1,273 @@
  10965. +/*
  10966. + * QNAP TS-409 Board Setup
  10967. + *
  10968. + * Maintainer: Sylver Bruneau <[email protected]>
  10969. + *
  10970. + * This program is free software; you can redistribute it and/or
  10971. + * modify it under the terms of the GNU General Public License
  10972. + * as published by the Free Software Foundation; either version
  10973. + * 2 of the License, or (at your option) any later version.
  10974. + */
  10975. +
  10976. +#include <linux/kernel.h>
  10977. +#include <linux/init.h>
  10978. +#include <linux/platform_device.h>
  10979. +#include <linux/pci.h>
  10980. +#include <linux/irq.h>
  10981. +#include <linux/mtd/physmap.h>
  10982. +#include <linux/mv643xx_eth.h>
  10983. +#include <linux/gpio_keys.h>
  10984. +#include <linux/input.h>
  10985. +#include <linux/i2c.h>
  10986. +#include <linux/serial_reg.h>
  10987. +#include <asm/mach-types.h>
  10988. +#include <asm/gpio.h>
  10989. +#include <asm/mach/arch.h>
  10990. +#include <asm/mach/pci.h>
  10991. +#include <asm/arch/orion5x.h>
  10992. +#include "common.h"
  10993. +#include "mpp.h"
  10994. +#include "tsx09-common.h"
  10995. +
  10996. +/*****************************************************************************
  10997. + * QNAP TS-409 Info
  10998. + ****************************************************************************/
  10999. +
  11000. +/*
  11001. + * QNAP TS-409 hardware :
  11002. + * - Marvell 88F5281-D0
  11003. + * - Marvell 88SX7042 SATA controller (PCIe)
  11004. + * - Marvell 88E1118 Gigabit Ethernet PHY
  11005. + * - RTC S35390A (@0x30) on I2C bus
  11006. + * - 8MB NOR flash
  11007. + * - 256MB of DDR-2 RAM
  11008. + */
  11009. +
  11010. +/*
  11011. + * 8MB NOR flash Device bus boot chip select
  11012. + */
  11013. +
  11014. +#define QNAP_TS409_NOR_BOOT_BASE 0xff800000
  11015. +#define QNAP_TS409_NOR_BOOT_SIZE SZ_8M
  11016. +
  11017. +/****************************************************************************
  11018. + * 8MiB NOR flash. The struct mtd_partition is not in the same order as the
  11019. + * partitions on the device because we want to keep compatability with
  11020. + * existing QNAP firmware.
  11021. + *
  11022. + * Layout as used by QNAP:
  11023. + * [2] 0x00000000-0x00200000 : "Kernel"
  11024. + * [3] 0x00200000-0x00600000 : "RootFS1"
  11025. + * [4] 0x00600000-0x00700000 : "RootFS2"
  11026. + * [6] 0x00700000-0x00760000 : "NAS Config" (read-only)
  11027. + * [5] 0x00760000-0x00780000 : "U-Boot Config"
  11028. + * [1] 0x00780000-0x00800000 : "U-Boot" (read-only)
  11029. + ***************************************************************************/
  11030. +static struct mtd_partition qnap_ts409_partitions[] = {
  11031. + {
  11032. + .name = "U-Boot",
  11033. + .size = 0x00080000,
  11034. + .offset = 0x00780000,
  11035. + .mask_flags = MTD_WRITEABLE,
  11036. + }, {
  11037. + .name = "Kernel",
  11038. + .size = 0x00200000,
  11039. + .offset = 0,
  11040. + }, {
  11041. + .name = "RootFS1",
  11042. + .size = 0x00400000,
  11043. + .offset = 0x00200000,
  11044. + }, {
  11045. + .name = "RootFS2",
  11046. + .size = 0x00100000,
  11047. + .offset = 0x00600000,
  11048. + }, {
  11049. + .name = "U-Boot Config",
  11050. + .size = 0x00020000,
  11051. + .offset = 0x00760000,
  11052. + }, {
  11053. + .name = "NAS Config",
  11054. + .size = 0x00060000,
  11055. + .offset = 0x00700000,
  11056. + .mask_flags = MTD_WRITEABLE,
  11057. + },
  11058. +};
  11059. +
  11060. +static struct physmap_flash_data qnap_ts409_nor_flash_data = {
  11061. + .width = 1,
  11062. + .parts = qnap_ts409_partitions,
  11063. + .nr_parts = ARRAY_SIZE(qnap_ts409_partitions)
  11064. +};
  11065. +
  11066. +static struct resource qnap_ts409_nor_flash_resource = {
  11067. + .flags = IORESOURCE_MEM,
  11068. + .start = QNAP_TS409_NOR_BOOT_BASE,
  11069. + .end = QNAP_TS409_NOR_BOOT_BASE + QNAP_TS409_NOR_BOOT_SIZE - 1,
  11070. +};
  11071. +
  11072. +static struct platform_device qnap_ts409_nor_flash = {
  11073. + .name = "physmap-flash",
  11074. + .id = 0,
  11075. + .dev = { .platform_data = &qnap_ts409_nor_flash_data, },
  11076. + .num_resources = 1,
  11077. + .resource = &qnap_ts409_nor_flash_resource,
  11078. +};
  11079. +
  11080. +/*****************************************************************************
  11081. + * PCI
  11082. + ****************************************************************************/
  11083. +
  11084. +static int __init qnap_ts409_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
  11085. +{
  11086. + int irq;
  11087. +
  11088. + /*
  11089. + * Check for devices with hard-wired IRQs.
  11090. + */
  11091. + irq = orion5x_pci_map_irq(dev, slot, pin);
  11092. + if (irq != -1)
  11093. + return irq;
  11094. +
  11095. + /*
  11096. + * PCI isn't used on the TS-409
  11097. + */
  11098. + return -1;
  11099. +}
  11100. +
  11101. +static struct hw_pci qnap_ts409_pci __initdata = {
  11102. + .nr_controllers = 2,
  11103. + .swizzle = pci_std_swizzle,
  11104. + .setup = orion5x_pci_sys_setup,
  11105. + .scan = orion5x_pci_sys_scan_bus,
  11106. + .map_irq = qnap_ts409_pci_map_irq,
  11107. +};
  11108. +
  11109. +static int __init qnap_ts409_pci_init(void)
  11110. +{
  11111. + if (machine_is_ts409())
  11112. + pci_common_init(&qnap_ts409_pci);
  11113. +
  11114. + return 0;
  11115. +}
  11116. +
  11117. +subsys_initcall(qnap_ts409_pci_init);
  11118. +
  11119. +/*****************************************************************************
  11120. + * RTC S35390A on I2C bus
  11121. + ****************************************************************************/
  11122. +
  11123. +#define TS409_RTC_GPIO 10
  11124. +
  11125. +static struct i2c_board_info __initdata qnap_ts409_i2c_rtc = {
  11126. + I2C_BOARD_INFO("s35390a", 0x30),
  11127. +};
  11128. +
  11129. +/****************************************************************************
  11130. + * GPIO Attached Keys
  11131. + * Power button is attached to the PIC microcontroller
  11132. + ****************************************************************************/
  11133. +
  11134. +#define QNAP_TS409_GPIO_KEY_MEDIA 15
  11135. +
  11136. +static struct gpio_keys_button qnap_ts409_buttons[] = {
  11137. + {
  11138. + .code = KEY_RESTART,
  11139. + .gpio = QNAP_TS409_GPIO_KEY_MEDIA,
  11140. + .desc = "USB Copy Button",
  11141. + .active_low = 1,
  11142. + },
  11143. +};
  11144. +
  11145. +static struct gpio_keys_platform_data qnap_ts409_button_data = {
  11146. + .buttons = qnap_ts409_buttons,
  11147. + .nbuttons = ARRAY_SIZE(qnap_ts409_buttons),
  11148. +};
  11149. +
  11150. +static struct platform_device qnap_ts409_button_device = {
  11151. + .name = "gpio-keys",
  11152. + .id = -1,
  11153. + .num_resources = 0,
  11154. + .dev = {
  11155. + .platform_data = &qnap_ts409_button_data,
  11156. + },
  11157. +};
  11158. +
  11159. +/*****************************************************************************
  11160. + * General Setup
  11161. + ****************************************************************************/
  11162. +static struct orion5x_mpp_mode ts409_mpp_modes[] __initdata = {
  11163. + { 0, MPP_UNUSED },
  11164. + { 1, MPP_UNUSED },
  11165. + { 2, MPP_UNUSED },
  11166. + { 3, MPP_UNUSED },
  11167. + { 4, MPP_GPIO }, /* HDD 1 status */
  11168. + { 5, MPP_GPIO }, /* HDD 2 status */
  11169. + { 6, MPP_GPIO }, /* HDD 3 status */
  11170. + { 7, MPP_GPIO }, /* HDD 4 status */
  11171. + { 8, MPP_UNUSED },
  11172. + { 9, MPP_UNUSED },
  11173. + { 10, MPP_GPIO }, /* RTC int */
  11174. + { 11, MPP_UNUSED },
  11175. + { 12, MPP_UNUSED },
  11176. + { 13, MPP_UNUSED },
  11177. + { 14, MPP_GPIO }, /* SW_RST */
  11178. + { 15, MPP_GPIO }, /* USB copy button */
  11179. + { 16, MPP_UART }, /* UART1 RXD */
  11180. + { 17, MPP_UART }, /* UART1 TXD */
  11181. + { 18, MPP_UNUSED },
  11182. + { 19, MPP_UNUSED },
  11183. + { -1 },
  11184. +};
  11185. +
  11186. +static void __init qnap_ts409_init(void)
  11187. +{
  11188. + /*
  11189. + * Setup basic Orion functions. Need to be called early.
  11190. + */
  11191. + orion5x_init();
  11192. +
  11193. + orion5x_mpp_conf(ts409_mpp_modes);
  11194. +
  11195. + /*
  11196. + * Configure peripherals.
  11197. + */
  11198. + orion5x_ehci0_init();
  11199. + qnap_tsx09_find_mac_addr(QNAP_TS409_NOR_BOOT_BASE +
  11200. + qnap_ts409_partitions[5].offset,
  11201. + qnap_ts409_partitions[5].size);
  11202. + orion5x_eth_init(&qnap_tsx09_eth_data);
  11203. + orion5x_i2c_init();
  11204. + orion5x_uart0_init();
  11205. +
  11206. + orion5x_setup_dev_boot_win(QNAP_TS409_NOR_BOOT_BASE,
  11207. + QNAP_TS409_NOR_BOOT_SIZE);
  11208. + platform_device_register(&qnap_ts409_nor_flash);
  11209. +
  11210. + platform_device_register(&qnap_ts409_button_device);
  11211. +
  11212. + /* Get RTC IRQ and register the chip */
  11213. + if (gpio_request(TS409_RTC_GPIO, "rtc") == 0) {
  11214. + if (gpio_direction_input(TS409_RTC_GPIO) == 0)
  11215. + qnap_ts409_i2c_rtc.irq = gpio_to_irq(TS409_RTC_GPIO);
  11216. + else
  11217. + gpio_free(TS409_RTC_GPIO);
  11218. + }
  11219. + if (qnap_ts409_i2c_rtc.irq == 0)
  11220. + pr_warning("qnap_ts409_init: failed to get RTC IRQ\n");
  11221. + i2c_register_board_info(0, &qnap_ts409_i2c_rtc, 1);
  11222. +
  11223. + /* register tsx09 specific power-off method */
  11224. + pm_power_off = qnap_tsx09_power_off;
  11225. +}
  11226. +
  11227. +MACHINE_START(TS409, "QNAP TS-409")
  11228. + /* Maintainer: Sylver Bruneau <[email protected]> */
  11229. + .phys_io = ORION5X_REGS_PHYS_BASE,
  11230. + .io_pg_offst = ((ORION5X_REGS_VIRT_BASE) >> 18) & 0xFFFC,
  11231. + .boot_params = 0x00000100,
  11232. + .init_machine = qnap_ts409_init,
  11233. + .map_io = orion5x_map_io,
  11234. + .init_irq = orion5x_init_irq,
  11235. + .timer = &orion5x_timer,
  11236. + .fixup = tag_fixup_mem32,
  11237. +MACHINE_END
  11238. --- /dev/null
  11239. +++ b/arch/arm/mach-orion5x/ts78xx-setup.c
  11240. @@ -0,0 +1,277 @@
  11241. +/*
  11242. + * arch/arm/mach-orion5x/ts78xx-setup.c
  11243. + *
  11244. + * Maintainer: Alexander Clouter <[email protected]>
  11245. + *
  11246. + * This file is licensed under the terms of the GNU General Public
  11247. + * License version 2. This program is licensed "as is" without any
  11248. + * warranty of any kind, whether express or implied.
  11249. + */
  11250. +
  11251. +#include <linux/kernel.h>
  11252. +#include <linux/init.h>
  11253. +#include <linux/platform_device.h>
  11254. +#include <linux/mtd/physmap.h>
  11255. +#include <linux/mv643xx_eth.h>
  11256. +#include <linux/ata_platform.h>
  11257. +#include <linux/m48t86.h>
  11258. +#include <asm/mach-types.h>
  11259. +#include <asm/mach/arch.h>
  11260. +#include <asm/mach/map.h>
  11261. +#include <asm/arch/orion5x.h>
  11262. +#include "common.h"
  11263. +#include "mpp.h"
  11264. +
  11265. +/*****************************************************************************
  11266. + * TS-78xx Info
  11267. + ****************************************************************************/
  11268. +
  11269. +/*
  11270. + * FPGA - lives where the PCI bus would be at ORION5X_PCI_MEM_PHYS_BASE
  11271. + */
  11272. +#define TS78XX_FPGA_REGS_PHYS_BASE 0xe8000000
  11273. +#define TS78XX_FPGA_REGS_VIRT_BASE 0xff900000
  11274. +#define TS78XX_FPGA_REGS_SIZE SZ_1M
  11275. +
  11276. +#define TS78XX_FPGA_REGS_SYSCON_ID (TS78XX_FPGA_REGS_VIRT_BASE | 0x000)
  11277. +#define TS78XX_FPGA_REGS_SYSCON_LCDI (TS78XX_FPGA_REGS_VIRT_BASE | 0x004)
  11278. +#define TS78XX_FPGA_REGS_SYSCON_LCDO (TS78XX_FPGA_REGS_VIRT_BASE | 0x008)
  11279. +
  11280. +#define TS78XX_FPGA_REGS_RTC_CTRL (TS78XX_FPGA_REGS_VIRT_BASE | 0x808)
  11281. +#define TS78XX_FPGA_REGS_RTC_DATA (TS78XX_FPGA_REGS_VIRT_BASE | 0x80c)
  11282. +
  11283. +/*
  11284. + * 512kB NOR flash Device
  11285. + */
  11286. +#define TS78XX_NOR_BOOT_BASE 0xff800000
  11287. +#define TS78XX_NOR_BOOT_SIZE SZ_512K
  11288. +
  11289. +/*****************************************************************************
  11290. + * I/O Address Mapping
  11291. + ****************************************************************************/
  11292. +static struct map_desc ts78xx_io_desc[] __initdata = {
  11293. + {
  11294. + .virtual = TS78XX_FPGA_REGS_VIRT_BASE,
  11295. + .pfn = __phys_to_pfn(TS78XX_FPGA_REGS_PHYS_BASE),
  11296. + .length = TS78XX_FPGA_REGS_SIZE,
  11297. + .type = MT_DEVICE,
  11298. + },
  11299. +};
  11300. +
  11301. +void __init ts78xx_map_io(void)
  11302. +{
  11303. + orion5x_map_io();
  11304. + iotable_init(ts78xx_io_desc, ARRAY_SIZE(ts78xx_io_desc));
  11305. +}
  11306. +
  11307. +/*****************************************************************************
  11308. + * 512kB NOR Boot Flash - the chip is a M25P40
  11309. + ****************************************************************************/
  11310. +static struct mtd_partition ts78xx_nor_boot_flash_resources[] = {
  11311. + {
  11312. + .name = "ts-bootrom",
  11313. + .offset = 0,
  11314. + /* only the first 256kB is used */
  11315. + .size = SZ_256K,
  11316. + .mask_flags = MTD_WRITEABLE,
  11317. + },
  11318. +};
  11319. +
  11320. +static struct physmap_flash_data ts78xx_nor_boot_flash_data = {
  11321. + .width = 1,
  11322. + .parts = ts78xx_nor_boot_flash_resources,
  11323. + .nr_parts = ARRAY_SIZE(ts78xx_nor_boot_flash_resources),
  11324. +};
  11325. +
  11326. +static struct resource ts78xx_nor_boot_flash_resource = {
  11327. + .flags = IORESOURCE_MEM,
  11328. + .start = TS78XX_NOR_BOOT_BASE,
  11329. + .end = TS78XX_NOR_BOOT_BASE + TS78XX_NOR_BOOT_SIZE - 1,
  11330. +};
  11331. +
  11332. +static struct platform_device ts78xx_nor_boot_flash = {
  11333. + .name = "physmap-flash",
  11334. + .id = -1,
  11335. + .dev = {
  11336. + .platform_data = &ts78xx_nor_boot_flash_data,
  11337. + },
  11338. + .num_resources = 1,
  11339. + .resource = &ts78xx_nor_boot_flash_resource,
  11340. +};
  11341. +
  11342. +/*****************************************************************************
  11343. + * Ethernet
  11344. + ****************************************************************************/
  11345. +static struct mv643xx_eth_platform_data ts78xx_eth_data = {
  11346. + .phy_addr = 0,
  11347. + .force_phy_addr = 1,
  11348. +};
  11349. +
  11350. +/*****************************************************************************
  11351. + * RTC M48T86 - nicked^Wborrowed from arch/arm/mach-ep93xx/ts72xx.c
  11352. + ****************************************************************************/
  11353. +#ifdef CONFIG_RTC_DRV_M48T86
  11354. +static unsigned char ts78xx_rtc_readbyte(unsigned long addr)
  11355. +{
  11356. + writeb(addr, TS78XX_FPGA_REGS_RTC_CTRL);
  11357. + return readb(TS78XX_FPGA_REGS_RTC_DATA);
  11358. +}
  11359. +
  11360. +static void ts78xx_rtc_writebyte(unsigned char value, unsigned long addr)
  11361. +{
  11362. + writeb(addr, TS78XX_FPGA_REGS_RTC_CTRL);
  11363. + writeb(value, TS78XX_FPGA_REGS_RTC_DATA);
  11364. +}
  11365. +
  11366. +static struct m48t86_ops ts78xx_rtc_ops = {
  11367. + .readbyte = ts78xx_rtc_readbyte,
  11368. + .writebyte = ts78xx_rtc_writebyte,
  11369. +};
  11370. +
  11371. +static struct platform_device ts78xx_rtc_device = {
  11372. + .name = "rtc-m48t86",
  11373. + .id = -1,
  11374. + .dev = {
  11375. + .platform_data = &ts78xx_rtc_ops,
  11376. + },
  11377. + .num_resources = 0,
  11378. +};
  11379. +
  11380. +/*
  11381. + * TS uses some of the user storage space on the RTC chip so see if it is
  11382. + * present; as it's an optional feature at purchase time and not all boards
  11383. + * will have it present
  11384. + *
  11385. + * I've used the method TS use in their rtc7800.c example for the detection
  11386. + *
  11387. + * TODO: track down a guinea pig without an RTC to see if we can work out a
  11388. + * better RTC detection routine
  11389. + */
  11390. +static int __init ts78xx_rtc_init(void)
  11391. +{
  11392. + unsigned char tmp_rtc0, tmp_rtc1;
  11393. +
  11394. + tmp_rtc0 = ts78xx_rtc_readbyte(126);
  11395. + tmp_rtc1 = ts78xx_rtc_readbyte(127);
  11396. +
  11397. + ts78xx_rtc_writebyte(0x00, 126);
  11398. + ts78xx_rtc_writebyte(0x55, 127);
  11399. + if (ts78xx_rtc_readbyte(127) == 0x55) {
  11400. + ts78xx_rtc_writebyte(0xaa, 127);
  11401. + if (ts78xx_rtc_readbyte(127) == 0xaa
  11402. + && ts78xx_rtc_readbyte(126) == 0x00) {
  11403. + ts78xx_rtc_writebyte(tmp_rtc0, 126);
  11404. + ts78xx_rtc_writebyte(tmp_rtc1, 127);
  11405. + platform_device_register(&ts78xx_rtc_device);
  11406. + return 1;
  11407. + }
  11408. + }
  11409. +
  11410. + return 0;
  11411. +};
  11412. +#else
  11413. +static int __init ts78xx_rtc_init(void)
  11414. +{
  11415. + return 0;
  11416. +}
  11417. +#endif
  11418. +
  11419. +/*****************************************************************************
  11420. + * SATA
  11421. + ****************************************************************************/
  11422. +static struct mv_sata_platform_data ts78xx_sata_data = {
  11423. + .n_ports = 2,
  11424. +};
  11425. +
  11426. +/*****************************************************************************
  11427. + * print some information regarding the board
  11428. + ****************************************************************************/
  11429. +static void __init ts78xx_print_board_id(void)
  11430. +{
  11431. + unsigned int board_info;
  11432. +
  11433. + board_info = readl(TS78XX_FPGA_REGS_SYSCON_ID);
  11434. + printk(KERN_INFO "TS-78xx Info: FPGA rev=%.2x, Board Magic=%.6x, ",
  11435. + board_info & 0xff,
  11436. + (board_info >> 8) & 0xffffff);
  11437. + board_info = readl(TS78XX_FPGA_REGS_SYSCON_LCDI);
  11438. + printk("JP1=%d, JP2=%d\n",
  11439. + (board_info >> 30) & 0x1,
  11440. + (board_info >> 31) & 0x1);
  11441. +};
  11442. +
  11443. +/*****************************************************************************
  11444. + * General Setup
  11445. + ****************************************************************************/
  11446. +static struct orion5x_mpp_mode ts78xx_mpp_modes[] __initdata = {
  11447. + { 0, MPP_UNUSED },
  11448. + { 1, MPP_GPIO }, /* JTAG Clock */
  11449. + { 2, MPP_GPIO }, /* JTAG Data In */
  11450. + { 3, MPP_GPIO }, /* Lat ECP2 256 FPGA - PB2B */
  11451. + { 4, MPP_GPIO }, /* JTAG Data Out */
  11452. + { 5, MPP_GPIO }, /* JTAG TMS */
  11453. + { 6, MPP_GPIO }, /* Lat ECP2 256 FPGA - PB31A_CLK4+ */
  11454. + { 7, MPP_GPIO }, /* Lat ECP2 256 FPGA - PB22B */
  11455. + { 8, MPP_UNUSED },
  11456. + { 9, MPP_UNUSED },
  11457. + { 10, MPP_UNUSED },
  11458. + { 11, MPP_UNUSED },
  11459. + { 12, MPP_UNUSED },
  11460. + { 13, MPP_UNUSED },
  11461. + { 14, MPP_UNUSED },
  11462. + { 15, MPP_UNUSED },
  11463. + { 16, MPP_UART },
  11464. + { 17, MPP_UART },
  11465. + { 18, MPP_UART },
  11466. + { 19, MPP_UART },
  11467. + { -1 },
  11468. +};
  11469. +
  11470. +static void __init ts78xx_init(void)
  11471. +{
  11472. + /*
  11473. + * Setup basic Orion functions. Need to be called early.
  11474. + */
  11475. + orion5x_init();
  11476. +
  11477. + ts78xx_print_board_id();
  11478. +
  11479. + orion5x_mpp_conf(ts78xx_mpp_modes);
  11480. +
  11481. + /*
  11482. + * MPP[20] PCI Clock Out 1
  11483. + * MPP[21] PCI Clock Out 0
  11484. + * MPP[22] Unused
  11485. + * MPP[23] Unused
  11486. + * MPP[24] Unused
  11487. + * MPP[25] Unused
  11488. + */
  11489. +
  11490. + /*
  11491. + * Configure peripherals.
  11492. + */
  11493. + orion5x_ehci0_init();
  11494. + orion5x_ehci1_init();
  11495. + orion5x_eth_init(&ts78xx_eth_data);
  11496. + orion5x_sata_init(&ts78xx_sata_data);
  11497. + orion5x_uart0_init();
  11498. + orion5x_uart1_init();
  11499. +
  11500. + orion5x_setup_dev_boot_win(TS78XX_NOR_BOOT_BASE,
  11501. + TS78XX_NOR_BOOT_SIZE);
  11502. + platform_device_register(&ts78xx_nor_boot_flash);
  11503. +
  11504. + if (!ts78xx_rtc_init())
  11505. + printk(KERN_INFO "TS-78xx RTC not detected or enabled\n");
  11506. +}
  11507. +
  11508. +MACHINE_START(TS78XX, "Technologic Systems TS-78xx SBC")
  11509. + /* Maintainer: Alexander Clouter <[email protected]> */
  11510. + .phys_io = ORION5X_REGS_PHYS_BASE,
  11511. + .io_pg_offst = ((ORION5X_REGS_VIRT_BASE) >> 18) & 0xFFFC,
  11512. + .boot_params = 0x00000100,
  11513. + .init_machine = ts78xx_init,
  11514. + .map_io = ts78xx_map_io,
  11515. + .init_irq = orion5x_init_irq,
  11516. + .timer = &orion5x_timer,
  11517. +MACHINE_END
  11518. --- /dev/null
  11519. +++ b/arch/arm/mach-orion5x/tsx09-common.c
  11520. @@ -0,0 +1,132 @@
  11521. +/*
  11522. + * QNAP TS-x09 Boards common functions
  11523. + *
  11524. + * Maintainers: Lennert Buytenhek <[email protected]>
  11525. + * Byron Bradley <[email protected]>
  11526. + *
  11527. + * This program is free software; you can redistribute it and/or
  11528. + * modify it under the terms of the GNU General Public License
  11529. + * as published by the Free Software Foundation; either version
  11530. + * 2 of the License, or (at your option) any later version.
  11531. + */
  11532. +
  11533. +#include <linux/kernel.h>
  11534. +#include <linux/pci.h>
  11535. +#include <linux/mv643xx_eth.h>
  11536. +#include <linux/serial_reg.h>
  11537. +#include "tsx09-common.h"
  11538. +
  11539. +/*****************************************************************************
  11540. + * QNAP TS-x09 specific power off method via UART1-attached PIC
  11541. + ****************************************************************************/
  11542. +
  11543. +#define UART1_REG(x) (UART1_VIRT_BASE + ((UART_##x) << 2))
  11544. +
  11545. +void qnap_tsx09_power_off(void)
  11546. +{
  11547. + /* 19200 baud divisor */
  11548. + const unsigned divisor = ((ORION5X_TCLK + (8 * 19200)) / (16 * 19200));
  11549. +
  11550. + pr_info("%s: triggering power-off...\n", __func__);
  11551. +
  11552. + /* hijack uart1 and reset into sane state (19200,8n1) */
  11553. + writel(0x83, UART1_REG(LCR));
  11554. + writel(divisor & 0xff, UART1_REG(DLL));
  11555. + writel((divisor >> 8) & 0xff, UART1_REG(DLM));
  11556. + writel(0x03, UART1_REG(LCR));
  11557. + writel(0x00, UART1_REG(IER));
  11558. + writel(0x00, UART1_REG(FCR));
  11559. + writel(0x00, UART1_REG(MCR));
  11560. +
  11561. + /* send the power-off command 'A' to PIC */
  11562. + writel('A', UART1_REG(TX));
  11563. +}
  11564. +
  11565. +/*****************************************************************************
  11566. + * Ethernet
  11567. + ****************************************************************************/
  11568. +
  11569. +struct mv643xx_eth_platform_data qnap_tsx09_eth_data = {
  11570. + .phy_addr = 8,
  11571. +};
  11572. +
  11573. +static int __init qnap_tsx09_parse_hex_nibble(char n)
  11574. +{
  11575. + if (n >= '0' && n <= '9')
  11576. + return n - '0';
  11577. +
  11578. + if (n >= 'A' && n <= 'F')
  11579. + return n - 'A' + 10;
  11580. +
  11581. + if (n >= 'a' && n <= 'f')
  11582. + return n - 'a' + 10;
  11583. +
  11584. + return -1;
  11585. +}
  11586. +
  11587. +static int __init qnap_tsx09_parse_hex_byte(const char *b)
  11588. +{
  11589. + int hi;
  11590. + int lo;
  11591. +
  11592. + hi = qnap_tsx09_parse_hex_nibble(b[0]);
  11593. + lo = qnap_tsx09_parse_hex_nibble(b[1]);
  11594. +
  11595. + if (hi < 0 || lo < 0)
  11596. + return -1;
  11597. +
  11598. + return (hi << 4) | lo;
  11599. +}
  11600. +
  11601. +static int __init qnap_tsx09_check_mac_addr(const char *addr_str)
  11602. +{
  11603. + u_int8_t addr[6];
  11604. + int i;
  11605. +
  11606. + for (i = 0; i < 6; i++) {
  11607. + int byte;
  11608. +
  11609. + /*
  11610. + * Enforce "xx:xx:xx:xx:xx:xx\n" format.
  11611. + */
  11612. + if (addr_str[(i * 3) + 2] != ((i < 5) ? ':' : '\n'))
  11613. + return -1;
  11614. +
  11615. + byte = qnap_tsx09_parse_hex_byte(addr_str + (i * 3));
  11616. + if (byte < 0)
  11617. + return -1;
  11618. + addr[i] = byte;
  11619. + }
  11620. +
  11621. + printk(KERN_INFO "tsx09: found ethernet mac address ");
  11622. + for (i = 0; i < 6; i++)
  11623. + printk("%.2x%s", addr[i], (i < 5) ? ":" : ".\n");
  11624. +
  11625. + memcpy(qnap_tsx09_eth_data.mac_addr, addr, 6);
  11626. +
  11627. + return 0;
  11628. +}
  11629. +
  11630. +/*
  11631. + * The 'NAS Config' flash partition has an ext2 filesystem which
  11632. + * contains a file that has the ethernet MAC address in plain text
  11633. + * (format "xx:xx:xx:xx:xx:xx\n").
  11634. + */
  11635. +void __init qnap_tsx09_find_mac_addr(u32 mem_base, u32 size)
  11636. +{
  11637. + unsigned long addr;
  11638. +
  11639. + for (addr = mem_base; addr < (mem_base + size); addr += 1024) {
  11640. + char *nor_page;
  11641. + int ret = 0;
  11642. +
  11643. + nor_page = ioremap(addr, 1024);
  11644. + if (nor_page != NULL) {
  11645. + ret = qnap_tsx09_check_mac_addr(nor_page);
  11646. + iounmap(nor_page);
  11647. + }
  11648. +
  11649. + if (ret == 0)
  11650. + break;
  11651. + }
  11652. +}
  11653. --- /dev/null
  11654. +++ b/arch/arm/mach-orion5x/tsx09-common.h
  11655. @@ -0,0 +1,20 @@
  11656. +#ifndef __ARCH_ORION5X_TSX09_COMMON_H
  11657. +#define __ARCH_ORION5X_TSX09_COMMON_H
  11658. +
  11659. +/*
  11660. + * QNAP TS-x09 Boards power-off function
  11661. + */
  11662. +extern void qnap_tsx09_power_off(void);
  11663. +
  11664. +/*
  11665. + * QNAP TS-x09 Boards function to find Ethernet MAC address in flash memory
  11666. + */
  11667. +extern void __init qnap_tsx09_find_mac_addr(u32 mem_base, u32 size);
  11668. +
  11669. +/*
  11670. + * QNAP TS-x09 Boards ethernet declaration
  11671. + */
  11672. +extern struct mv643xx_eth_platform_data qnap_tsx09_eth_data;
  11673. +
  11674. +
  11675. +#endif
  11676. --- /dev/null
  11677. +++ b/arch/arm/mach-orion5x/wrt350n-v2-setup.c
  11678. @@ -0,0 +1,173 @@
  11679. +/*
  11680. + * arch/arm/mach-orion5x/wrt350n-v2-setup.c
  11681. + *
  11682. + * This file is licensed under the terms of the GNU General Public
  11683. + * License version 2. This program is licensed "as is" without any
  11684. + * warranty of any kind, whether express or implied.
  11685. + */
  11686. +
  11687. +#include <linux/kernel.h>
  11688. +#include <linux/init.h>
  11689. +#include <linux/platform_device.h>
  11690. +#include <linux/pci.h>
  11691. +#include <linux/irq.h>
  11692. +#include <linux/delay.h>
  11693. +#include <linux/mtd/physmap.h>
  11694. +#include <linux/mv643xx_eth.h>
  11695. +#include <asm/mach-types.h>
  11696. +#include <asm/gpio.h>
  11697. +#include <asm/mach/arch.h>
  11698. +#include <asm/mach/pci.h>
  11699. +#include <asm/arch/orion5x.h>
  11700. +#include "common.h"
  11701. +#include "mpp.h"
  11702. +
  11703. +static struct orion5x_mpp_mode wrt350n_v2_mpp_modes[] __initdata = {
  11704. + { 0, MPP_GPIO }, /* Power LED green (0=on) */
  11705. + { 1, MPP_GPIO }, /* Security LED (0=on) */
  11706. + { 2, MPP_GPIO }, /* Internal Button (0=on) */
  11707. + { 3, MPP_GPIO }, /* Reset Button (0=on) */
  11708. + { 4, MPP_GPIO }, /* PCI int */
  11709. + { 5, MPP_GPIO }, /* Power LED orange (0=on) */
  11710. + { 6, MPP_GPIO }, /* USB LED (0=on) */
  11711. + { 7, MPP_GPIO }, /* Wireless LED (0=on) */
  11712. + { 8, MPP_UNUSED }, /* ??? */
  11713. + { 9, MPP_GIGE }, /* GE_RXERR */
  11714. + { 10, MPP_UNUSED }, /* ??? */
  11715. + { 11, MPP_UNUSED }, /* ??? */
  11716. + { 12, MPP_GIGE }, /* GE_TXD[4] */
  11717. + { 13, MPP_GIGE }, /* GE_TXD[5] */
  11718. + { 14, MPP_GIGE }, /* GE_TXD[6] */
  11719. + { 15, MPP_GIGE }, /* GE_TXD[7] */
  11720. + { 16, MPP_GIGE }, /* GE_RXD[4] */
  11721. + { 17, MPP_GIGE }, /* GE_RXD[5] */
  11722. + { 18, MPP_GIGE }, /* GE_RXD[6] */
  11723. + { 19, MPP_GIGE }, /* GE_RXD[7] */
  11724. + { -1 },
  11725. +};
  11726. +
  11727. +/*
  11728. + * 8M NOR flash Device bus boot chip select
  11729. + */
  11730. +#define WRT350N_V2_NOR_BOOT_BASE 0xf4000000
  11731. +#define WRT350N_V2_NOR_BOOT_SIZE SZ_8M
  11732. +
  11733. +static struct mtd_partition wrt350n_v2_nor_flash_partitions[] = {
  11734. + {
  11735. + .name = "kernel",
  11736. + .offset = 0x00000000,
  11737. + .size = 0x00760000,
  11738. + }, {
  11739. + .name = "rootfs",
  11740. + .offset = 0x001a0000,
  11741. + .size = 0x005c0000,
  11742. + }, {
  11743. + .name = "lang",
  11744. + .offset = 0x00760000,
  11745. + .size = 0x00040000,
  11746. + }, {
  11747. + .name = "nvram",
  11748. + .offset = 0x007a0000,
  11749. + .size = 0x00020000,
  11750. + }, {
  11751. + .name = "u-boot",
  11752. + .offset = 0x007c0000,
  11753. + .size = 0x00040000,
  11754. + },
  11755. +};
  11756. +
  11757. +static struct physmap_flash_data wrt350n_v2_nor_flash_data = {
  11758. + .width = 1,
  11759. + .parts = wrt350n_v2_nor_flash_partitions,
  11760. + .nr_parts = ARRAY_SIZE(wrt350n_v2_nor_flash_partitions),
  11761. +};
  11762. +
  11763. +static struct resource wrt350n_v2_nor_flash_resource = {
  11764. + .flags = IORESOURCE_MEM,
  11765. + .start = WRT350N_V2_NOR_BOOT_BASE,
  11766. + .end = WRT350N_V2_NOR_BOOT_BASE + WRT350N_V2_NOR_BOOT_SIZE - 1,
  11767. +};
  11768. +
  11769. +static struct platform_device wrt350n_v2_nor_flash = {
  11770. + .name = "physmap-flash",
  11771. + .id = 0,
  11772. + .dev = {
  11773. + .platform_data = &wrt350n_v2_nor_flash_data,
  11774. + },
  11775. + .num_resources = 1,
  11776. + .resource = &wrt350n_v2_nor_flash_resource,
  11777. +};
  11778. +
  11779. +static struct mv643xx_eth_platform_data wrt350n_v2_eth_data = {
  11780. + .phy_addr = -1,
  11781. +};
  11782. +
  11783. +static void __init wrt350n_v2_init(void)
  11784. +{
  11785. + /*
  11786. + * Setup basic Orion functions. Need to be called early.
  11787. + */
  11788. + orion5x_init();
  11789. +
  11790. + orion5x_mpp_conf(wrt350n_v2_mpp_modes);
  11791. +
  11792. + /*
  11793. + * Configure peripherals.
  11794. + */
  11795. + orion5x_ehci0_init();
  11796. + orion5x_eth_init(&wrt350n_v2_eth_data);
  11797. + orion5x_uart0_init();
  11798. +
  11799. + orion5x_setup_dev_boot_win(WRT350N_V2_NOR_BOOT_BASE,
  11800. + WRT350N_V2_NOR_BOOT_SIZE);
  11801. + platform_device_register(&wrt350n_v2_nor_flash);
  11802. +}
  11803. +
  11804. +static int __init wrt350n_v2_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
  11805. +{
  11806. + int irq;
  11807. +
  11808. + /*
  11809. + * Check for devices with hard-wired IRQs.
  11810. + */
  11811. + irq = orion5x_pci_map_irq(dev, slot, pin);
  11812. + if (irq != -1)
  11813. + return irq;
  11814. +
  11815. + /*
  11816. + * Mini-PCI slot.
  11817. + */
  11818. + if (slot == 7)
  11819. + return gpio_to_irq(4);
  11820. +
  11821. + return -1;
  11822. +}
  11823. +
  11824. +static struct hw_pci wrt350n_v2_pci __initdata = {
  11825. + .nr_controllers = 2,
  11826. + .swizzle = pci_std_swizzle,
  11827. + .setup = orion5x_pci_sys_setup,
  11828. + .scan = orion5x_pci_sys_scan_bus,
  11829. + .map_irq = wrt350n_v2_pci_map_irq,
  11830. +};
  11831. +
  11832. +static int __init wrt350n_v2_pci_init(void)
  11833. +{
  11834. + if (machine_is_wrt350n_v2())
  11835. + pci_common_init(&wrt350n_v2_pci);
  11836. +
  11837. + return 0;
  11838. +}
  11839. +subsys_initcall(wrt350n_v2_pci_init);
  11840. +
  11841. +MACHINE_START(WRT350N_V2, "Linksys WRT350N v2")
  11842. + /* Maintainer: Lennert Buytenhek <[email protected]> */
  11843. + .phys_io = ORION5X_REGS_PHYS_BASE,
  11844. + .io_pg_offst = ((ORION5X_REGS_VIRT_BASE) >> 18) & 0xFFFC,
  11845. + .boot_params = 0x00000100,
  11846. + .init_machine = wrt350n_v2_init,
  11847. + .map_io = orion5x_map_io,
  11848. + .init_irq = orion5x_init_irq,
  11849. + .timer = &orion5x_timer,
  11850. + .fixup = tag_fixup_mem32,
  11851. +MACHINE_END
  11852. --- a/arch/arm/mm/Kconfig
  11853. +++ b/arch/arm/mm/Kconfig
  11854. @@ -365,7 +365,7 @@
  11855. # Feroceon
  11856. config CPU_FEROCEON
  11857. bool
  11858. - depends on ARCH_ORION5X
  11859. + depends on ARCH_ORION5X || ARCH_LOKI || ARCH_KIRKWOOD || ARCH_MV78XX0
  11860. default y
  11861. select CPU_32v5
  11862. select CPU_ABRT_EV5T
  11863. @@ -373,7 +373,7 @@
  11864. select CPU_CACHE_VIVT
  11865. select CPU_CP15_MMU
  11866. select CPU_COPY_FEROCEON if MMU
  11867. - select CPU_TLB_V4WBI if MMU
  11868. + select CPU_TLB_FEROCEON if MMU
  11869. config CPU_FEROCEON_OLD_ID
  11870. bool "Accept early Feroceon cores with an ARM926 ID"
  11871. @@ -551,6 +551,11 @@
  11872. ARM Architecture Version 4 TLB with writeback cache and invalidate
  11873. instruction cache entry.
  11874. +config CPU_TLB_FEROCEON
  11875. + bool
  11876. + help
  11877. + Feroceon TLB (v4wbi with non-outer-cachable page table walks).
  11878. +
  11879. config CPU_TLB_V6
  11880. bool
  11881. @@ -709,6 +714,14 @@
  11882. bool
  11883. default n
  11884. +config CACHE_FEROCEON_L2
  11885. + bool "Enable the Feroceon L2 cache controller"
  11886. + depends on ARCH_KIRKWOOD || ARCH_MV78XX0
  11887. + default y
  11888. + select OUTER_CACHE
  11889. + help
  11890. + This option enables the Feroceon L2 cache controller.
  11891. +
  11892. config CACHE_L2X0
  11893. bool "Enable the L2x0 outer cache controller"
  11894. depends on REALVIEW_EB_ARM11MP || MACH_REALVIEW_PB11MP || MACH_REALVIEW_PB1176
  11895. --- a/arch/arm/mm/Makefile
  11896. +++ b/arch/arm/mm/Makefile
  11897. @@ -46,6 +46,7 @@
  11898. obj-$(CONFIG_CPU_TLB_V4WT) += tlb-v4.o
  11899. obj-$(CONFIG_CPU_TLB_V4WB) += tlb-v4wb.o
  11900. obj-$(CONFIG_CPU_TLB_V4WBI) += tlb-v4wbi.o
  11901. +obj-$(CONFIG_CPU_TLB_FEROCEON) += tlb-v4wbi.o # reuse v4wbi TLB functions
  11902. obj-$(CONFIG_CPU_TLB_V6) += tlb-v6.o
  11903. obj-$(CONFIG_CPU_TLB_V7) += tlb-v7.o
  11904. @@ -73,4 +74,5 @@
  11905. obj-$(CONFIG_CPU_V6) += proc-v6.o
  11906. obj-$(CONFIG_CPU_V7) += proc-v7.o
  11907. +obj-$(CONFIG_CACHE_FEROCEON_L2) += cache-feroceon-l2.o
  11908. obj-$(CONFIG_CACHE_L2X0) += cache-l2x0.o
  11909. --- /dev/null
  11910. +++ b/arch/arm/mm/cache-feroceon-l2.c
  11911. @@ -0,0 +1,318 @@
  11912. +/*
  11913. + * arch/arm/mm/cache-feroceon-l2.c - Feroceon L2 cache controller support
  11914. + *
  11915. + * Copyright (C) 2008 Marvell Semiconductor
  11916. + *
  11917. + * This file is licensed under the terms of the GNU General Public
  11918. + * License version 2. This program is licensed "as is" without any
  11919. + * warranty of any kind, whether express or implied.
  11920. + *
  11921. + * References:
  11922. + * - Unified Layer 2 Cache for Feroceon CPU Cores,
  11923. + * Document ID MV-S104858-00, Rev. A, October 23 2007.
  11924. + */
  11925. +
  11926. +#include <linux/init.h>
  11927. +#include <asm/cacheflush.h>
  11928. +#include <asm/plat-orion/cache-feroceon-l2.h>
  11929. +
  11930. +
  11931. +/*
  11932. + * Low-level cache maintenance operations.
  11933. + *
  11934. + * As well as the regular 'clean/invalidate/flush L2 cache line by
  11935. + * MVA' instructions, the Feroceon L2 cache controller also features
  11936. + * 'clean/invalidate L2 range by MVA' operations.
  11937. + *
  11938. + * Cache range operations are initiated by writing the start and
  11939. + * end addresses to successive cp15 registers, and process every
  11940. + * cache line whose first byte address lies in the inclusive range
  11941. + * [start:end].
  11942. + *
  11943. + * The cache range operations stall the CPU pipeline until completion.
  11944. + *
  11945. + * The range operations require two successive cp15 writes, in
  11946. + * between which we don't want to be preempted.
  11947. + */
  11948. +static inline void l2_clean_pa(unsigned long addr)
  11949. +{
  11950. + __asm__("mcr p15, 1, %0, c15, c9, 3" : : "r" (addr));
  11951. +}
  11952. +
  11953. +static inline void l2_clean_mva_range(unsigned long start, unsigned long end)
  11954. +{
  11955. + unsigned long flags;
  11956. +
  11957. + /*
  11958. + * Make sure 'start' and 'end' reference the same page, as
  11959. + * L2 is PIPT and range operations only do a TLB lookup on
  11960. + * the start address.
  11961. + */
  11962. + BUG_ON((start ^ end) & ~(PAGE_SIZE - 1));
  11963. +
  11964. + raw_local_irq_save(flags);
  11965. + __asm__("mcr p15, 1, %0, c15, c9, 4" : : "r" (start));
  11966. + __asm__("mcr p15, 1, %0, c15, c9, 5" : : "r" (end));
  11967. + raw_local_irq_restore(flags);
  11968. +}
  11969. +
  11970. +static inline void l2_clean_pa_range(unsigned long start, unsigned long end)
  11971. +{
  11972. + l2_clean_mva_range(__phys_to_virt(start), __phys_to_virt(end));
  11973. +}
  11974. +
  11975. +static inline void l2_clean_inv_pa(unsigned long addr)
  11976. +{
  11977. + __asm__("mcr p15, 1, %0, c15, c10, 3" : : "r" (addr));
  11978. +}
  11979. +
  11980. +static inline void l2_inv_pa(unsigned long addr)
  11981. +{
  11982. + __asm__("mcr p15, 1, %0, c15, c11, 3" : : "r" (addr));
  11983. +}
  11984. +
  11985. +static inline void l2_inv_mva_range(unsigned long start, unsigned long end)
  11986. +{
  11987. + unsigned long flags;
  11988. +
  11989. + /*
  11990. + * Make sure 'start' and 'end' reference the same page, as
  11991. + * L2 is PIPT and range operations only do a TLB lookup on
  11992. + * the start address.
  11993. + */
  11994. + BUG_ON((start ^ end) & ~(PAGE_SIZE - 1));
  11995. +
  11996. + raw_local_irq_save(flags);
  11997. + __asm__("mcr p15, 1, %0, c15, c11, 4" : : "r" (start));
  11998. + __asm__("mcr p15, 1, %0, c15, c11, 5" : : "r" (end));
  11999. + raw_local_irq_restore(flags);
  12000. +}
  12001. +
  12002. +static inline void l2_inv_pa_range(unsigned long start, unsigned long end)
  12003. +{
  12004. + l2_inv_mva_range(__phys_to_virt(start), __phys_to_virt(end));
  12005. +}
  12006. +
  12007. +
  12008. +/*
  12009. + * Linux primitives.
  12010. + *
  12011. + * Note that the end addresses passed to Linux primitives are
  12012. + * noninclusive, while the hardware cache range operations use
  12013. + * inclusive start and end addresses.
  12014. + */
  12015. +#define CACHE_LINE_SIZE 32
  12016. +#define MAX_RANGE_SIZE 1024
  12017. +
  12018. +static int l2_wt_override;
  12019. +
  12020. +static unsigned long calc_range_end(unsigned long start, unsigned long end)
  12021. +{
  12022. + unsigned long range_end;
  12023. +
  12024. + BUG_ON(start & (CACHE_LINE_SIZE - 1));
  12025. + BUG_ON(end & (CACHE_LINE_SIZE - 1));
  12026. +
  12027. + /*
  12028. + * Try to process all cache lines between 'start' and 'end'.
  12029. + */
  12030. + range_end = end;
  12031. +
  12032. + /*
  12033. + * Limit the number of cache lines processed at once,
  12034. + * since cache range operations stall the CPU pipeline
  12035. + * until completion.
  12036. + */
  12037. + if (range_end > start + MAX_RANGE_SIZE)
  12038. + range_end = start + MAX_RANGE_SIZE;
  12039. +
  12040. + /*
  12041. + * Cache range operations can't straddle a page boundary.
  12042. + */
  12043. + if (range_end > (start | (PAGE_SIZE - 1)) + 1)
  12044. + range_end = (start | (PAGE_SIZE - 1)) + 1;
  12045. +
  12046. + return range_end;
  12047. +}
  12048. +
  12049. +static void feroceon_l2_inv_range(unsigned long start, unsigned long end)
  12050. +{
  12051. + /*
  12052. + * Clean and invalidate partial first cache line.
  12053. + */
  12054. + if (start & (CACHE_LINE_SIZE - 1)) {
  12055. + l2_clean_inv_pa(start & ~(CACHE_LINE_SIZE - 1));
  12056. + start = (start | (CACHE_LINE_SIZE - 1)) + 1;
  12057. + }
  12058. +
  12059. + /*
  12060. + * Clean and invalidate partial last cache line.
  12061. + */
  12062. + if (end & (CACHE_LINE_SIZE - 1)) {
  12063. + l2_clean_inv_pa(end & ~(CACHE_LINE_SIZE - 1));
  12064. + end &= ~(CACHE_LINE_SIZE - 1);
  12065. + }
  12066. +
  12067. + /*
  12068. + * Invalidate all full cache lines between 'start' and 'end'.
  12069. + */
  12070. + while (start != end) {
  12071. + unsigned long range_end = calc_range_end(start, end);
  12072. + l2_inv_pa_range(start, range_end - CACHE_LINE_SIZE);
  12073. + start = range_end;
  12074. + }
  12075. +
  12076. + dsb();
  12077. +}
  12078. +
  12079. +static void feroceon_l2_clean_range(unsigned long start, unsigned long end)
  12080. +{
  12081. + /*
  12082. + * If L2 is forced to WT, the L2 will always be clean and we
  12083. + * don't need to do anything here.
  12084. + */
  12085. + if (!l2_wt_override) {
  12086. + start &= ~(CACHE_LINE_SIZE - 1);
  12087. + end = (end + CACHE_LINE_SIZE - 1) & ~(CACHE_LINE_SIZE - 1);
  12088. + while (start != end) {
  12089. + unsigned long range_end = calc_range_end(start, end);
  12090. + l2_clean_pa_range(start, range_end - CACHE_LINE_SIZE);
  12091. + start = range_end;
  12092. + }
  12093. + }
  12094. +
  12095. + dsb();
  12096. +}
  12097. +
  12098. +static void feroceon_l2_flush_range(unsigned long start, unsigned long end)
  12099. +{
  12100. + start &= ~(CACHE_LINE_SIZE - 1);
  12101. + end = (end + CACHE_LINE_SIZE - 1) & ~(CACHE_LINE_SIZE - 1);
  12102. + while (start != end) {
  12103. + unsigned long range_end = calc_range_end(start, end);
  12104. + if (!l2_wt_override)
  12105. + l2_clean_pa_range(start, range_end - CACHE_LINE_SIZE);
  12106. + l2_inv_pa_range(start, range_end - CACHE_LINE_SIZE);
  12107. + start = range_end;
  12108. + }
  12109. +
  12110. + dsb();
  12111. +}
  12112. +
  12113. +
  12114. +/*
  12115. + * Routines to disable and re-enable the D-cache and I-cache at run
  12116. + * time. These are necessary because the L2 cache can only be enabled
  12117. + * or disabled while the L1 Dcache and Icache are both disabled.
  12118. + */
  12119. +static void __init invalidate_and_disable_dcache(void)
  12120. +{
  12121. + u32 cr;
  12122. +
  12123. + cr = get_cr();
  12124. + if (cr & CR_C) {
  12125. + unsigned long flags;
  12126. +
  12127. + raw_local_irq_save(flags);
  12128. + flush_cache_all();
  12129. + set_cr(cr & ~CR_C);
  12130. + raw_local_irq_restore(flags);
  12131. + }
  12132. +}
  12133. +
  12134. +static void __init enable_dcache(void)
  12135. +{
  12136. + u32 cr;
  12137. +
  12138. + cr = get_cr();
  12139. + if (!(cr & CR_C))
  12140. + set_cr(cr | CR_C);
  12141. +}
  12142. +
  12143. +static void __init __invalidate_icache(void)
  12144. +{
  12145. + int dummy;
  12146. +
  12147. + __asm__ __volatile__("mcr p15, 0, %0, c7, c5, 0\n" : "=r" (dummy));
  12148. +}
  12149. +
  12150. +static void __init invalidate_and_disable_icache(void)
  12151. +{
  12152. + u32 cr;
  12153. +
  12154. + cr = get_cr();
  12155. + if (cr & CR_I) {
  12156. + set_cr(cr & ~CR_I);
  12157. + __invalidate_icache();
  12158. + }
  12159. +}
  12160. +
  12161. +static void __init enable_icache(void)
  12162. +{
  12163. + u32 cr;
  12164. +
  12165. + cr = get_cr();
  12166. + if (!(cr & CR_I))
  12167. + set_cr(cr | CR_I);
  12168. +}
  12169. +
  12170. +static inline u32 read_extra_features(void)
  12171. +{
  12172. + u32 u;
  12173. +
  12174. + __asm__("mrc p15, 1, %0, c15, c1, 0" : "=r" (u));
  12175. +
  12176. + return u;
  12177. +}
  12178. +
  12179. +static inline void write_extra_features(u32 u)
  12180. +{
  12181. + __asm__("mcr p15, 1, %0, c15, c1, 0" : : "r" (u));
  12182. +}
  12183. +
  12184. +static void __init disable_l2_prefetch(void)
  12185. +{
  12186. + u32 u;
  12187. +
  12188. + /*
  12189. + * Read the CPU Extra Features register and verify that the
  12190. + * Disable L2 Prefetch bit is set.
  12191. + */
  12192. + u = read_extra_features();
  12193. + if (!(u & 0x01000000)) {
  12194. + printk(KERN_INFO "Feroceon L2: Disabling L2 prefetch.\n");
  12195. + write_extra_features(u | 0x01000000);
  12196. + }
  12197. +}
  12198. +
  12199. +static void __init enable_l2(void)
  12200. +{
  12201. + u32 u;
  12202. +
  12203. + u = read_extra_features();
  12204. + if (!(u & 0x00400000)) {
  12205. + printk(KERN_INFO "Feroceon L2: Enabling L2\n");
  12206. +
  12207. + invalidate_and_disable_dcache();
  12208. + invalidate_and_disable_icache();
  12209. + write_extra_features(u | 0x00400000);
  12210. + enable_icache();
  12211. + enable_dcache();
  12212. + }
  12213. +}
  12214. +
  12215. +void __init feroceon_l2_init(int __l2_wt_override)
  12216. +{
  12217. + l2_wt_override = __l2_wt_override;
  12218. +
  12219. + disable_l2_prefetch();
  12220. +
  12221. + outer_cache.inv_range = feroceon_l2_inv_range;
  12222. + outer_cache.clean_range = feroceon_l2_clean_range;
  12223. + outer_cache.flush_range = feroceon_l2_flush_range;
  12224. +
  12225. + enable_l2();
  12226. +
  12227. + printk(KERN_INFO "Feroceon L2: Cache support initialised%s.\n",
  12228. + l2_wt_override ? ", in WT override mode" : "");
  12229. +}
  12230. --- a/arch/arm/mm/proc-feroceon.S
  12231. +++ b/arch/arm/mm/proc-feroceon.S
  12232. @@ -44,11 +44,31 @@
  12233. */
  12234. #define CACHE_DLINESIZE 32
  12235. + .bss
  12236. + .align 3
  12237. +__cache_params_loc:
  12238. + .space 8
  12239. +
  12240. .text
  12241. +__cache_params:
  12242. + .word __cache_params_loc
  12243. +
  12244. /*
  12245. * cpu_feroceon_proc_init()
  12246. */
  12247. ENTRY(cpu_feroceon_proc_init)
  12248. + mrc p15, 0, r0, c0, c0, 1 @ read cache type register
  12249. + ldr r1, __cache_params
  12250. + mov r2, #(16 << 5)
  12251. + tst r0, #(1 << 16) @ get way
  12252. + mov r0, r0, lsr #18 @ get cache size order
  12253. + movne r3, #((4 - 1) << 30) @ 4-way
  12254. + and r0, r0, #0xf
  12255. + moveq r3, #0 @ 1-way
  12256. + mov r2, r2, lsl r0 @ actual cache size
  12257. + movne r2, r2, lsr #2 @ turned into # of sets
  12258. + sub r2, r2, #(1 << 5)
  12259. + stmia r1, {r2, r3}
  12260. mov pc, lr
  12261. /*
  12262. @@ -59,6 +79,13 @@
  12263. mov ip, #PSR_F_BIT | PSR_I_BIT | SVC_MODE
  12264. msr cpsr_c, ip
  12265. bl feroceon_flush_kern_cache_all
  12266. +
  12267. +#if defined(CONFIG_CACHE_FEROCEON_L2) && !defined(CONFIG_L2_CACHE_WRITETHROUGH)
  12268. + mov r0, #0
  12269. + mcr p15, 1, r0, c15, c9, 0 @ clean L2
  12270. + mcr p15, 0, r0, c7, c10, 4 @ drain WB
  12271. +#endif
  12272. +
  12273. mrc p15, 0, r0, c1, c0, 0 @ ctrl register
  12274. bic r0, r0, #0x1000 @ ...i............
  12275. bic r0, r0, #0x000e @ ............wca.
  12276. @@ -117,11 +144,19 @@
  12277. */
  12278. ENTRY(feroceon_flush_kern_cache_all)
  12279. mov r2, #VM_EXEC
  12280. - mov ip, #0
  12281. +
  12282. __flush_whole_cache:
  12283. -1: mrc p15, 0, r15, c7, c14, 3 @ test,clean,invalidate
  12284. - bne 1b
  12285. + ldr r1, __cache_params
  12286. + ldmia r1, {r1, r3}
  12287. +1: orr ip, r1, r3
  12288. +2: mcr p15, 0, ip, c7, c14, 2 @ clean + invalidate D set/way
  12289. + subs ip, ip, #(1 << 30) @ next way
  12290. + bcs 2b
  12291. + subs r1, r1, #(1 << 5) @ next set
  12292. + bcs 1b
  12293. +
  12294. tst r2, #VM_EXEC
  12295. + mov ip, #0
  12296. mcrne p15, 0, ip, c7, c5, 0 @ invalidate I cache
  12297. mcrne p15, 0, ip, c7, c10, 4 @ drain WB
  12298. mov pc, lr
  12299. @@ -138,7 +173,6 @@
  12300. */
  12301. .align 5
  12302. ENTRY(feroceon_flush_user_cache_range)
  12303. - mov ip, #0
  12304. sub r3, r1, r0 @ calculate total size
  12305. cmp r3, #CACHE_DLIMIT
  12306. bgt __flush_whole_cache
  12307. @@ -152,6 +186,7 @@
  12308. cmp r0, r1
  12309. blo 1b
  12310. tst r2, #VM_EXEC
  12311. + mov ip, #0
  12312. mcrne p15, 0, ip, c7, c10, 4 @ drain WB
  12313. mov pc, lr
  12314. @@ -209,6 +244,20 @@
  12315. mcr p15, 0, r0, c7, c10, 4 @ drain WB
  12316. mov pc, lr
  12317. + .align 5
  12318. +ENTRY(feroceon_range_flush_kern_dcache_page)
  12319. + mrs r2, cpsr
  12320. + add r1, r0, #PAGE_SZ - CACHE_DLINESIZE @ top addr is inclusive
  12321. + orr r3, r2, #PSR_I_BIT
  12322. + msr cpsr_c, r3 @ disable interrupts
  12323. + mcr p15, 5, r0, c15, c15, 0 @ D clean/inv range start
  12324. + mcr p15, 5, r1, c15, c15, 1 @ D clean/inv range top
  12325. + msr cpsr_c, r2 @ restore interrupts
  12326. + mov r0, #0
  12327. + mcr p15, 0, r0, c7, c5, 0 @ invalidate I cache
  12328. + mcr p15, 0, r0, c7, c10, 4 @ drain WB
  12329. + mov pc, lr
  12330. +
  12331. /*
  12332. * dma_inv_range(start, end)
  12333. *
  12334. @@ -225,10 +274,10 @@
  12335. .align 5
  12336. ENTRY(feroceon_dma_inv_range)
  12337. tst r0, #CACHE_DLINESIZE - 1
  12338. + bic r0, r0, #CACHE_DLINESIZE - 1
  12339. mcrne p15, 0, r0, c7, c10, 1 @ clean D entry
  12340. tst r1, #CACHE_DLINESIZE - 1
  12341. mcrne p15, 0, r1, c7, c10, 1 @ clean D entry
  12342. - bic r0, r0, #CACHE_DLINESIZE - 1
  12343. 1: mcr p15, 0, r0, c7, c6, 1 @ invalidate D entry
  12344. add r0, r0, #CACHE_DLINESIZE
  12345. cmp r0, r1
  12346. @@ -236,6 +285,22 @@
  12347. mcr p15, 0, r0, c7, c10, 4 @ drain WB
  12348. mov pc, lr
  12349. + .align 5
  12350. +ENTRY(feroceon_range_dma_inv_range)
  12351. + mrs r2, cpsr
  12352. + tst r0, #CACHE_DLINESIZE - 1
  12353. + mcrne p15, 0, r0, c7, c10, 1 @ clean D entry
  12354. + tst r1, #CACHE_DLINESIZE - 1
  12355. + mcrne p15, 0, r1, c7, c10, 1 @ clean D entry
  12356. + cmp r1, r0
  12357. + subne r1, r1, #1 @ top address is inclusive
  12358. + orr r3, r2, #PSR_I_BIT
  12359. + msr cpsr_c, r3 @ disable interrupts
  12360. + mcr p15, 5, r0, c15, c14, 0 @ D inv range start
  12361. + mcr p15, 5, r1, c15, c14, 1 @ D inv range top
  12362. + msr cpsr_c, r2 @ restore interrupts
  12363. + mov pc, lr
  12364. +
  12365. /*
  12366. * dma_clean_range(start, end)
  12367. *
  12368. @@ -256,6 +321,19 @@
  12369. mcr p15, 0, r0, c7, c10, 4 @ drain WB
  12370. mov pc, lr
  12371. + .align 5
  12372. +ENTRY(feroceon_range_dma_clean_range)
  12373. + mrs r2, cpsr
  12374. + cmp r1, r0
  12375. + subne r1, r1, #1 @ top address is inclusive
  12376. + orr r3, r2, #PSR_I_BIT
  12377. + msr cpsr_c, r3 @ disable interrupts
  12378. + mcr p15, 5, r0, c15, c13, 0 @ D clean range start
  12379. + mcr p15, 5, r1, c15, c13, 1 @ D clean range top
  12380. + msr cpsr_c, r2 @ restore interrupts
  12381. + mcr p15, 0, r0, c7, c10, 4 @ drain WB
  12382. + mov pc, lr
  12383. +
  12384. /*
  12385. * dma_flush_range(start, end)
  12386. *
  12387. @@ -274,6 +352,19 @@
  12388. mcr p15, 0, r0, c7, c10, 4 @ drain WB
  12389. mov pc, lr
  12390. + .align 5
  12391. +ENTRY(feroceon_range_dma_flush_range)
  12392. + mrs r2, cpsr
  12393. + cmp r1, r0
  12394. + subne r1, r1, #1 @ top address is inclusive
  12395. + orr r3, r2, #PSR_I_BIT
  12396. + msr cpsr_c, r3 @ disable interrupts
  12397. + mcr p15, 5, r0, c15, c15, 0 @ D clean/inv range start
  12398. + mcr p15, 5, r1, c15, c15, 1 @ D clean/inv range top
  12399. + msr cpsr_c, r2 @ restore interrupts
  12400. + mcr p15, 0, r0, c7, c10, 4 @ drain WB
  12401. + mov pc, lr
  12402. +
  12403. ENTRY(feroceon_cache_fns)
  12404. .long feroceon_flush_kern_cache_all
  12405. .long feroceon_flush_user_cache_all
  12406. @@ -285,12 +376,33 @@
  12407. .long feroceon_dma_clean_range
  12408. .long feroceon_dma_flush_range
  12409. +ENTRY(feroceon_range_cache_fns)
  12410. + .long feroceon_flush_kern_cache_all
  12411. + .long feroceon_flush_user_cache_all
  12412. + .long feroceon_flush_user_cache_range
  12413. + .long feroceon_coherent_kern_range
  12414. + .long feroceon_coherent_user_range
  12415. + .long feroceon_range_flush_kern_dcache_page
  12416. + .long feroceon_range_dma_inv_range
  12417. + .long feroceon_range_dma_clean_range
  12418. + .long feroceon_range_dma_flush_range
  12419. +
  12420. .align 5
  12421. ENTRY(cpu_feroceon_dcache_clean_area)
  12422. +#if defined(CONFIG_CACHE_FEROCEON_L2) && !defined(CONFIG_L2_CACHE_WRITETHROUGH)
  12423. + mov r2, r0
  12424. + mov r3, r1
  12425. +#endif
  12426. 1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry
  12427. add r0, r0, #CACHE_DLINESIZE
  12428. subs r1, r1, #CACHE_DLINESIZE
  12429. bhi 1b
  12430. +#if defined(CONFIG_CACHE_FEROCEON_L2) && !defined(CONFIG_L2_CACHE_WRITETHROUGH)
  12431. +1: mcr p15, 1, r2, c15, c9, 1 @ clean L2 entry
  12432. + add r2, r2, #CACHE_DLINESIZE
  12433. + subs r3, r3, #CACHE_DLINESIZE
  12434. + bhi 1b
  12435. +#endif
  12436. mcr p15, 0, r0, c7, c10, 4 @ drain WB
  12437. mov pc, lr
  12438. @@ -306,16 +418,25 @@
  12439. .align 5
  12440. ENTRY(cpu_feroceon_switch_mm)
  12441. #ifdef CONFIG_MMU
  12442. - mov ip, #0
  12443. -@ && 'Clean & Invalidate whole DCache'
  12444. -1: mrc p15, 0, r15, c7, c14, 3 @ test,clean,invalidate
  12445. - bne 1b
  12446. - mcr p15, 0, ip, c7, c5, 0 @ invalidate I cache
  12447. - mcr p15, 0, ip, c7, c10, 4 @ drain WB
  12448. + /*
  12449. + * Note: we wish to call __flush_whole_cache but we need to preserve
  12450. + * lr to do so. The only way without touching main memory is to
  12451. + * use r2 which is normally used to test the VM_EXEC flag, and
  12452. + * compensate locally for the skipped ops if it is not set.
  12453. + */
  12454. + mov r2, lr @ abuse r2 to preserve lr
  12455. + bl __flush_whole_cache
  12456. + @ if r2 contains the VM_EXEC bit then the next 2 ops are done already
  12457. + tst r2, #VM_EXEC
  12458. + mcreq p15, 0, ip, c7, c5, 0 @ invalidate I cache
  12459. + mcreq p15, 0, ip, c7, c10, 4 @ drain WB
  12460. +
  12461. mcr p15, 0, r0, c2, c0, 0 @ load page table pointer
  12462. mcr p15, 0, ip, c8, c7, 0 @ invalidate I & D TLBs
  12463. -#endif
  12464. + mov pc, r2
  12465. +#else
  12466. mov pc, lr
  12467. +#endif
  12468. /*
  12469. * cpu_feroceon_set_pte_ext(ptep, pte, ext)
  12470. @@ -345,6 +466,9 @@
  12471. str r2, [r0] @ hardware version
  12472. mov r0, r0
  12473. mcr p15, 0, r0, c7, c10, 1 @ clean D entry
  12474. +#if defined(CONFIG_CACHE_FEROCEON_L2) && !defined(CONFIG_L2_CACHE_WRITETHROUGH)
  12475. + mcr p15, 1, r0, c15, c9, 1 @ clean L2 entry
  12476. +#endif
  12477. mcr p15, 0, r0, c7, c10, 4 @ drain WB
  12478. #endif
  12479. mov pc, lr
  12480. @@ -414,6 +538,21 @@
  12481. .asciz "Feroceon"
  12482. .size cpu_feroceon_name, . - cpu_feroceon_name
  12483. + .type cpu_88fr531_name, #object
  12484. +cpu_88fr531_name:
  12485. + .asciz "Feroceon 88FR531-vd"
  12486. + .size cpu_88fr531_name, . - cpu_88fr531_name
  12487. +
  12488. + .type cpu_88fr571_name, #object
  12489. +cpu_88fr571_name:
  12490. + .asciz "Feroceon 88FR571-vd"
  12491. + .size cpu_88fr571_name, . - cpu_88fr571_name
  12492. +
  12493. + .type cpu_88fr131_name, #object
  12494. +cpu_88fr131_name:
  12495. + .asciz "Feroceon 88FR131"
  12496. + .size cpu_88fr131_name, . - cpu_88fr131_name
  12497. +
  12498. .align
  12499. .section ".proc.info.init", #alloc, #execinstr
  12500. @@ -421,15 +560,15 @@
  12501. #ifdef CONFIG_CPU_FEROCEON_OLD_ID
  12502. .type __feroceon_old_id_proc_info,#object
  12503. __feroceon_old_id_proc_info:
  12504. - .long 0x41069260
  12505. - .long 0xfffffff0
  12506. - .long PMD_TYPE_SECT | \
  12507. + .long 0x41009260
  12508. + .long 0xff00fff0
  12509. + .long PMD_TYPE_SECT | \
  12510. PMD_SECT_BUFFERABLE | \
  12511. PMD_SECT_CACHEABLE | \
  12512. PMD_BIT4 | \
  12513. PMD_SECT_AP_WRITE | \
  12514. PMD_SECT_AP_READ
  12515. - .long PMD_TYPE_SECT | \
  12516. + .long PMD_TYPE_SECT | \
  12517. PMD_BIT4 | \
  12518. PMD_SECT_AP_WRITE | \
  12519. PMD_SECT_AP_READ
  12520. @@ -445,17 +584,17 @@
  12521. .size __feroceon_old_id_proc_info, . - __feroceon_old_id_proc_info
  12522. #endif
  12523. - .type __feroceon_proc_info,#object
  12524. -__feroceon_proc_info:
  12525. + .type __88fr531_proc_info,#object
  12526. +__88fr531_proc_info:
  12527. .long 0x56055310
  12528. .long 0xfffffff0
  12529. - .long PMD_TYPE_SECT | \
  12530. + .long PMD_TYPE_SECT | \
  12531. PMD_SECT_BUFFERABLE | \
  12532. PMD_SECT_CACHEABLE | \
  12533. PMD_BIT4 | \
  12534. PMD_SECT_AP_WRITE | \
  12535. PMD_SECT_AP_READ
  12536. - .long PMD_TYPE_SECT | \
  12537. + .long PMD_TYPE_SECT | \
  12538. PMD_BIT4 | \
  12539. PMD_SECT_AP_WRITE | \
  12540. PMD_SECT_AP_READ
  12541. @@ -463,9 +602,59 @@
  12542. .long cpu_arch_name
  12543. .long cpu_elf_name
  12544. .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP
  12545. - .long cpu_feroceon_name
  12546. + .long cpu_88fr531_name
  12547. .long feroceon_processor_functions
  12548. .long v4wbi_tlb_fns
  12549. .long feroceon_user_fns
  12550. .long feroceon_cache_fns
  12551. - .size __feroceon_proc_info, . - __feroceon_proc_info
  12552. + .size __88fr531_proc_info, . - __88fr531_proc_info
  12553. +
  12554. + .type __88fr571_proc_info,#object
  12555. +__88fr571_proc_info:
  12556. + .long 0x56155710
  12557. + .long 0xfffffff0
  12558. + .long PMD_TYPE_SECT | \
  12559. + PMD_SECT_BUFFERABLE | \
  12560. + PMD_SECT_CACHEABLE | \
  12561. + PMD_BIT4 | \
  12562. + PMD_SECT_AP_WRITE | \
  12563. + PMD_SECT_AP_READ
  12564. + .long PMD_TYPE_SECT | \
  12565. + PMD_BIT4 | \
  12566. + PMD_SECT_AP_WRITE | \
  12567. + PMD_SECT_AP_READ
  12568. + b __feroceon_setup
  12569. + .long cpu_arch_name
  12570. + .long cpu_elf_name
  12571. + .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP
  12572. + .long cpu_88fr571_name
  12573. + .long feroceon_processor_functions
  12574. + .long v4wbi_tlb_fns
  12575. + .long feroceon_user_fns
  12576. + .long feroceon_range_cache_fns
  12577. + .size __88fr571_proc_info, . - __88fr571_proc_info
  12578. +
  12579. + .type __88fr131_proc_info,#object
  12580. +__88fr131_proc_info:
  12581. + .long 0x56251310
  12582. + .long 0xfffffff0
  12583. + .long PMD_TYPE_SECT | \
  12584. + PMD_SECT_BUFFERABLE | \
  12585. + PMD_SECT_CACHEABLE | \
  12586. + PMD_BIT4 | \
  12587. + PMD_SECT_AP_WRITE | \
  12588. + PMD_SECT_AP_READ
  12589. + .long PMD_TYPE_SECT | \
  12590. + PMD_BIT4 | \
  12591. + PMD_SECT_AP_WRITE | \
  12592. + PMD_SECT_AP_READ
  12593. + b __feroceon_setup
  12594. + .long cpu_arch_name
  12595. + .long cpu_elf_name
  12596. + .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP
  12597. + .long cpu_88fr131_name
  12598. + .long feroceon_processor_functions
  12599. + .long v4wbi_tlb_fns
  12600. + .long feroceon_user_fns
  12601. + .long feroceon_range_cache_fns
  12602. + .size __88fr131_proc_info, . - __88fr131_proc_info
  12603. --- a/arch/arm/plat-orion/irq.c
  12604. +++ b/arch/arm/plat-orion/irq.c
  12605. @@ -36,8 +36,8 @@
  12606. static struct irq_chip orion_irq_chip = {
  12607. .name = "orion_irq",
  12608. - .ack = orion_irq_mask,
  12609. .mask = orion_irq_mask,
  12610. + .mask_ack = orion_irq_mask,
  12611. .unmask = orion_irq_unmask,
  12612. };
  12613. @@ -59,6 +59,7 @@
  12614. set_irq_chip(irq, &orion_irq_chip);
  12615. set_irq_chip_data(irq, maskaddr);
  12616. set_irq_handler(irq, handle_level_irq);
  12617. + irq_desc[irq].status |= IRQ_LEVEL;
  12618. set_irq_flags(irq, IRQF_VALID);
  12619. }
  12620. }
  12621. --- a/arch/arm/plat-orion/pcie.c
  12622. +++ b/arch/arm/plat-orion/pcie.c
  12623. @@ -39,6 +39,7 @@
  12624. #define PCIE_CONF_DATA_OFF 0x18fc
  12625. #define PCIE_MASK_OFF 0x1910
  12626. #define PCIE_CTRL_OFF 0x1a00
  12627. +#define PCIE_CTRL_X1_MODE 0x0001
  12628. #define PCIE_STAT_OFF 0x1a04
  12629. #define PCIE_STAT_DEV_OFFS 20
  12630. #define PCIE_STAT_DEV_MASK 0x1f
  12631. @@ -62,6 +63,11 @@
  12632. return !(readl(base + PCIE_STAT_OFF) & PCIE_STAT_LINK_DOWN);
  12633. }
  12634. +int __init orion_pcie_x4_mode(void __iomem *base)
  12635. +{
  12636. + return !(readl(base + PCIE_CTRL_OFF) & PCIE_CTRL_X1_MODE);
  12637. +}
  12638. +
  12639. int orion_pcie_get_local_bus_nr(void __iomem *base)
  12640. {
  12641. u32 stat = readl(base + PCIE_STAT_OFF);
  12642. --- a/arch/arm/plat-orion/time.c
  12643. +++ b/arch/arm/plat-orion/time.c
  12644. @@ -74,7 +74,7 @@
  12645. /*
  12646. * Clear and enable clockevent timer interrupt.
  12647. */
  12648. - writel(~BRIDGE_INT_TIMER1, BRIDGE_CAUSE);
  12649. + writel(BRIDGE_INT_TIMER1_CLR, BRIDGE_CAUSE);
  12650. u = readl(BRIDGE_MASK);
  12651. u |= BRIDGE_INT_TIMER1;
  12652. @@ -138,7 +138,7 @@
  12653. /*
  12654. * ACK pending timer interrupt.
  12655. */
  12656. - writel(~BRIDGE_INT_TIMER1, BRIDGE_CAUSE);
  12657. + writel(BRIDGE_INT_TIMER1_CLR, BRIDGE_CAUSE);
  12658. }
  12659. local_irq_restore(flags);
  12660. @@ -159,7 +159,7 @@
  12661. /*
  12662. * ACK timer interrupt and call event handler.
  12663. */
  12664. - writel(~BRIDGE_INT_TIMER1, BRIDGE_CAUSE);
  12665. + writel(BRIDGE_INT_TIMER1_CLR, BRIDGE_CAUSE);
  12666. orion_clkevt.event_handler(&orion_clkevt);
  12667. return IRQ_HANDLED;
  12668. --- a/drivers/net/mv643xx_eth.c
  12669. +++ b/drivers/net/mv643xx_eth.c
  12670. @@ -34,406 +34,145 @@
  12671. * along with this program; if not, write to the Free Software
  12672. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  12673. */
  12674. +
  12675. #include <linux/init.h>
  12676. #include <linux/dma-mapping.h>
  12677. #include <linux/in.h>
  12678. -#include <linux/ip.h>
  12679. #include <linux/tcp.h>
  12680. #include <linux/udp.h>
  12681. #include <linux/etherdevice.h>
  12682. -
  12683. -#include <linux/bitops.h>
  12684. #include <linux/delay.h>
  12685. #include <linux/ethtool.h>
  12686. #include <linux/platform_device.h>
  12687. -
  12688. #include <linux/module.h>
  12689. #include <linux/kernel.h>
  12690. #include <linux/spinlock.h>
  12691. #include <linux/workqueue.h>
  12692. #include <linux/mii.h>
  12693. -
  12694. #include <linux/mv643xx_eth.h>
  12695. -
  12696. #include <asm/io.h>
  12697. #include <asm/types.h>
  12698. -#include <asm/pgtable.h>
  12699. #include <asm/system.h>
  12700. -#include <asm/delay.h>
  12701. -#include <asm/dma-mapping.h>
  12702. -#define MV643XX_CHECKSUM_OFFLOAD_TX
  12703. -#define MV643XX_NAPI
  12704. -#define MV643XX_TX_FAST_REFILL
  12705. -#undef MV643XX_COAL
  12706. -
  12707. -#define MV643XX_TX_COAL 100
  12708. -#ifdef MV643XX_COAL
  12709. -#define MV643XX_RX_COAL 100
  12710. -#endif
  12711. +static char mv643xx_eth_driver_name[] = "mv643xx_eth";
  12712. +static char mv643xx_eth_driver_version[] = "1.1";
  12713. -#ifdef MV643XX_CHECKSUM_OFFLOAD_TX
  12714. +#define MV643XX_ETH_CHECKSUM_OFFLOAD_TX
  12715. +#define MV643XX_ETH_NAPI
  12716. +#define MV643XX_ETH_TX_FAST_REFILL
  12717. +
  12718. +#ifdef MV643XX_ETH_CHECKSUM_OFFLOAD_TX
  12719. #define MAX_DESCS_PER_SKB (MAX_SKB_FRAGS + 1)
  12720. #else
  12721. #define MAX_DESCS_PER_SKB 1
  12722. #endif
  12723. -#define ETH_VLAN_HLEN 4
  12724. -#define ETH_FCS_LEN 4
  12725. -#define ETH_HW_IP_ALIGN 2 /* hw aligns IP header */
  12726. -#define ETH_WRAPPER_LEN (ETH_HW_IP_ALIGN + ETH_HLEN + \
  12727. - ETH_VLAN_HLEN + ETH_FCS_LEN)
  12728. -#define ETH_RX_SKB_SIZE (dev->mtu + ETH_WRAPPER_LEN + \
  12729. - dma_get_cache_alignment())
  12730. -
  12731. /*
  12732. * Registers shared between all ports.
  12733. */
  12734. -#define PHY_ADDR_REG 0x0000
  12735. -#define SMI_REG 0x0004
  12736. -#define WINDOW_BASE(i) (0x0200 + ((i) << 3))
  12737. -#define WINDOW_SIZE(i) (0x0204 + ((i) << 3))
  12738. -#define WINDOW_REMAP_HIGH(i) (0x0280 + ((i) << 2))
  12739. -#define WINDOW_BAR_ENABLE 0x0290
  12740. -#define WINDOW_PROTECT(i) (0x0294 + ((i) << 4))
  12741. +#define PHY_ADDR 0x0000
  12742. +#define SMI_REG 0x0004
  12743. +#define WINDOW_BASE(w) (0x0200 + ((w) << 3))
  12744. +#define WINDOW_SIZE(w) (0x0204 + ((w) << 3))
  12745. +#define WINDOW_REMAP_HIGH(w) (0x0280 + ((w) << 2))
  12746. +#define WINDOW_BAR_ENABLE 0x0290
  12747. +#define WINDOW_PROTECT(w) (0x0294 + ((w) << 4))
  12748. /*
  12749. * Per-port registers.
  12750. */
  12751. -#define PORT_CONFIG_REG(p) (0x0400 + ((p) << 10))
  12752. -#define PORT_CONFIG_EXTEND_REG(p) (0x0404 + ((p) << 10))
  12753. -#define MAC_ADDR_LOW(p) (0x0414 + ((p) << 10))
  12754. -#define MAC_ADDR_HIGH(p) (0x0418 + ((p) << 10))
  12755. -#define SDMA_CONFIG_REG(p) (0x041c + ((p) << 10))
  12756. -#define PORT_SERIAL_CONTROL_REG(p) (0x043c + ((p) << 10))
  12757. -#define PORT_STATUS_REG(p) (0x0444 + ((p) << 10))
  12758. -#define TRANSMIT_QUEUE_COMMAND_REG(p) (0x0448 + ((p) << 10))
  12759. -#define MAXIMUM_TRANSMIT_UNIT(p) (0x0458 + ((p) << 10))
  12760. -#define INTERRUPT_CAUSE_REG(p) (0x0460 + ((p) << 10))
  12761. -#define INTERRUPT_CAUSE_EXTEND_REG(p) (0x0464 + ((p) << 10))
  12762. -#define INTERRUPT_MASK_REG(p) (0x0468 + ((p) << 10))
  12763. -#define INTERRUPT_EXTEND_MASK_REG(p) (0x046c + ((p) << 10))
  12764. -#define TX_FIFO_URGENT_THRESHOLD_REG(p) (0x0474 + ((p) << 10))
  12765. -#define RX_CURRENT_QUEUE_DESC_PTR_0(p) (0x060c + ((p) << 10))
  12766. -#define RECEIVE_QUEUE_COMMAND_REG(p) (0x0680 + ((p) << 10))
  12767. -#define TX_CURRENT_QUEUE_DESC_PTR_0(p) (0x06c0 + ((p) << 10))
  12768. -#define MIB_COUNTERS_BASE(p) (0x1000 + ((p) << 7))
  12769. -#define DA_FILTER_SPECIAL_MULTICAST_TABLE_BASE(p) (0x1400 + ((p) << 10))
  12770. -#define DA_FILTER_OTHER_MULTICAST_TABLE_BASE(p) (0x1500 + ((p) << 10))
  12771. -#define DA_FILTER_UNICAST_TABLE_BASE(p) (0x1600 + ((p) << 10))
  12772. -
  12773. -/* These macros describe Ethernet Port configuration reg (Px_cR) bits */
  12774. -#define UNICAST_NORMAL_MODE (0 << 0)
  12775. -#define UNICAST_PROMISCUOUS_MODE (1 << 0)
  12776. -#define DEFAULT_RX_QUEUE(queue) ((queue) << 1)
  12777. -#define DEFAULT_RX_ARP_QUEUE(queue) ((queue) << 4)
  12778. -#define RECEIVE_BC_IF_NOT_IP_OR_ARP (0 << 7)
  12779. -#define REJECT_BC_IF_NOT_IP_OR_ARP (1 << 7)
  12780. -#define RECEIVE_BC_IF_IP (0 << 8)
  12781. -#define REJECT_BC_IF_IP (1 << 8)
  12782. -#define RECEIVE_BC_IF_ARP (0 << 9)
  12783. -#define REJECT_BC_IF_ARP (1 << 9)
  12784. -#define TX_AM_NO_UPDATE_ERROR_SUMMARY (1 << 12)
  12785. -#define CAPTURE_TCP_FRAMES_DIS (0 << 14)
  12786. -#define CAPTURE_TCP_FRAMES_EN (1 << 14)
  12787. -#define CAPTURE_UDP_FRAMES_DIS (0 << 15)
  12788. -#define CAPTURE_UDP_FRAMES_EN (1 << 15)
  12789. -#define DEFAULT_RX_TCP_QUEUE(queue) ((queue) << 16)
  12790. -#define DEFAULT_RX_UDP_QUEUE(queue) ((queue) << 19)
  12791. -#define DEFAULT_RX_BPDU_QUEUE(queue) ((queue) << 22)
  12792. -
  12793. -#define PORT_CONFIG_DEFAULT_VALUE \
  12794. - UNICAST_NORMAL_MODE | \
  12795. - DEFAULT_RX_QUEUE(0) | \
  12796. - DEFAULT_RX_ARP_QUEUE(0) | \
  12797. - RECEIVE_BC_IF_NOT_IP_OR_ARP | \
  12798. - RECEIVE_BC_IF_IP | \
  12799. - RECEIVE_BC_IF_ARP | \
  12800. - CAPTURE_TCP_FRAMES_DIS | \
  12801. - CAPTURE_UDP_FRAMES_DIS | \
  12802. - DEFAULT_RX_TCP_QUEUE(0) | \
  12803. - DEFAULT_RX_UDP_QUEUE(0) | \
  12804. - DEFAULT_RX_BPDU_QUEUE(0)
  12805. -
  12806. -/* These macros describe Ethernet Port configuration extend reg (Px_cXR) bits*/
  12807. -#define CLASSIFY_EN (1 << 0)
  12808. -#define SPAN_BPDU_PACKETS_AS_NORMAL (0 << 1)
  12809. -#define SPAN_BPDU_PACKETS_TO_RX_QUEUE_7 (1 << 1)
  12810. -#define PARTITION_DISABLE (0 << 2)
  12811. -#define PARTITION_ENABLE (1 << 2)
  12812. -
  12813. -#define PORT_CONFIG_EXTEND_DEFAULT_VALUE \
  12814. - SPAN_BPDU_PACKETS_AS_NORMAL | \
  12815. - PARTITION_DISABLE
  12816. -
  12817. -/* These macros describe Ethernet Port Sdma configuration reg (SDCR) bits */
  12818. -#define RIFB (1 << 0)
  12819. -#define RX_BURST_SIZE_1_64BIT (0 << 1)
  12820. -#define RX_BURST_SIZE_2_64BIT (1 << 1)
  12821. +#define PORT_CONFIG(p) (0x0400 + ((p) << 10))
  12822. +#define UNICAST_PROMISCUOUS_MODE 0x00000001
  12823. +#define PORT_CONFIG_EXT(p) (0x0404 + ((p) << 10))
  12824. +#define MAC_ADDR_LOW(p) (0x0414 + ((p) << 10))
  12825. +#define MAC_ADDR_HIGH(p) (0x0418 + ((p) << 10))
  12826. +#define SDMA_CONFIG(p) (0x041c + ((p) << 10))
  12827. +#define PORT_SERIAL_CONTROL(p) (0x043c + ((p) << 10))
  12828. +#define PORT_STATUS(p) (0x0444 + ((p) << 10))
  12829. +#define TX_FIFO_EMPTY 0x00000400
  12830. +#define TXQ_COMMAND(p) (0x0448 + ((p) << 10))
  12831. +#define TXQ_FIX_PRIO_CONF(p) (0x044c + ((p) << 10))
  12832. +#define TX_BW_RATE(p) (0x0450 + ((p) << 10))
  12833. +#define TX_BW_MTU(p) (0x0458 + ((p) << 10))
  12834. +#define TX_BW_BURST(p) (0x045c + ((p) << 10))
  12835. +#define INT_CAUSE(p) (0x0460 + ((p) << 10))
  12836. +#define INT_TX_END 0x07f80000
  12837. +#define INT_RX 0x0007fbfc
  12838. +#define INT_EXT 0x00000002
  12839. +#define INT_CAUSE_EXT(p) (0x0464 + ((p) << 10))
  12840. +#define INT_EXT_LINK 0x00100000
  12841. +#define INT_EXT_PHY 0x00010000
  12842. +#define INT_EXT_TX_ERROR_0 0x00000100
  12843. +#define INT_EXT_TX_0 0x00000001
  12844. +#define INT_EXT_TX 0x0000ffff
  12845. +#define INT_MASK(p) (0x0468 + ((p) << 10))
  12846. +#define INT_MASK_EXT(p) (0x046c + ((p) << 10))
  12847. +#define TX_FIFO_URGENT_THRESHOLD(p) (0x0474 + ((p) << 10))
  12848. +#define TXQ_FIX_PRIO_CONF_MOVED(p) (0x04dc + ((p) << 10))
  12849. +#define TX_BW_RATE_MOVED(p) (0x04e0 + ((p) << 10))
  12850. +#define TX_BW_MTU_MOVED(p) (0x04e8 + ((p) << 10))
  12851. +#define TX_BW_BURST_MOVED(p) (0x04ec + ((p) << 10))
  12852. +#define RXQ_CURRENT_DESC_PTR(p, q) (0x060c + ((p) << 10) + ((q) << 4))
  12853. +#define RXQ_COMMAND(p) (0x0680 + ((p) << 10))
  12854. +#define TXQ_CURRENT_DESC_PTR(p, q) (0x06c0 + ((p) << 10) + ((q) << 2))
  12855. +#define TXQ_BW_TOKENS(p, q) (0x0700 + ((p) << 10) + ((q) << 4))
  12856. +#define TXQ_BW_CONF(p, q) (0x0704 + ((p) << 10) + ((q) << 4))
  12857. +#define TXQ_BW_WRR_CONF(p, q) (0x0708 + ((p) << 10) + ((q) << 4))
  12858. +#define MIB_COUNTERS(p) (0x1000 + ((p) << 7))
  12859. +#define SPECIAL_MCAST_TABLE(p) (0x1400 + ((p) << 10))
  12860. +#define OTHER_MCAST_TABLE(p) (0x1500 + ((p) << 10))
  12861. +#define UNICAST_TABLE(p) (0x1600 + ((p) << 10))
  12862. +
  12863. +
  12864. +/*
  12865. + * SDMA configuration register.
  12866. + */
  12867. #define RX_BURST_SIZE_4_64BIT (2 << 1)
  12868. -#define RX_BURST_SIZE_8_64BIT (3 << 1)
  12869. -#define RX_BURST_SIZE_16_64BIT (4 << 1)
  12870. #define BLM_RX_NO_SWAP (1 << 4)
  12871. -#define BLM_RX_BYTE_SWAP (0 << 4)
  12872. #define BLM_TX_NO_SWAP (1 << 5)
  12873. -#define BLM_TX_BYTE_SWAP (0 << 5)
  12874. -#define DESCRIPTORS_BYTE_SWAP (1 << 6)
  12875. -#define DESCRIPTORS_NO_SWAP (0 << 6)
  12876. -#define IPG_INT_RX(value) (((value) & 0x3fff) << 8)
  12877. -#define TX_BURST_SIZE_1_64BIT (0 << 22)
  12878. -#define TX_BURST_SIZE_2_64BIT (1 << 22)
  12879. #define TX_BURST_SIZE_4_64BIT (2 << 22)
  12880. -#define TX_BURST_SIZE_8_64BIT (3 << 22)
  12881. -#define TX_BURST_SIZE_16_64BIT (4 << 22)
  12882. #if defined(__BIG_ENDIAN)
  12883. #define PORT_SDMA_CONFIG_DEFAULT_VALUE \
  12884. RX_BURST_SIZE_4_64BIT | \
  12885. - IPG_INT_RX(0) | \
  12886. TX_BURST_SIZE_4_64BIT
  12887. #elif defined(__LITTLE_ENDIAN)
  12888. #define PORT_SDMA_CONFIG_DEFAULT_VALUE \
  12889. RX_BURST_SIZE_4_64BIT | \
  12890. BLM_RX_NO_SWAP | \
  12891. BLM_TX_NO_SWAP | \
  12892. - IPG_INT_RX(0) | \
  12893. TX_BURST_SIZE_4_64BIT
  12894. #else
  12895. #error One of __BIG_ENDIAN or __LITTLE_ENDIAN must be defined
  12896. #endif
  12897. -/* These macros describe Ethernet Port serial control reg (PSCR) bits */
  12898. -#define SERIAL_PORT_DISABLE (0 << 0)
  12899. -#define SERIAL_PORT_ENABLE (1 << 0)
  12900. -#define DO_NOT_FORCE_LINK_PASS (0 << 1)
  12901. -#define FORCE_LINK_PASS (1 << 1)
  12902. -#define ENABLE_AUTO_NEG_FOR_DUPLX (0 << 2)
  12903. -#define DISABLE_AUTO_NEG_FOR_DUPLX (1 << 2)
  12904. -#define ENABLE_AUTO_NEG_FOR_FLOW_CTRL (0 << 3)
  12905. -#define DISABLE_AUTO_NEG_FOR_FLOW_CTRL (1 << 3)
  12906. -#define ADV_NO_FLOW_CTRL (0 << 4)
  12907. -#define ADV_SYMMETRIC_FLOW_CTRL (1 << 4)
  12908. -#define FORCE_FC_MODE_NO_PAUSE_DIS_TX (0 << 5)
  12909. -#define FORCE_FC_MODE_TX_PAUSE_DIS (1 << 5)
  12910. -#define FORCE_BP_MODE_NO_JAM (0 << 7)
  12911. -#define FORCE_BP_MODE_JAM_TX (1 << 7)
  12912. -#define FORCE_BP_MODE_JAM_TX_ON_RX_ERR (2 << 7)
  12913. -#define SERIAL_PORT_CONTROL_RESERVED (1 << 9)
  12914. -#define FORCE_LINK_FAIL (0 << 10)
  12915. -#define DO_NOT_FORCE_LINK_FAIL (1 << 10)
  12916. -#define RETRANSMIT_16_ATTEMPTS (0 << 11)
  12917. -#define RETRANSMIT_FOREVER (1 << 11)
  12918. -#define ENABLE_AUTO_NEG_SPEED_GMII (0 << 13)
  12919. -#define DISABLE_AUTO_NEG_SPEED_GMII (1 << 13)
  12920. -#define DTE_ADV_0 (0 << 14)
  12921. -#define DTE_ADV_1 (1 << 14)
  12922. -#define DISABLE_AUTO_NEG_BYPASS (0 << 15)
  12923. -#define ENABLE_AUTO_NEG_BYPASS (1 << 15)
  12924. -#define AUTO_NEG_NO_CHANGE (0 << 16)
  12925. -#define RESTART_AUTO_NEG (1 << 16)
  12926. -#define MAX_RX_PACKET_1518BYTE (0 << 17)
  12927. +
  12928. +/*
  12929. + * Port serial control register.
  12930. + */
  12931. +#define SET_MII_SPEED_TO_100 (1 << 24)
  12932. +#define SET_GMII_SPEED_TO_1000 (1 << 23)
  12933. +#define SET_FULL_DUPLEX_MODE (1 << 21)
  12934. #define MAX_RX_PACKET_1522BYTE (1 << 17)
  12935. -#define MAX_RX_PACKET_1552BYTE (2 << 17)
  12936. -#define MAX_RX_PACKET_9022BYTE (3 << 17)
  12937. -#define MAX_RX_PACKET_9192BYTE (4 << 17)
  12938. #define MAX_RX_PACKET_9700BYTE (5 << 17)
  12939. #define MAX_RX_PACKET_MASK (7 << 17)
  12940. -#define CLR_EXT_LOOPBACK (0 << 20)
  12941. -#define SET_EXT_LOOPBACK (1 << 20)
  12942. -#define SET_HALF_DUPLEX_MODE (0 << 21)
  12943. -#define SET_FULL_DUPLEX_MODE (1 << 21)
  12944. -#define DISABLE_FLOW_CTRL_TX_RX_IN_FULL_DUPLEX (0 << 22)
  12945. -#define ENABLE_FLOW_CTRL_TX_RX_IN_FULL_DUPLEX (1 << 22)
  12946. -#define SET_GMII_SPEED_TO_10_100 (0 << 23)
  12947. -#define SET_GMII_SPEED_TO_1000 (1 << 23)
  12948. -#define SET_MII_SPEED_TO_10 (0 << 24)
  12949. -#define SET_MII_SPEED_TO_100 (1 << 24)
  12950. +#define DISABLE_AUTO_NEG_SPEED_GMII (1 << 13)
  12951. +#define DO_NOT_FORCE_LINK_FAIL (1 << 10)
  12952. +#define SERIAL_PORT_CONTROL_RESERVED (1 << 9)
  12953. +#define DISABLE_AUTO_NEG_FOR_FLOW_CTRL (1 << 3)
  12954. +#define DISABLE_AUTO_NEG_FOR_DUPLEX (1 << 2)
  12955. +#define FORCE_LINK_PASS (1 << 1)
  12956. +#define SERIAL_PORT_ENABLE (1 << 0)
  12957. +
  12958. +#define DEFAULT_RX_QUEUE_SIZE 400
  12959. +#define DEFAULT_TX_QUEUE_SIZE 800
  12960. -#define PORT_SERIAL_CONTROL_DEFAULT_VALUE \
  12961. - DO_NOT_FORCE_LINK_PASS | \
  12962. - ENABLE_AUTO_NEG_FOR_DUPLX | \
  12963. - DISABLE_AUTO_NEG_FOR_FLOW_CTRL | \
  12964. - ADV_SYMMETRIC_FLOW_CTRL | \
  12965. - FORCE_FC_MODE_NO_PAUSE_DIS_TX | \
  12966. - FORCE_BP_MODE_NO_JAM | \
  12967. - (1 << 9) /* reserved */ | \
  12968. - DO_NOT_FORCE_LINK_FAIL | \
  12969. - RETRANSMIT_16_ATTEMPTS | \
  12970. - ENABLE_AUTO_NEG_SPEED_GMII | \
  12971. - DTE_ADV_0 | \
  12972. - DISABLE_AUTO_NEG_BYPASS | \
  12973. - AUTO_NEG_NO_CHANGE | \
  12974. - MAX_RX_PACKET_9700BYTE | \
  12975. - CLR_EXT_LOOPBACK | \
  12976. - SET_FULL_DUPLEX_MODE | \
  12977. - ENABLE_FLOW_CTRL_TX_RX_IN_FULL_DUPLEX
  12978. -
  12979. -/* These macros describe Ethernet Serial Status reg (PSR) bits */
  12980. -#define PORT_STATUS_MODE_10_BIT (1 << 0)
  12981. -#define PORT_STATUS_LINK_UP (1 << 1)
  12982. -#define PORT_STATUS_FULL_DUPLEX (1 << 2)
  12983. -#define PORT_STATUS_FLOW_CONTROL (1 << 3)
  12984. -#define PORT_STATUS_GMII_1000 (1 << 4)
  12985. -#define PORT_STATUS_MII_100 (1 << 5)
  12986. -/* PSR bit 6 is undocumented */
  12987. -#define PORT_STATUS_TX_IN_PROGRESS (1 << 7)
  12988. -#define PORT_STATUS_AUTONEG_BYPASSED (1 << 8)
  12989. -#define PORT_STATUS_PARTITION (1 << 9)
  12990. -#define PORT_STATUS_TX_FIFO_EMPTY (1 << 10)
  12991. -/* PSR bits 11-31 are reserved */
  12992. -
  12993. -#define PORT_DEFAULT_TRANSMIT_QUEUE_SIZE 800
  12994. -#define PORT_DEFAULT_RECEIVE_QUEUE_SIZE 400
  12995. -
  12996. -#define DESC_SIZE 64
  12997. -
  12998. -#define ETH_RX_QUEUES_ENABLED (1 << 0) /* use only Q0 for receive */
  12999. -#define ETH_TX_QUEUES_ENABLED (1 << 0) /* use only Q0 for transmit */
  13000. -
  13001. -#define ETH_INT_CAUSE_RX_DONE (ETH_RX_QUEUES_ENABLED << 2)
  13002. -#define ETH_INT_CAUSE_RX_ERROR (ETH_RX_QUEUES_ENABLED << 9)
  13003. -#define ETH_INT_CAUSE_RX (ETH_INT_CAUSE_RX_DONE | ETH_INT_CAUSE_RX_ERROR)
  13004. -#define ETH_INT_CAUSE_EXT 0x00000002
  13005. -#define ETH_INT_UNMASK_ALL (ETH_INT_CAUSE_RX | ETH_INT_CAUSE_EXT)
  13006. -
  13007. -#define ETH_INT_CAUSE_TX_DONE (ETH_TX_QUEUES_ENABLED << 0)
  13008. -#define ETH_INT_CAUSE_TX_ERROR (ETH_TX_QUEUES_ENABLED << 8)
  13009. -#define ETH_INT_CAUSE_TX (ETH_INT_CAUSE_TX_DONE | ETH_INT_CAUSE_TX_ERROR)
  13010. -#define ETH_INT_CAUSE_PHY 0x00010000
  13011. -#define ETH_INT_CAUSE_STATE 0x00100000
  13012. -#define ETH_INT_UNMASK_ALL_EXT (ETH_INT_CAUSE_TX | ETH_INT_CAUSE_PHY | \
  13013. - ETH_INT_CAUSE_STATE)
  13014. -
  13015. -#define ETH_INT_MASK_ALL 0x00000000
  13016. -#define ETH_INT_MASK_ALL_EXT 0x00000000
  13017. -
  13018. -#define PHY_WAIT_ITERATIONS 1000 /* 1000 iterations * 10uS = 10mS max */
  13019. -#define PHY_WAIT_MICRO_SECONDS 10
  13020. -
  13021. -/* Buffer offset from buffer pointer */
  13022. -#define RX_BUF_OFFSET 0x2
  13023. -
  13024. -/* Gigabit Ethernet Unit Global Registers */
  13025. -
  13026. -/* MIB Counters register definitions */
  13027. -#define ETH_MIB_GOOD_OCTETS_RECEIVED_LOW 0x0
  13028. -#define ETH_MIB_GOOD_OCTETS_RECEIVED_HIGH 0x4
  13029. -#define ETH_MIB_BAD_OCTETS_RECEIVED 0x8
  13030. -#define ETH_MIB_INTERNAL_MAC_TRANSMIT_ERR 0xc
  13031. -#define ETH_MIB_GOOD_FRAMES_RECEIVED 0x10
  13032. -#define ETH_MIB_BAD_FRAMES_RECEIVED 0x14
  13033. -#define ETH_MIB_BROADCAST_FRAMES_RECEIVED 0x18
  13034. -#define ETH_MIB_MULTICAST_FRAMES_RECEIVED 0x1c
  13035. -#define ETH_MIB_FRAMES_64_OCTETS 0x20
  13036. -#define ETH_MIB_FRAMES_65_TO_127_OCTETS 0x24
  13037. -#define ETH_MIB_FRAMES_128_TO_255_OCTETS 0x28
  13038. -#define ETH_MIB_FRAMES_256_TO_511_OCTETS 0x2c
  13039. -#define ETH_MIB_FRAMES_512_TO_1023_OCTETS 0x30
  13040. -#define ETH_MIB_FRAMES_1024_TO_MAX_OCTETS 0x34
  13041. -#define ETH_MIB_GOOD_OCTETS_SENT_LOW 0x38
  13042. -#define ETH_MIB_GOOD_OCTETS_SENT_HIGH 0x3c
  13043. -#define ETH_MIB_GOOD_FRAMES_SENT 0x40
  13044. -#define ETH_MIB_EXCESSIVE_COLLISION 0x44
  13045. -#define ETH_MIB_MULTICAST_FRAMES_SENT 0x48
  13046. -#define ETH_MIB_BROADCAST_FRAMES_SENT 0x4c
  13047. -#define ETH_MIB_UNREC_MAC_CONTROL_RECEIVED 0x50
  13048. -#define ETH_MIB_FC_SENT 0x54
  13049. -#define ETH_MIB_GOOD_FC_RECEIVED 0x58
  13050. -#define ETH_MIB_BAD_FC_RECEIVED 0x5c
  13051. -#define ETH_MIB_UNDERSIZE_RECEIVED 0x60
  13052. -#define ETH_MIB_FRAGMENTS_RECEIVED 0x64
  13053. -#define ETH_MIB_OVERSIZE_RECEIVED 0x68
  13054. -#define ETH_MIB_JABBER_RECEIVED 0x6c
  13055. -#define ETH_MIB_MAC_RECEIVE_ERROR 0x70
  13056. -#define ETH_MIB_BAD_CRC_EVENT 0x74
  13057. -#define ETH_MIB_COLLISION 0x78
  13058. -#define ETH_MIB_LATE_COLLISION 0x7c
  13059. -
  13060. -/* Port serial status reg (PSR) */
  13061. -#define ETH_INTERFACE_PCM 0x00000001
  13062. -#define ETH_LINK_IS_UP 0x00000002
  13063. -#define ETH_PORT_AT_FULL_DUPLEX 0x00000004
  13064. -#define ETH_RX_FLOW_CTRL_ENABLED 0x00000008
  13065. -#define ETH_GMII_SPEED_1000 0x00000010
  13066. -#define ETH_MII_SPEED_100 0x00000020
  13067. -#define ETH_TX_IN_PROGRESS 0x00000080
  13068. -#define ETH_BYPASS_ACTIVE 0x00000100
  13069. -#define ETH_PORT_AT_PARTITION_STATE 0x00000200
  13070. -#define ETH_PORT_TX_FIFO_EMPTY 0x00000400
  13071. -
  13072. -/* SMI reg */
  13073. -#define ETH_SMI_BUSY 0x10000000 /* 0 - Write, 1 - Read */
  13074. -#define ETH_SMI_READ_VALID 0x08000000 /* 0 - Write, 1 - Read */
  13075. -#define ETH_SMI_OPCODE_WRITE 0 /* Completion of Read */
  13076. -#define ETH_SMI_OPCODE_READ 0x04000000 /* Operation is in progress */
  13077. -
  13078. -/* Interrupt Cause Register Bit Definitions */
  13079. -
  13080. -/* SDMA command status fields macros */
  13081. -
  13082. -/* Tx & Rx descriptors status */
  13083. -#define ETH_ERROR_SUMMARY 0x00000001
  13084. -
  13085. -/* Tx & Rx descriptors command */
  13086. -#define ETH_BUFFER_OWNED_BY_DMA 0x80000000
  13087. -
  13088. -/* Tx descriptors status */
  13089. -#define ETH_LC_ERROR 0
  13090. -#define ETH_UR_ERROR 0x00000002
  13091. -#define ETH_RL_ERROR 0x00000004
  13092. -#define ETH_LLC_SNAP_FORMAT 0x00000200
  13093. -
  13094. -/* Rx descriptors status */
  13095. -#define ETH_OVERRUN_ERROR 0x00000002
  13096. -#define ETH_MAX_FRAME_LENGTH_ERROR 0x00000004
  13097. -#define ETH_RESOURCE_ERROR 0x00000006
  13098. -#define ETH_VLAN_TAGGED 0x00080000
  13099. -#define ETH_BPDU_FRAME 0x00100000
  13100. -#define ETH_UDP_FRAME_OVER_IP_V_4 0x00200000
  13101. -#define ETH_OTHER_FRAME_TYPE 0x00400000
  13102. -#define ETH_LAYER_2_IS_ETH_V_2 0x00800000
  13103. -#define ETH_FRAME_TYPE_IP_V_4 0x01000000
  13104. -#define ETH_FRAME_HEADER_OK 0x02000000
  13105. -#define ETH_RX_LAST_DESC 0x04000000
  13106. -#define ETH_RX_FIRST_DESC 0x08000000
  13107. -#define ETH_UNKNOWN_DESTINATION_ADDR 0x10000000
  13108. -#define ETH_RX_ENABLE_INTERRUPT 0x20000000
  13109. -#define ETH_LAYER_4_CHECKSUM_OK 0x40000000
  13110. -
  13111. -/* Rx descriptors byte count */
  13112. -#define ETH_FRAME_FRAGMENTED 0x00000004
  13113. -
  13114. -/* Tx descriptors command */
  13115. -#define ETH_LAYER_4_CHECKSUM_FIRST_DESC 0x00000400
  13116. -#define ETH_FRAME_SET_TO_VLAN 0x00008000
  13117. -#define ETH_UDP_FRAME 0x00010000
  13118. -#define ETH_GEN_TCP_UDP_CHECKSUM 0x00020000
  13119. -#define ETH_GEN_IP_V_4_CHECKSUM 0x00040000
  13120. -#define ETH_ZERO_PADDING 0x00080000
  13121. -#define ETH_TX_LAST_DESC 0x00100000
  13122. -#define ETH_TX_FIRST_DESC 0x00200000
  13123. -#define ETH_GEN_CRC 0x00400000
  13124. -#define ETH_TX_ENABLE_INTERRUPT 0x00800000
  13125. -#define ETH_AUTO_MODE 0x40000000
  13126. -
  13127. -#define ETH_TX_IHL_SHIFT 11
  13128. -
  13129. -/* typedefs */
  13130. -
  13131. -typedef enum _eth_func_ret_status {
  13132. - ETH_OK, /* Returned as expected. */
  13133. - ETH_ERROR, /* Fundamental error. */
  13134. - ETH_RETRY, /* Could not process request. Try later.*/
  13135. - ETH_END_OF_JOB, /* Ring has nothing to process. */
  13136. - ETH_QUEUE_FULL, /* Ring resource error. */
  13137. - ETH_QUEUE_LAST_RESOURCE /* Ring resources about to exhaust. */
  13138. -} ETH_FUNC_RET_STATUS;
  13139. -/* These are for big-endian machines. Little endian needs different
  13140. - * definitions.
  13141. +/*
  13142. + * RX/TX descriptors.
  13143. */
  13144. #if defined(__BIG_ENDIAN)
  13145. -struct eth_rx_desc {
  13146. +struct rx_desc {
  13147. u16 byte_cnt; /* Descriptor buffer byte count */
  13148. u16 buf_size; /* Buffer size */
  13149. u32 cmd_sts; /* Descriptor command status */
  13150. @@ -441,7 +180,7 @@
  13151. u32 buf_ptr; /* Descriptor buffer pointer */
  13152. };
  13153. -struct eth_tx_desc {
  13154. +struct tx_desc {
  13155. u16 byte_cnt; /* buffer byte count */
  13156. u16 l4i_chk; /* CPU provided TCP checksum */
  13157. u32 cmd_sts; /* Command/status field */
  13158. @@ -449,7 +188,7 @@
  13159. u32 buf_ptr; /* pointer to buffer for this descriptor*/
  13160. };
  13161. #elif defined(__LITTLE_ENDIAN)
  13162. -struct eth_rx_desc {
  13163. +struct rx_desc {
  13164. u32 cmd_sts; /* Descriptor command status */
  13165. u16 buf_size; /* Buffer size */
  13166. u16 byte_cnt; /* Descriptor buffer byte count */
  13167. @@ -457,7 +196,7 @@
  13168. u32 next_desc_ptr; /* Next descriptor pointer */
  13169. };
  13170. -struct eth_tx_desc {
  13171. +struct tx_desc {
  13172. u32 cmd_sts; /* Command/status field */
  13173. u16 l4i_chk; /* CPU provided TCP checksum */
  13174. u16 byte_cnt; /* buffer byte count */
  13175. @@ -468,18 +207,59 @@
  13176. #error One of __BIG_ENDIAN or __LITTLE_ENDIAN must be defined
  13177. #endif
  13178. -/* Unified struct for Rx and Tx operations. The user is not required to */
  13179. -/* be familier with neither Tx nor Rx descriptors. */
  13180. -struct pkt_info {
  13181. - unsigned short byte_cnt; /* Descriptor buffer byte count */
  13182. - unsigned short l4i_chk; /* Tx CPU provided TCP Checksum */
  13183. - unsigned int cmd_sts; /* Descriptor command status */
  13184. - dma_addr_t buf_ptr; /* Descriptor buffer pointer */
  13185. - struct sk_buff *return_info; /* User resource return information */
  13186. +/* RX & TX descriptor command */
  13187. +#define BUFFER_OWNED_BY_DMA 0x80000000
  13188. +
  13189. +/* RX & TX descriptor status */
  13190. +#define ERROR_SUMMARY 0x00000001
  13191. +
  13192. +/* RX descriptor status */
  13193. +#define LAYER_4_CHECKSUM_OK 0x40000000
  13194. +#define RX_ENABLE_INTERRUPT 0x20000000
  13195. +#define RX_FIRST_DESC 0x08000000
  13196. +#define RX_LAST_DESC 0x04000000
  13197. +
  13198. +/* TX descriptor command */
  13199. +#define TX_ENABLE_INTERRUPT 0x00800000
  13200. +#define GEN_CRC 0x00400000
  13201. +#define TX_FIRST_DESC 0x00200000
  13202. +#define TX_LAST_DESC 0x00100000
  13203. +#define ZERO_PADDING 0x00080000
  13204. +#define GEN_IP_V4_CHECKSUM 0x00040000
  13205. +#define GEN_TCP_UDP_CHECKSUM 0x00020000
  13206. +#define UDP_FRAME 0x00010000
  13207. +
  13208. +#define TX_IHL_SHIFT 11
  13209. +
  13210. +
  13211. +/* global *******************************************************************/
  13212. +struct mv643xx_eth_shared_private {
  13213. + /*
  13214. + * Ethernet controller base address.
  13215. + */
  13216. + void __iomem *base;
  13217. +
  13218. + /*
  13219. + * Protects access to SMI_REG, which is shared between ports.
  13220. + */
  13221. + spinlock_t phy_lock;
  13222. +
  13223. + /*
  13224. + * Per-port MBUS window access register value.
  13225. + */
  13226. + u32 win_protect;
  13227. +
  13228. + /*
  13229. + * Hardware-specific parameters.
  13230. + */
  13231. + unsigned int t_clk;
  13232. + int extended_rx_coal_limit;
  13233. + int tx_bw_control_moved;
  13234. };
  13235. -/* Ethernet port specific information */
  13236. -struct mv643xx_mib_counters {
  13237. +
  13238. +/* per-port *****************************************************************/
  13239. +struct mib_counters {
  13240. u64 good_octets_received;
  13241. u32 bad_octets_received;
  13242. u32 internal_mac_transmit_err;
  13243. @@ -512,461 +292,282 @@
  13244. u32 late_collision;
  13245. };
  13246. -struct mv643xx_shared_private {
  13247. - void __iomem *eth_base;
  13248. -
  13249. - /* used to protect SMI_REG, which is shared across ports */
  13250. - spinlock_t phy_lock;
  13251. -
  13252. - u32 win_protect;
  13253. -
  13254. - unsigned int t_clk;
  13255. -};
  13256. -
  13257. -struct mv643xx_private {
  13258. - struct mv643xx_shared_private *shared;
  13259. - int port_num; /* User Ethernet port number */
  13260. -
  13261. - struct mv643xx_shared_private *shared_smi;
  13262. +struct rx_queue {
  13263. + int index;
  13264. - u32 rx_sram_addr; /* Base address of rx sram area */
  13265. - u32 rx_sram_size; /* Size of rx sram area */
  13266. - u32 tx_sram_addr; /* Base address of tx sram area */
  13267. - u32 tx_sram_size; /* Size of tx sram area */
  13268. + int rx_ring_size;
  13269. - int rx_resource_err; /* Rx ring resource error flag */
  13270. + int rx_desc_count;
  13271. + int rx_curr_desc;
  13272. + int rx_used_desc;
  13273. - /* Tx/Rx rings managment indexes fields. For driver use */
  13274. + struct rx_desc *rx_desc_area;
  13275. + dma_addr_t rx_desc_dma;
  13276. + int rx_desc_area_size;
  13277. + struct sk_buff **rx_skb;
  13278. - /* Next available and first returning Rx resource */
  13279. - int rx_curr_desc_q, rx_used_desc_q;
  13280. + struct timer_list rx_oom;
  13281. +};
  13282. - /* Next available and first returning Tx resource */
  13283. - int tx_curr_desc_q, tx_used_desc_q;
  13284. +struct tx_queue {
  13285. + int index;
  13286. -#ifdef MV643XX_TX_FAST_REFILL
  13287. - u32 tx_clean_threshold;
  13288. -#endif
  13289. + int tx_ring_size;
  13290. - struct eth_rx_desc *p_rx_desc_area;
  13291. - dma_addr_t rx_desc_dma;
  13292. - int rx_desc_area_size;
  13293. - struct sk_buff **rx_skb;
  13294. + int tx_desc_count;
  13295. + int tx_curr_desc;
  13296. + int tx_used_desc;
  13297. - struct eth_tx_desc *p_tx_desc_area;
  13298. + struct tx_desc *tx_desc_area;
  13299. dma_addr_t tx_desc_dma;
  13300. int tx_desc_area_size;
  13301. struct sk_buff **tx_skb;
  13302. +};
  13303. - struct work_struct tx_timeout_task;
  13304. +struct mv643xx_eth_private {
  13305. + struct mv643xx_eth_shared_private *shared;
  13306. + int port_num;
  13307. struct net_device *dev;
  13308. - struct napi_struct napi;
  13309. - struct net_device_stats stats;
  13310. - struct mv643xx_mib_counters mib_counters;
  13311. +
  13312. + struct mv643xx_eth_shared_private *shared_smi;
  13313. + int phy_addr;
  13314. +
  13315. spinlock_t lock;
  13316. - /* Size of Tx Ring per queue */
  13317. - int tx_ring_size;
  13318. - /* Number of tx descriptors in use */
  13319. - int tx_desc_count;
  13320. - /* Size of Rx Ring per queue */
  13321. - int rx_ring_size;
  13322. - /* Number of rx descriptors in use */
  13323. - int rx_desc_count;
  13324. +
  13325. + struct mib_counters mib_counters;
  13326. + struct work_struct tx_timeout_task;
  13327. + struct mii_if_info mii;
  13328. /*
  13329. - * Used in case RX Ring is empty, which can be caused when
  13330. - * system does not have resources (skb's)
  13331. + * RX state.
  13332. */
  13333. - struct timer_list timeout;
  13334. -
  13335. - u32 rx_int_coal;
  13336. - u32 tx_int_coal;
  13337. - struct mii_if_info mii;
  13338. -};
  13339. + int default_rx_ring_size;
  13340. + unsigned long rx_desc_sram_addr;
  13341. + int rx_desc_sram_size;
  13342. + u8 rxq_mask;
  13343. + int rxq_primary;
  13344. + struct napi_struct napi;
  13345. + struct rx_queue rxq[8];
  13346. -/* Static function declarations */
  13347. -static void eth_port_init(struct mv643xx_private *mp);
  13348. -static void eth_port_reset(struct mv643xx_private *mp);
  13349. -static void eth_port_start(struct net_device *dev);
  13350. -
  13351. -static void ethernet_phy_reset(struct mv643xx_private *mp);
  13352. -
  13353. -static void eth_port_write_smi_reg(struct mv643xx_private *mp,
  13354. - unsigned int phy_reg, unsigned int value);
  13355. -
  13356. -static void eth_port_read_smi_reg(struct mv643xx_private *mp,
  13357. - unsigned int phy_reg, unsigned int *value);
  13358. -
  13359. -static void eth_clear_mib_counters(struct mv643xx_private *mp);
  13360. -
  13361. -static ETH_FUNC_RET_STATUS eth_port_receive(struct mv643xx_private *mp,
  13362. - struct pkt_info *p_pkt_info);
  13363. -static ETH_FUNC_RET_STATUS eth_rx_return_buff(struct mv643xx_private *mp,
  13364. - struct pkt_info *p_pkt_info);
  13365. -
  13366. -static void eth_port_uc_addr_get(struct mv643xx_private *mp,
  13367. - unsigned char *p_addr);
  13368. -static void eth_port_uc_addr_set(struct mv643xx_private *mp,
  13369. - unsigned char *p_addr);
  13370. -static void eth_port_set_multicast_list(struct net_device *);
  13371. -static void mv643xx_eth_port_enable_tx(struct mv643xx_private *mp,
  13372. - unsigned int queues);
  13373. -static void mv643xx_eth_port_enable_rx(struct mv643xx_private *mp,
  13374. - unsigned int queues);
  13375. -static unsigned int mv643xx_eth_port_disable_tx(struct mv643xx_private *mp);
  13376. -static unsigned int mv643xx_eth_port_disable_rx(struct mv643xx_private *mp);
  13377. -static int mv643xx_eth_open(struct net_device *);
  13378. -static int mv643xx_eth_stop(struct net_device *);
  13379. -static void eth_port_init_mac_tables(struct mv643xx_private *mp);
  13380. -#ifdef MV643XX_NAPI
  13381. -static int mv643xx_poll(struct napi_struct *napi, int budget);
  13382. + /*
  13383. + * TX state.
  13384. + */
  13385. + int default_tx_ring_size;
  13386. + unsigned long tx_desc_sram_addr;
  13387. + int tx_desc_sram_size;
  13388. + u8 txq_mask;
  13389. + int txq_primary;
  13390. + struct tx_queue txq[8];
  13391. +#ifdef MV643XX_ETH_TX_FAST_REFILL
  13392. + int tx_clean_threshold;
  13393. #endif
  13394. -static int ethernet_phy_get(struct mv643xx_private *mp);
  13395. -static void ethernet_phy_set(struct mv643xx_private *mp, int phy_addr);
  13396. -static int ethernet_phy_detect(struct mv643xx_private *mp);
  13397. -static int mv643xx_mdio_read(struct net_device *dev, int phy_id, int location);
  13398. -static void mv643xx_mdio_write(struct net_device *dev, int phy_id, int location, int val);
  13399. -static int mv643xx_eth_do_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd);
  13400. -static const struct ethtool_ops mv643xx_ethtool_ops;
  13401. +};
  13402. -static char mv643xx_driver_name[] = "mv643xx_eth";
  13403. -static char mv643xx_driver_version[] = "1.0";
  13404. -static inline u32 rdl(struct mv643xx_private *mp, int offset)
  13405. +/* port register accessors **************************************************/
  13406. +static inline u32 rdl(struct mv643xx_eth_private *mp, int offset)
  13407. {
  13408. - return readl(mp->shared->eth_base + offset);
  13409. + return readl(mp->shared->base + offset);
  13410. }
  13411. -static inline void wrl(struct mv643xx_private *mp, int offset, u32 data)
  13412. +static inline void wrl(struct mv643xx_eth_private *mp, int offset, u32 data)
  13413. {
  13414. - writel(data, mp->shared->eth_base + offset);
  13415. + writel(data, mp->shared->base + offset);
  13416. }
  13417. -/*
  13418. - * Changes MTU (maximum transfer unit) of the gigabit ethenret port
  13419. - *
  13420. - * Input : pointer to ethernet interface network device structure
  13421. - * new mtu size
  13422. - * Output : 0 upon success, -EINVAL upon failure
  13423. - */
  13424. -static int mv643xx_eth_change_mtu(struct net_device *dev, int new_mtu)
  13425. -{
  13426. - if ((new_mtu > 9500) || (new_mtu < 64))
  13427. - return -EINVAL;
  13428. -
  13429. - dev->mtu = new_mtu;
  13430. - if (!netif_running(dev))
  13431. - return 0;
  13432. -
  13433. - /*
  13434. - * Stop and then re-open the interface. This will allocate RX
  13435. - * skbs of the new MTU.
  13436. - * There is a possible danger that the open will not succeed,
  13437. - * due to memory being full, which might fail the open function.
  13438. - */
  13439. - mv643xx_eth_stop(dev);
  13440. - if (mv643xx_eth_open(dev)) {
  13441. - printk(KERN_ERR "%s: Fatal error on opening device\n",
  13442. - dev->name);
  13443. - }
  13444. -
  13445. - return 0;
  13446. -}
  13447. -/*
  13448. - * mv643xx_eth_rx_refill_descs
  13449. - *
  13450. - * Fills / refills RX queue on a certain gigabit ethernet port
  13451. - *
  13452. - * Input : pointer to ethernet interface network device structure
  13453. - * Output : N/A
  13454. - */
  13455. -static void mv643xx_eth_rx_refill_descs(struct net_device *dev)
  13456. +/* rxq/txq helper functions *************************************************/
  13457. +static struct mv643xx_eth_private *rxq_to_mp(struct rx_queue *rxq)
  13458. {
  13459. - struct mv643xx_private *mp = netdev_priv(dev);
  13460. - struct pkt_info pkt_info;
  13461. - struct sk_buff *skb;
  13462. - int unaligned;
  13463. -
  13464. - while (mp->rx_desc_count < mp->rx_ring_size) {
  13465. - skb = dev_alloc_skb(ETH_RX_SKB_SIZE + dma_get_cache_alignment());
  13466. - if (!skb)
  13467. - break;
  13468. - mp->rx_desc_count++;
  13469. - unaligned = (u32)skb->data & (dma_get_cache_alignment() - 1);
  13470. - if (unaligned)
  13471. - skb_reserve(skb, dma_get_cache_alignment() - unaligned);
  13472. - pkt_info.cmd_sts = ETH_RX_ENABLE_INTERRUPT;
  13473. - pkt_info.byte_cnt = ETH_RX_SKB_SIZE;
  13474. - pkt_info.buf_ptr = dma_map_single(NULL, skb->data,
  13475. - ETH_RX_SKB_SIZE, DMA_FROM_DEVICE);
  13476. - pkt_info.return_info = skb;
  13477. - if (eth_rx_return_buff(mp, &pkt_info) != ETH_OK) {
  13478. - printk(KERN_ERR
  13479. - "%s: Error allocating RX Ring\n", dev->name);
  13480. - break;
  13481. - }
  13482. - skb_reserve(skb, ETH_HW_IP_ALIGN);
  13483. - }
  13484. - /*
  13485. - * If RX ring is empty of SKB, set a timer to try allocating
  13486. - * again at a later time.
  13487. - */
  13488. - if (mp->rx_desc_count == 0) {
  13489. - printk(KERN_INFO "%s: Rx ring is empty\n", dev->name);
  13490. - mp->timeout.expires = jiffies + (HZ / 10); /* 100 mSec */
  13491. - add_timer(&mp->timeout);
  13492. - }
  13493. + return container_of(rxq, struct mv643xx_eth_private, rxq[rxq->index]);
  13494. }
  13495. -/*
  13496. - * mv643xx_eth_rx_refill_descs_timer_wrapper
  13497. - *
  13498. - * Timer routine to wake up RX queue filling task. This function is
  13499. - * used only in case the RX queue is empty, and all alloc_skb has
  13500. - * failed (due to out of memory event).
  13501. - *
  13502. - * Input : pointer to ethernet interface network device structure
  13503. - * Output : N/A
  13504. - */
  13505. -static inline void mv643xx_eth_rx_refill_descs_timer_wrapper(unsigned long data)
  13506. +static struct mv643xx_eth_private *txq_to_mp(struct tx_queue *txq)
  13507. {
  13508. - mv643xx_eth_rx_refill_descs((struct net_device *)data);
  13509. + return container_of(txq, struct mv643xx_eth_private, txq[txq->index]);
  13510. }
  13511. -/*
  13512. - * mv643xx_eth_update_mac_address
  13513. - *
  13514. - * Update the MAC address of the port in the address table
  13515. - *
  13516. - * Input : pointer to ethernet interface network device structure
  13517. - * Output : N/A
  13518. - */
  13519. -static void mv643xx_eth_update_mac_address(struct net_device *dev)
  13520. +static void rxq_enable(struct rx_queue *rxq)
  13521. {
  13522. - struct mv643xx_private *mp = netdev_priv(dev);
  13523. -
  13524. - eth_port_init_mac_tables(mp);
  13525. - eth_port_uc_addr_set(mp, dev->dev_addr);
  13526. + struct mv643xx_eth_private *mp = rxq_to_mp(rxq);
  13527. + wrl(mp, RXQ_COMMAND(mp->port_num), 1 << rxq->index);
  13528. }
  13529. -/*
  13530. - * mv643xx_eth_set_rx_mode
  13531. - *
  13532. - * Change from promiscuos to regular rx mode
  13533. - *
  13534. - * Input : pointer to ethernet interface network device structure
  13535. - * Output : N/A
  13536. - */
  13537. -static void mv643xx_eth_set_rx_mode(struct net_device *dev)
  13538. +static void rxq_disable(struct rx_queue *rxq)
  13539. {
  13540. - struct mv643xx_private *mp = netdev_priv(dev);
  13541. - u32 config_reg;
  13542. -
  13543. - config_reg = rdl(mp, PORT_CONFIG_REG(mp->port_num));
  13544. - if (dev->flags & IFF_PROMISC)
  13545. - config_reg |= (u32) UNICAST_PROMISCUOUS_MODE;
  13546. - else
  13547. - config_reg &= ~(u32) UNICAST_PROMISCUOUS_MODE;
  13548. - wrl(mp, PORT_CONFIG_REG(mp->port_num), config_reg);
  13549. + struct mv643xx_eth_private *mp = rxq_to_mp(rxq);
  13550. + u8 mask = 1 << rxq->index;
  13551. - eth_port_set_multicast_list(dev);
  13552. + wrl(mp, RXQ_COMMAND(mp->port_num), mask << 8);
  13553. + while (rdl(mp, RXQ_COMMAND(mp->port_num)) & mask)
  13554. + udelay(10);
  13555. }
  13556. -/*
  13557. - * mv643xx_eth_set_mac_address
  13558. - *
  13559. - * Change the interface's mac address.
  13560. - * No special hardware thing should be done because interface is always
  13561. - * put in promiscuous mode.
  13562. - *
  13563. - * Input : pointer to ethernet interface network device structure and
  13564. - * a pointer to the designated entry to be added to the cache.
  13565. - * Output : zero upon success, negative upon failure
  13566. - */
  13567. -static int mv643xx_eth_set_mac_address(struct net_device *dev, void *addr)
  13568. +static void txq_enable(struct tx_queue *txq)
  13569. {
  13570. - int i;
  13571. -
  13572. - for (i = 0; i < 6; i++)
  13573. - /* +2 is for the offset of the HW addr type */
  13574. - dev->dev_addr[i] = ((unsigned char *)addr)[i + 2];
  13575. - mv643xx_eth_update_mac_address(dev);
  13576. - return 0;
  13577. + struct mv643xx_eth_private *mp = txq_to_mp(txq);
  13578. + wrl(mp, TXQ_COMMAND(mp->port_num), 1 << txq->index);
  13579. }
  13580. -/*
  13581. - * mv643xx_eth_tx_timeout
  13582. - *
  13583. - * Called upon a timeout on transmitting a packet
  13584. - *
  13585. - * Input : pointer to ethernet interface network device structure.
  13586. - * Output : N/A
  13587. - */
  13588. -static void mv643xx_eth_tx_timeout(struct net_device *dev)
  13589. +static void txq_disable(struct tx_queue *txq)
  13590. {
  13591. - struct mv643xx_private *mp = netdev_priv(dev);
  13592. -
  13593. - printk(KERN_INFO "%s: TX timeout ", dev->name);
  13594. + struct mv643xx_eth_private *mp = txq_to_mp(txq);
  13595. + u8 mask = 1 << txq->index;
  13596. - /* Do the reset outside of interrupt context */
  13597. - schedule_work(&mp->tx_timeout_task);
  13598. + wrl(mp, TXQ_COMMAND(mp->port_num), mask << 8);
  13599. + while (rdl(mp, TXQ_COMMAND(mp->port_num)) & mask)
  13600. + udelay(10);
  13601. }
  13602. -/*
  13603. - * mv643xx_eth_tx_timeout_task
  13604. - *
  13605. - * Actual routine to reset the adapter when a timeout on Tx has occurred
  13606. - */
  13607. -static void mv643xx_eth_tx_timeout_task(struct work_struct *ugly)
  13608. +static void __txq_maybe_wake(struct tx_queue *txq)
  13609. {
  13610. - struct mv643xx_private *mp = container_of(ugly, struct mv643xx_private,
  13611. - tx_timeout_task);
  13612. - struct net_device *dev = mp->dev;
  13613. + struct mv643xx_eth_private *mp = txq_to_mp(txq);
  13614. - if (!netif_running(dev))
  13615. - return;
  13616. + /*
  13617. + * netif_{stop,wake}_queue() flow control only applies to
  13618. + * the primary queue.
  13619. + */
  13620. + BUG_ON(txq->index != mp->txq_primary);
  13621. - netif_stop_queue(dev);
  13622. + if (txq->tx_ring_size - txq->tx_desc_count >= MAX_DESCS_PER_SKB)
  13623. + netif_wake_queue(mp->dev);
  13624. +}
  13625. - eth_port_reset(mp);
  13626. - eth_port_start(dev);
  13627. - if (mp->tx_ring_size - mp->tx_desc_count >= MAX_DESCS_PER_SKB)
  13628. - netif_wake_queue(dev);
  13629. -}
  13630. +/* rx ***********************************************************************/
  13631. +static void txq_reclaim(struct tx_queue *txq, int force);
  13632. -/**
  13633. - * mv643xx_eth_free_tx_descs - Free the tx desc data for completed descriptors
  13634. - *
  13635. - * If force is non-zero, frees uncompleted descriptors as well
  13636. - */
  13637. -static int mv643xx_eth_free_tx_descs(struct net_device *dev, int force)
  13638. +static void rxq_refill(struct rx_queue *rxq)
  13639. {
  13640. - struct mv643xx_private *mp = netdev_priv(dev);
  13641. - struct eth_tx_desc *desc;
  13642. - u32 cmd_sts;
  13643. - struct sk_buff *skb;
  13644. + struct mv643xx_eth_private *mp = rxq_to_mp(rxq);
  13645. unsigned long flags;
  13646. - int tx_index;
  13647. - dma_addr_t addr;
  13648. - int count;
  13649. - int released = 0;
  13650. -
  13651. - while (mp->tx_desc_count > 0) {
  13652. - spin_lock_irqsave(&mp->lock, flags);
  13653. -
  13654. - /* tx_desc_count might have changed before acquiring the lock */
  13655. - if (mp->tx_desc_count <= 0) {
  13656. - spin_unlock_irqrestore(&mp->lock, flags);
  13657. - return released;
  13658. - }
  13659. -
  13660. - tx_index = mp->tx_used_desc_q;
  13661. - desc = &mp->p_tx_desc_area[tx_index];
  13662. - cmd_sts = desc->cmd_sts;
  13663. - if (!force && (cmd_sts & ETH_BUFFER_OWNED_BY_DMA)) {
  13664. - spin_unlock_irqrestore(&mp->lock, flags);
  13665. - return released;
  13666. - }
  13667. + spin_lock_irqsave(&mp->lock, flags);
  13668. - mp->tx_used_desc_q = (tx_index + 1) % mp->tx_ring_size;
  13669. - mp->tx_desc_count--;
  13670. + while (rxq->rx_desc_count < rxq->rx_ring_size) {
  13671. + int skb_size;
  13672. + struct sk_buff *skb;
  13673. + int unaligned;
  13674. + int rx;
  13675. - addr = desc->buf_ptr;
  13676. - count = desc->byte_cnt;
  13677. - skb = mp->tx_skb[tx_index];
  13678. - if (skb)
  13679. - mp->tx_skb[tx_index] = NULL;
  13680. + /*
  13681. + * Reserve 2+14 bytes for an ethernet header (the
  13682. + * hardware automatically prepends 2 bytes of dummy
  13683. + * data to each received packet), 4 bytes for a VLAN
  13684. + * header, and 4 bytes for the trailing FCS -- 24
  13685. + * bytes total.
  13686. + */
  13687. + skb_size = mp->dev->mtu + 24;
  13688. - if (cmd_sts & ETH_ERROR_SUMMARY) {
  13689. - printk("%s: Error in TX\n", dev->name);
  13690. - dev->stats.tx_errors++;
  13691. - }
  13692. + skb = dev_alloc_skb(skb_size + dma_get_cache_alignment() - 1);
  13693. + if (skb == NULL)
  13694. + break;
  13695. - spin_unlock_irqrestore(&mp->lock, flags);
  13696. + unaligned = (u32)skb->data & (dma_get_cache_alignment() - 1);
  13697. + if (unaligned)
  13698. + skb_reserve(skb, dma_get_cache_alignment() - unaligned);
  13699. - if (cmd_sts & ETH_TX_FIRST_DESC)
  13700. - dma_unmap_single(NULL, addr, count, DMA_TO_DEVICE);
  13701. - else
  13702. - dma_unmap_page(NULL, addr, count, DMA_TO_DEVICE);
  13703. + rxq->rx_desc_count++;
  13704. + rx = rxq->rx_used_desc;
  13705. + rxq->rx_used_desc = (rx + 1) % rxq->rx_ring_size;
  13706. +
  13707. + rxq->rx_desc_area[rx].buf_ptr = dma_map_single(NULL, skb->data,
  13708. + skb_size, DMA_FROM_DEVICE);
  13709. + rxq->rx_desc_area[rx].buf_size = skb_size;
  13710. + rxq->rx_skb[rx] = skb;
  13711. + wmb();
  13712. + rxq->rx_desc_area[rx].cmd_sts = BUFFER_OWNED_BY_DMA |
  13713. + RX_ENABLE_INTERRUPT;
  13714. + wmb();
  13715. - if (skb)
  13716. - dev_kfree_skb_irq(skb);
  13717. + /*
  13718. + * The hardware automatically prepends 2 bytes of
  13719. + * dummy data to each received packet, so that the
  13720. + * IP header ends up 16-byte aligned.
  13721. + */
  13722. + skb_reserve(skb, 2);
  13723. + }
  13724. - released = 1;
  13725. + if (rxq->rx_desc_count != rxq->rx_ring_size) {
  13726. + rxq->rx_oom.expires = jiffies + (HZ / 10);
  13727. + add_timer(&rxq->rx_oom);
  13728. }
  13729. - return released;
  13730. + spin_unlock_irqrestore(&mp->lock, flags);
  13731. }
  13732. -static void mv643xx_eth_free_completed_tx_descs(struct net_device *dev)
  13733. +static inline void rxq_refill_timer_wrapper(unsigned long data)
  13734. {
  13735. - struct mv643xx_private *mp = netdev_priv(dev);
  13736. -
  13737. - if (mv643xx_eth_free_tx_descs(dev, 0) &&
  13738. - mp->tx_ring_size - mp->tx_desc_count >= MAX_DESCS_PER_SKB)
  13739. - netif_wake_queue(dev);
  13740. + rxq_refill((struct rx_queue *)data);
  13741. }
  13742. -static void mv643xx_eth_free_all_tx_descs(struct net_device *dev)
  13743. +static int rxq_process(struct rx_queue *rxq, int budget)
  13744. {
  13745. - mv643xx_eth_free_tx_descs(dev, 1);
  13746. -}
  13747. + struct mv643xx_eth_private *mp = rxq_to_mp(rxq);
  13748. + struct net_device_stats *stats = &mp->dev->stats;
  13749. + int rx;
  13750. -/*
  13751. - * mv643xx_eth_receive
  13752. - *
  13753. - * This function is forward packets that are received from the port's
  13754. - * queues toward kernel core or FastRoute them to another interface.
  13755. - *
  13756. - * Input : dev - a pointer to the required interface
  13757. - * max - maximum number to receive (0 means unlimted)
  13758. - *
  13759. - * Output : number of served packets
  13760. - */
  13761. -static int mv643xx_eth_receive_queue(struct net_device *dev, int budget)
  13762. -{
  13763. - struct mv643xx_private *mp = netdev_priv(dev);
  13764. - struct net_device_stats *stats = &dev->stats;
  13765. - unsigned int received_packets = 0;
  13766. - struct sk_buff *skb;
  13767. - struct pkt_info pkt_info;
  13768. -
  13769. - while (budget-- > 0 && eth_port_receive(mp, &pkt_info) == ETH_OK) {
  13770. - dma_unmap_single(NULL, pkt_info.buf_ptr, ETH_RX_SKB_SIZE,
  13771. - DMA_FROM_DEVICE);
  13772. - mp->rx_desc_count--;
  13773. - received_packets++;
  13774. + rx = 0;
  13775. + while (rx < budget) {
  13776. + struct rx_desc *rx_desc;
  13777. + unsigned int cmd_sts;
  13778. + struct sk_buff *skb;
  13779. + unsigned long flags;
  13780. +
  13781. + spin_lock_irqsave(&mp->lock, flags);
  13782. +
  13783. + rx_desc = &rxq->rx_desc_area[rxq->rx_curr_desc];
  13784. +
  13785. + cmd_sts = rx_desc->cmd_sts;
  13786. + if (cmd_sts & BUFFER_OWNED_BY_DMA) {
  13787. + spin_unlock_irqrestore(&mp->lock, flags);
  13788. + break;
  13789. + }
  13790. + rmb();
  13791. +
  13792. + skb = rxq->rx_skb[rxq->rx_curr_desc];
  13793. + rxq->rx_skb[rxq->rx_curr_desc] = NULL;
  13794. +
  13795. + rxq->rx_curr_desc = (rxq->rx_curr_desc + 1) % rxq->rx_ring_size;
  13796. +
  13797. + spin_unlock_irqrestore(&mp->lock, flags);
  13798. +
  13799. + dma_unmap_single(NULL, rx_desc->buf_ptr + 2,
  13800. + mp->dev->mtu + 24, DMA_FROM_DEVICE);
  13801. + rxq->rx_desc_count--;
  13802. + rx++;
  13803. /*
  13804. * Update statistics.
  13805. - * Note byte count includes 4 byte CRC count
  13806. + *
  13807. + * Note that the descriptor byte count includes 2 dummy
  13808. + * bytes automatically inserted by the hardware at the
  13809. + * start of the packet (which we don't count), and a 4
  13810. + * byte CRC at the end of the packet (which we do count).
  13811. */
  13812. stats->rx_packets++;
  13813. - stats->rx_bytes += pkt_info.byte_cnt;
  13814. - skb = pkt_info.return_info;
  13815. + stats->rx_bytes += rx_desc->byte_cnt - 2;
  13816. +
  13817. /*
  13818. - * In case received a packet without first / last bits on OR
  13819. - * the error summary bit is on, the packets needs to be dropeed.
  13820. + * In case we received a packet without first / last bits
  13821. + * on, or the error summary bit is set, the packet needs
  13822. + * to be dropped.
  13823. */
  13824. - if (((pkt_info.cmd_sts
  13825. - & (ETH_RX_FIRST_DESC | ETH_RX_LAST_DESC)) !=
  13826. - (ETH_RX_FIRST_DESC | ETH_RX_LAST_DESC))
  13827. - || (pkt_info.cmd_sts & ETH_ERROR_SUMMARY)) {
  13828. + if (((cmd_sts & (RX_FIRST_DESC | RX_LAST_DESC)) !=
  13829. + (RX_FIRST_DESC | RX_LAST_DESC))
  13830. + || (cmd_sts & ERROR_SUMMARY)) {
  13831. stats->rx_dropped++;
  13832. - if ((pkt_info.cmd_sts & (ETH_RX_FIRST_DESC |
  13833. - ETH_RX_LAST_DESC)) !=
  13834. - (ETH_RX_FIRST_DESC | ETH_RX_LAST_DESC)) {
  13835. +
  13836. + if ((cmd_sts & (RX_FIRST_DESC | RX_LAST_DESC)) !=
  13837. + (RX_FIRST_DESC | RX_LAST_DESC)) {
  13838. if (net_ratelimit())
  13839. - printk(KERN_ERR
  13840. - "%s: Received packet spread "
  13841. - "on multiple descriptors\n",
  13842. - dev->name);
  13843. + dev_printk(KERN_ERR, &mp->dev->dev,
  13844. + "received packet spanning "
  13845. + "multiple descriptors\n");
  13846. }
  13847. - if (pkt_info.cmd_sts & ETH_ERROR_SUMMARY)
  13848. +
  13849. + if (cmd_sts & ERROR_SUMMARY)
  13850. stats->rx_errors++;
  13851. dev_kfree_skb_irq(skb);
  13852. @@ -975,668 +576,120 @@
  13853. * The -4 is for the CRC in the trailer of the
  13854. * received packet
  13855. */
  13856. - skb_put(skb, pkt_info.byte_cnt - 4);
  13857. + skb_put(skb, rx_desc->byte_cnt - 2 - 4);
  13858. - if (pkt_info.cmd_sts & ETH_LAYER_4_CHECKSUM_OK) {
  13859. + if (cmd_sts & LAYER_4_CHECKSUM_OK) {
  13860. skb->ip_summed = CHECKSUM_UNNECESSARY;
  13861. skb->csum = htons(
  13862. - (pkt_info.cmd_sts & 0x0007fff8) >> 3);
  13863. + (cmd_sts & 0x0007fff8) >> 3);
  13864. }
  13865. - skb->protocol = eth_type_trans(skb, dev);
  13866. -#ifdef MV643XX_NAPI
  13867. + skb->protocol = eth_type_trans(skb, mp->dev);
  13868. +#ifdef MV643XX_ETH_NAPI
  13869. netif_receive_skb(skb);
  13870. #else
  13871. netif_rx(skb);
  13872. #endif
  13873. }
  13874. - dev->last_rx = jiffies;
  13875. +
  13876. + mp->dev->last_rx = jiffies;
  13877. }
  13878. - mv643xx_eth_rx_refill_descs(dev); /* Fill RX ring with skb's */
  13879. - return received_packets;
  13880. + rxq_refill(rxq);
  13881. +
  13882. + return rx;
  13883. }
  13884. -/* Set the mv643xx port configuration register for the speed/duplex mode. */
  13885. -static void mv643xx_eth_update_pscr(struct net_device *dev,
  13886. - struct ethtool_cmd *ecmd)
  13887. +#ifdef MV643XX_ETH_NAPI
  13888. +static int mv643xx_eth_poll(struct napi_struct *napi, int budget)
  13889. {
  13890. - struct mv643xx_private *mp = netdev_priv(dev);
  13891. - int port_num = mp->port_num;
  13892. - u32 o_pscr, n_pscr;
  13893. - unsigned int queues;
  13894. + struct mv643xx_eth_private *mp;
  13895. + int rx;
  13896. + int i;
  13897. - o_pscr = rdl(mp, PORT_SERIAL_CONTROL_REG(port_num));
  13898. - n_pscr = o_pscr;
  13899. + mp = container_of(napi, struct mv643xx_eth_private, napi);
  13900. - /* clear speed, duplex and rx buffer size fields */
  13901. - n_pscr &= ~(SET_MII_SPEED_TO_100 |
  13902. - SET_GMII_SPEED_TO_1000 |
  13903. - SET_FULL_DUPLEX_MODE |
  13904. - MAX_RX_PACKET_MASK);
  13905. -
  13906. - if (ecmd->duplex == DUPLEX_FULL)
  13907. - n_pscr |= SET_FULL_DUPLEX_MODE;
  13908. -
  13909. - if (ecmd->speed == SPEED_1000)
  13910. - n_pscr |= SET_GMII_SPEED_TO_1000 |
  13911. - MAX_RX_PACKET_9700BYTE;
  13912. - else {
  13913. - if (ecmd->speed == SPEED_100)
  13914. - n_pscr |= SET_MII_SPEED_TO_100;
  13915. - n_pscr |= MAX_RX_PACKET_1522BYTE;
  13916. - }
  13917. -
  13918. - if (n_pscr != o_pscr) {
  13919. - if ((o_pscr & SERIAL_PORT_ENABLE) == 0)
  13920. - wrl(mp, PORT_SERIAL_CONTROL_REG(port_num), n_pscr);
  13921. - else {
  13922. - queues = mv643xx_eth_port_disable_tx(mp);
  13923. +#ifdef MV643XX_ETH_TX_FAST_REFILL
  13924. + if (++mp->tx_clean_threshold > 5) {
  13925. + mp->tx_clean_threshold = 0;
  13926. + for (i = 0; i < 8; i++)
  13927. + if (mp->txq_mask & (1 << i))
  13928. + txq_reclaim(mp->txq + i, 0);
  13929. + }
  13930. +#endif
  13931. - o_pscr &= ~SERIAL_PORT_ENABLE;
  13932. - wrl(mp, PORT_SERIAL_CONTROL_REG(port_num), o_pscr);
  13933. - wrl(mp, PORT_SERIAL_CONTROL_REG(port_num), n_pscr);
  13934. - wrl(mp, PORT_SERIAL_CONTROL_REG(port_num), n_pscr);
  13935. - if (queues)
  13936. - mv643xx_eth_port_enable_tx(mp, queues);
  13937. - }
  13938. + rx = 0;
  13939. + for (i = 7; rx < budget && i >= 0; i--)
  13940. + if (mp->rxq_mask & (1 << i))
  13941. + rx += rxq_process(mp->rxq + i, budget - rx);
  13942. +
  13943. + if (rx < budget) {
  13944. + netif_rx_complete(mp->dev, napi);
  13945. + wrl(mp, INT_CAUSE(mp->port_num), 0);
  13946. + wrl(mp, INT_CAUSE_EXT(mp->port_num), 0);
  13947. + wrl(mp, INT_MASK(mp->port_num), INT_TX_END | INT_RX | INT_EXT);
  13948. }
  13949. +
  13950. + return rx;
  13951. }
  13952. +#endif
  13953. -/*
  13954. - * mv643xx_eth_int_handler
  13955. - *
  13956. - * Main interrupt handler for the gigbit ethernet ports
  13957. - *
  13958. - * Input : irq - irq number (not used)
  13959. - * dev_id - a pointer to the required interface's data structure
  13960. - * regs - not used
  13961. - * Output : N/A
  13962. - */
  13963. -static irqreturn_t mv643xx_eth_int_handler(int irq, void *dev_id)
  13964. +/* tx ***********************************************************************/
  13965. +static inline unsigned int has_tiny_unaligned_frags(struct sk_buff *skb)
  13966. {
  13967. - struct net_device *dev = (struct net_device *)dev_id;
  13968. - struct mv643xx_private *mp = netdev_priv(dev);
  13969. - u32 eth_int_cause, eth_int_cause_ext = 0;
  13970. - unsigned int port_num = mp->port_num;
  13971. -
  13972. - /* Read interrupt cause registers */
  13973. - eth_int_cause = rdl(mp, INTERRUPT_CAUSE_REG(port_num)) &
  13974. - ETH_INT_UNMASK_ALL;
  13975. - if (eth_int_cause & ETH_INT_CAUSE_EXT) {
  13976. - eth_int_cause_ext = rdl(mp,
  13977. - INTERRUPT_CAUSE_EXTEND_REG(port_num)) &
  13978. - ETH_INT_UNMASK_ALL_EXT;
  13979. - wrl(mp, INTERRUPT_CAUSE_EXTEND_REG(port_num),
  13980. - ~eth_int_cause_ext);
  13981. - }
  13982. -
  13983. - /* PHY status changed */
  13984. - if (eth_int_cause_ext & (ETH_INT_CAUSE_PHY | ETH_INT_CAUSE_STATE)) {
  13985. - struct ethtool_cmd cmd;
  13986. + int frag;
  13987. - if (mii_link_ok(&mp->mii)) {
  13988. - mii_ethtool_gset(&mp->mii, &cmd);
  13989. - mv643xx_eth_update_pscr(dev, &cmd);
  13990. - mv643xx_eth_port_enable_tx(mp, ETH_TX_QUEUES_ENABLED);
  13991. - if (!netif_carrier_ok(dev)) {
  13992. - netif_carrier_on(dev);
  13993. - if (mp->tx_ring_size - mp->tx_desc_count >=
  13994. - MAX_DESCS_PER_SKB)
  13995. - netif_wake_queue(dev);
  13996. - }
  13997. - } else if (netif_carrier_ok(dev)) {
  13998. - netif_stop_queue(dev);
  13999. - netif_carrier_off(dev);
  14000. - }
  14001. + for (frag = 0; frag < skb_shinfo(skb)->nr_frags; frag++) {
  14002. + skb_frag_t *fragp = &skb_shinfo(skb)->frags[frag];
  14003. + if (fragp->size <= 8 && fragp->page_offset & 7)
  14004. + return 1;
  14005. }
  14006. -#ifdef MV643XX_NAPI
  14007. - if (eth_int_cause & ETH_INT_CAUSE_RX) {
  14008. - /* schedule the NAPI poll routine to maintain port */
  14009. - wrl(mp, INTERRUPT_MASK_REG(port_num), ETH_INT_MASK_ALL);
  14010. + return 0;
  14011. +}
  14012. - /* wait for previous write to complete */
  14013. - rdl(mp, INTERRUPT_MASK_REG(port_num));
  14014. +static int txq_alloc_desc_index(struct tx_queue *txq)
  14015. +{
  14016. + int tx_desc_curr;
  14017. - netif_rx_schedule(dev, &mp->napi);
  14018. - }
  14019. -#else
  14020. - if (eth_int_cause & ETH_INT_CAUSE_RX)
  14021. - mv643xx_eth_receive_queue(dev, INT_MAX);
  14022. -#endif
  14023. - if (eth_int_cause_ext & ETH_INT_CAUSE_TX)
  14024. - mv643xx_eth_free_completed_tx_descs(dev);
  14025. + BUG_ON(txq->tx_desc_count >= txq->tx_ring_size);
  14026. - /*
  14027. - * If no real interrupt occured, exit.
  14028. - * This can happen when using gigE interrupt coalescing mechanism.
  14029. - */
  14030. - if ((eth_int_cause == 0x0) && (eth_int_cause_ext == 0x0))
  14031. - return IRQ_NONE;
  14032. + tx_desc_curr = txq->tx_curr_desc;
  14033. + txq->tx_curr_desc = (tx_desc_curr + 1) % txq->tx_ring_size;
  14034. - return IRQ_HANDLED;
  14035. -}
  14036. -
  14037. -#ifdef MV643XX_COAL
  14038. -
  14039. -/*
  14040. - * eth_port_set_rx_coal - Sets coalescing interrupt mechanism on RX path
  14041. - *
  14042. - * DESCRIPTION:
  14043. - * This routine sets the RX coalescing interrupt mechanism parameter.
  14044. - * This parameter is a timeout counter, that counts in 64 t_clk
  14045. - * chunks ; that when timeout event occurs a maskable interrupt
  14046. - * occurs.
  14047. - * The parameter is calculated using the tClk of the MV-643xx chip
  14048. - * , and the required delay of the interrupt in usec.
  14049. - *
  14050. - * INPUT:
  14051. - * struct mv643xx_private *mp Ethernet port
  14052. - * unsigned int delay Delay in usec
  14053. - *
  14054. - * OUTPUT:
  14055. - * Interrupt coalescing mechanism value is set in MV-643xx chip.
  14056. - *
  14057. - * RETURN:
  14058. - * The interrupt coalescing value set in the gigE port.
  14059. - *
  14060. - */
  14061. -static unsigned int eth_port_set_rx_coal(struct mv643xx_private *mp,
  14062. - unsigned int delay)
  14063. -{
  14064. - unsigned int port_num = mp->port_num;
  14065. - unsigned int coal = ((mp->shared->t_clk / 1000000) * delay) / 64;
  14066. -
  14067. - /* Set RX Coalescing mechanism */
  14068. - wrl(mp, SDMA_CONFIG_REG(port_num),
  14069. - ((coal & 0x3fff) << 8) |
  14070. - (rdl(mp, SDMA_CONFIG_REG(port_num))
  14071. - & 0xffc000ff));
  14072. -
  14073. - return coal;
  14074. -}
  14075. -#endif
  14076. -
  14077. -/*
  14078. - * eth_port_set_tx_coal - Sets coalescing interrupt mechanism on TX path
  14079. - *
  14080. - * DESCRIPTION:
  14081. - * This routine sets the TX coalescing interrupt mechanism parameter.
  14082. - * This parameter is a timeout counter, that counts in 64 t_clk
  14083. - * chunks ; that when timeout event occurs a maskable interrupt
  14084. - * occurs.
  14085. - * The parameter is calculated using the t_cLK frequency of the
  14086. - * MV-643xx chip and the required delay in the interrupt in uSec
  14087. - *
  14088. - * INPUT:
  14089. - * struct mv643xx_private *mp Ethernet port
  14090. - * unsigned int delay Delay in uSeconds
  14091. - *
  14092. - * OUTPUT:
  14093. - * Interrupt coalescing mechanism value is set in MV-643xx chip.
  14094. - *
  14095. - * RETURN:
  14096. - * The interrupt coalescing value set in the gigE port.
  14097. - *
  14098. - */
  14099. -static unsigned int eth_port_set_tx_coal(struct mv643xx_private *mp,
  14100. - unsigned int delay)
  14101. -{
  14102. - unsigned int coal = ((mp->shared->t_clk / 1000000) * delay) / 64;
  14103. -
  14104. - /* Set TX Coalescing mechanism */
  14105. - wrl(mp, TX_FIFO_URGENT_THRESHOLD_REG(mp->port_num), coal << 4);
  14106. -
  14107. - return coal;
  14108. -}
  14109. -
  14110. -/*
  14111. - * ether_init_rx_desc_ring - Curve a Rx chain desc list and buffer in memory.
  14112. - *
  14113. - * DESCRIPTION:
  14114. - * This function prepares a Rx chained list of descriptors and packet
  14115. - * buffers in a form of a ring. The routine must be called after port
  14116. - * initialization routine and before port start routine.
  14117. - * The Ethernet SDMA engine uses CPU bus addresses to access the various
  14118. - * devices in the system (i.e. DRAM). This function uses the ethernet
  14119. - * struct 'virtual to physical' routine (set by the user) to set the ring
  14120. - * with physical addresses.
  14121. - *
  14122. - * INPUT:
  14123. - * struct mv643xx_private *mp Ethernet Port Control srtuct.
  14124. - *
  14125. - * OUTPUT:
  14126. - * The routine updates the Ethernet port control struct with information
  14127. - * regarding the Rx descriptors and buffers.
  14128. - *
  14129. - * RETURN:
  14130. - * None.
  14131. - */
  14132. -static void ether_init_rx_desc_ring(struct mv643xx_private *mp)
  14133. -{
  14134. - volatile struct eth_rx_desc *p_rx_desc;
  14135. - int rx_desc_num = mp->rx_ring_size;
  14136. - int i;
  14137. -
  14138. - /* initialize the next_desc_ptr links in the Rx descriptors ring */
  14139. - p_rx_desc = (struct eth_rx_desc *)mp->p_rx_desc_area;
  14140. - for (i = 0; i < rx_desc_num; i++) {
  14141. - p_rx_desc[i].next_desc_ptr = mp->rx_desc_dma +
  14142. - ((i + 1) % rx_desc_num) * sizeof(struct eth_rx_desc);
  14143. - }
  14144. -
  14145. - /* Save Rx desc pointer to driver struct. */
  14146. - mp->rx_curr_desc_q = 0;
  14147. - mp->rx_used_desc_q = 0;
  14148. -
  14149. - mp->rx_desc_area_size = rx_desc_num * sizeof(struct eth_rx_desc);
  14150. -}
  14151. -
  14152. -/*
  14153. - * ether_init_tx_desc_ring - Curve a Tx chain desc list and buffer in memory.
  14154. - *
  14155. - * DESCRIPTION:
  14156. - * This function prepares a Tx chained list of descriptors and packet
  14157. - * buffers in a form of a ring. The routine must be called after port
  14158. - * initialization routine and before port start routine.
  14159. - * The Ethernet SDMA engine uses CPU bus addresses to access the various
  14160. - * devices in the system (i.e. DRAM). This function uses the ethernet
  14161. - * struct 'virtual to physical' routine (set by the user) to set the ring
  14162. - * with physical addresses.
  14163. - *
  14164. - * INPUT:
  14165. - * struct mv643xx_private *mp Ethernet Port Control srtuct.
  14166. - *
  14167. - * OUTPUT:
  14168. - * The routine updates the Ethernet port control struct with information
  14169. - * regarding the Tx descriptors and buffers.
  14170. - *
  14171. - * RETURN:
  14172. - * None.
  14173. - */
  14174. -static void ether_init_tx_desc_ring(struct mv643xx_private *mp)
  14175. -{
  14176. - int tx_desc_num = mp->tx_ring_size;
  14177. - struct eth_tx_desc *p_tx_desc;
  14178. - int i;
  14179. -
  14180. - /* Initialize the next_desc_ptr links in the Tx descriptors ring */
  14181. - p_tx_desc = (struct eth_tx_desc *)mp->p_tx_desc_area;
  14182. - for (i = 0; i < tx_desc_num; i++) {
  14183. - p_tx_desc[i].next_desc_ptr = mp->tx_desc_dma +
  14184. - ((i + 1) % tx_desc_num) * sizeof(struct eth_tx_desc);
  14185. - }
  14186. -
  14187. - mp->tx_curr_desc_q = 0;
  14188. - mp->tx_used_desc_q = 0;
  14189. -
  14190. - mp->tx_desc_area_size = tx_desc_num * sizeof(struct eth_tx_desc);
  14191. -}
  14192. -
  14193. -static int mv643xx_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
  14194. -{
  14195. - struct mv643xx_private *mp = netdev_priv(dev);
  14196. - int err;
  14197. -
  14198. - spin_lock_irq(&mp->lock);
  14199. - err = mii_ethtool_sset(&mp->mii, cmd);
  14200. - spin_unlock_irq(&mp->lock);
  14201. -
  14202. - return err;
  14203. -}
  14204. -
  14205. -static int mv643xx_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
  14206. -{
  14207. - struct mv643xx_private *mp = netdev_priv(dev);
  14208. - int err;
  14209. -
  14210. - spin_lock_irq(&mp->lock);
  14211. - err = mii_ethtool_gset(&mp->mii, cmd);
  14212. - spin_unlock_irq(&mp->lock);
  14213. -
  14214. - /* The PHY may support 1000baseT_Half, but the mv643xx does not */
  14215. - cmd->supported &= ~SUPPORTED_1000baseT_Half;
  14216. - cmd->advertising &= ~ADVERTISED_1000baseT_Half;
  14217. -
  14218. - return err;
  14219. -}
  14220. -
  14221. -/*
  14222. - * mv643xx_eth_open
  14223. - *
  14224. - * This function is called when openning the network device. The function
  14225. - * should initialize all the hardware, initialize cyclic Rx/Tx
  14226. - * descriptors chain and buffers and allocate an IRQ to the network
  14227. - * device.
  14228. - *
  14229. - * Input : a pointer to the network device structure
  14230. - *
  14231. - * Output : zero of success , nonzero if fails.
  14232. - */
  14233. -
  14234. -static int mv643xx_eth_open(struct net_device *dev)
  14235. -{
  14236. - struct mv643xx_private *mp = netdev_priv(dev);
  14237. - unsigned int port_num = mp->port_num;
  14238. - unsigned int size;
  14239. - int err;
  14240. -
  14241. - /* Clear any pending ethernet port interrupts */
  14242. - wrl(mp, INTERRUPT_CAUSE_REG(port_num), 0);
  14243. - wrl(mp, INTERRUPT_CAUSE_EXTEND_REG(port_num), 0);
  14244. - /* wait for previous write to complete */
  14245. - rdl(mp, INTERRUPT_CAUSE_EXTEND_REG(port_num));
  14246. -
  14247. - err = request_irq(dev->irq, mv643xx_eth_int_handler,
  14248. - IRQF_SHARED | IRQF_SAMPLE_RANDOM, dev->name, dev);
  14249. - if (err) {
  14250. - printk(KERN_ERR "%s: Can not assign IRQ\n", dev->name);
  14251. - return -EAGAIN;
  14252. - }
  14253. -
  14254. - eth_port_init(mp);
  14255. -
  14256. - memset(&mp->timeout, 0, sizeof(struct timer_list));
  14257. - mp->timeout.function = mv643xx_eth_rx_refill_descs_timer_wrapper;
  14258. - mp->timeout.data = (unsigned long)dev;
  14259. -
  14260. - /* Allocate RX and TX skb rings */
  14261. - mp->rx_skb = kmalloc(sizeof(*mp->rx_skb) * mp->rx_ring_size,
  14262. - GFP_KERNEL);
  14263. - if (!mp->rx_skb) {
  14264. - printk(KERN_ERR "%s: Cannot allocate Rx skb ring\n", dev->name);
  14265. - err = -ENOMEM;
  14266. - goto out_free_irq;
  14267. - }
  14268. - mp->tx_skb = kmalloc(sizeof(*mp->tx_skb) * mp->tx_ring_size,
  14269. - GFP_KERNEL);
  14270. - if (!mp->tx_skb) {
  14271. - printk(KERN_ERR "%s: Cannot allocate Tx skb ring\n", dev->name);
  14272. - err = -ENOMEM;
  14273. - goto out_free_rx_skb;
  14274. - }
  14275. -
  14276. - /* Allocate TX ring */
  14277. - mp->tx_desc_count = 0;
  14278. - size = mp->tx_ring_size * sizeof(struct eth_tx_desc);
  14279. - mp->tx_desc_area_size = size;
  14280. -
  14281. - if (mp->tx_sram_size) {
  14282. - mp->p_tx_desc_area = ioremap(mp->tx_sram_addr,
  14283. - mp->tx_sram_size);
  14284. - mp->tx_desc_dma = mp->tx_sram_addr;
  14285. - } else
  14286. - mp->p_tx_desc_area = dma_alloc_coherent(NULL, size,
  14287. - &mp->tx_desc_dma,
  14288. - GFP_KERNEL);
  14289. -
  14290. - if (!mp->p_tx_desc_area) {
  14291. - printk(KERN_ERR "%s: Cannot allocate Tx Ring (size %d bytes)\n",
  14292. - dev->name, size);
  14293. - err = -ENOMEM;
  14294. - goto out_free_tx_skb;
  14295. - }
  14296. - BUG_ON((u32) mp->p_tx_desc_area & 0xf); /* check 16-byte alignment */
  14297. - memset((void *)mp->p_tx_desc_area, 0, mp->tx_desc_area_size);
  14298. -
  14299. - ether_init_tx_desc_ring(mp);
  14300. -
  14301. - /* Allocate RX ring */
  14302. - mp->rx_desc_count = 0;
  14303. - size = mp->rx_ring_size * sizeof(struct eth_rx_desc);
  14304. - mp->rx_desc_area_size = size;
  14305. -
  14306. - if (mp->rx_sram_size) {
  14307. - mp->p_rx_desc_area = ioremap(mp->rx_sram_addr,
  14308. - mp->rx_sram_size);
  14309. - mp->rx_desc_dma = mp->rx_sram_addr;
  14310. - } else
  14311. - mp->p_rx_desc_area = dma_alloc_coherent(NULL, size,
  14312. - &mp->rx_desc_dma,
  14313. - GFP_KERNEL);
  14314. -
  14315. - if (!mp->p_rx_desc_area) {
  14316. - printk(KERN_ERR "%s: Cannot allocate Rx ring (size %d bytes)\n",
  14317. - dev->name, size);
  14318. - printk(KERN_ERR "%s: Freeing previously allocated TX queues...",
  14319. - dev->name);
  14320. - if (mp->rx_sram_size)
  14321. - iounmap(mp->p_tx_desc_area);
  14322. - else
  14323. - dma_free_coherent(NULL, mp->tx_desc_area_size,
  14324. - mp->p_tx_desc_area, mp->tx_desc_dma);
  14325. - err = -ENOMEM;
  14326. - goto out_free_tx_skb;
  14327. - }
  14328. - memset((void *)mp->p_rx_desc_area, 0, size);
  14329. -
  14330. - ether_init_rx_desc_ring(mp);
  14331. -
  14332. - mv643xx_eth_rx_refill_descs(dev); /* Fill RX ring with skb's */
  14333. -
  14334. -#ifdef MV643XX_NAPI
  14335. - napi_enable(&mp->napi);
  14336. -#endif
  14337. -
  14338. - eth_port_start(dev);
  14339. -
  14340. - /* Interrupt Coalescing */
  14341. -
  14342. -#ifdef MV643XX_COAL
  14343. - mp->rx_int_coal =
  14344. - eth_port_set_rx_coal(mp, MV643XX_RX_COAL);
  14345. -#endif
  14346. -
  14347. - mp->tx_int_coal =
  14348. - eth_port_set_tx_coal(mp, MV643XX_TX_COAL);
  14349. -
  14350. - /* Unmask phy and link status changes interrupts */
  14351. - wrl(mp, INTERRUPT_EXTEND_MASK_REG(port_num), ETH_INT_UNMASK_ALL_EXT);
  14352. -
  14353. - /* Unmask RX buffer and TX end interrupt */
  14354. - wrl(mp, INTERRUPT_MASK_REG(port_num), ETH_INT_UNMASK_ALL);
  14355. -
  14356. - return 0;
  14357. -
  14358. -out_free_tx_skb:
  14359. - kfree(mp->tx_skb);
  14360. -out_free_rx_skb:
  14361. - kfree(mp->rx_skb);
  14362. -out_free_irq:
  14363. - free_irq(dev->irq, dev);
  14364. -
  14365. - return err;
  14366. -}
  14367. -
  14368. -static void mv643xx_eth_free_tx_rings(struct net_device *dev)
  14369. -{
  14370. - struct mv643xx_private *mp = netdev_priv(dev);
  14371. -
  14372. - /* Stop Tx Queues */
  14373. - mv643xx_eth_port_disable_tx(mp);
  14374. -
  14375. - /* Free outstanding skb's on TX ring */
  14376. - mv643xx_eth_free_all_tx_descs(dev);
  14377. -
  14378. - BUG_ON(mp->tx_used_desc_q != mp->tx_curr_desc_q);
  14379. -
  14380. - /* Free TX ring */
  14381. - if (mp->tx_sram_size)
  14382. - iounmap(mp->p_tx_desc_area);
  14383. - else
  14384. - dma_free_coherent(NULL, mp->tx_desc_area_size,
  14385. - mp->p_tx_desc_area, mp->tx_desc_dma);
  14386. -}
  14387. -
  14388. -static void mv643xx_eth_free_rx_rings(struct net_device *dev)
  14389. -{
  14390. - struct mv643xx_private *mp = netdev_priv(dev);
  14391. - int curr;
  14392. -
  14393. - /* Stop RX Queues */
  14394. - mv643xx_eth_port_disable_rx(mp);
  14395. -
  14396. - /* Free preallocated skb's on RX rings */
  14397. - for (curr = 0; mp->rx_desc_count && curr < mp->rx_ring_size; curr++) {
  14398. - if (mp->rx_skb[curr]) {
  14399. - dev_kfree_skb(mp->rx_skb[curr]);
  14400. - mp->rx_desc_count--;
  14401. - }
  14402. - }
  14403. -
  14404. - if (mp->rx_desc_count)
  14405. - printk(KERN_ERR
  14406. - "%s: Error in freeing Rx Ring. %d skb's still"
  14407. - " stuck in RX Ring - ignoring them\n", dev->name,
  14408. - mp->rx_desc_count);
  14409. - /* Free RX ring */
  14410. - if (mp->rx_sram_size)
  14411. - iounmap(mp->p_rx_desc_area);
  14412. - else
  14413. - dma_free_coherent(NULL, mp->rx_desc_area_size,
  14414. - mp->p_rx_desc_area, mp->rx_desc_dma);
  14415. -}
  14416. -
  14417. -/*
  14418. - * mv643xx_eth_stop
  14419. - *
  14420. - * This function is used when closing the network device.
  14421. - * It updates the hardware,
  14422. - * release all memory that holds buffers and descriptors and release the IRQ.
  14423. - * Input : a pointer to the device structure
  14424. - * Output : zero if success , nonzero if fails
  14425. - */
  14426. -
  14427. -static int mv643xx_eth_stop(struct net_device *dev)
  14428. -{
  14429. - struct mv643xx_private *mp = netdev_priv(dev);
  14430. - unsigned int port_num = mp->port_num;
  14431. -
  14432. - /* Mask all interrupts on ethernet port */
  14433. - wrl(mp, INTERRUPT_MASK_REG(port_num), ETH_INT_MASK_ALL);
  14434. - /* wait for previous write to complete */
  14435. - rdl(mp, INTERRUPT_MASK_REG(port_num));
  14436. -
  14437. -#ifdef MV643XX_NAPI
  14438. - napi_disable(&mp->napi);
  14439. -#endif
  14440. - netif_carrier_off(dev);
  14441. - netif_stop_queue(dev);
  14442. -
  14443. - eth_port_reset(mp);
  14444. -
  14445. - mv643xx_eth_free_tx_rings(dev);
  14446. - mv643xx_eth_free_rx_rings(dev);
  14447. -
  14448. - free_irq(dev->irq, dev);
  14449. -
  14450. - return 0;
  14451. -}
  14452. -
  14453. -#ifdef MV643XX_NAPI
  14454. -/*
  14455. - * mv643xx_poll
  14456. - *
  14457. - * This function is used in case of NAPI
  14458. - */
  14459. -static int mv643xx_poll(struct napi_struct *napi, int budget)
  14460. -{
  14461. - struct mv643xx_private *mp = container_of(napi, struct mv643xx_private, napi);
  14462. - struct net_device *dev = mp->dev;
  14463. - unsigned int port_num = mp->port_num;
  14464. - int work_done;
  14465. -
  14466. -#ifdef MV643XX_TX_FAST_REFILL
  14467. - if (++mp->tx_clean_threshold > 5) {
  14468. - mv643xx_eth_free_completed_tx_descs(dev);
  14469. - mp->tx_clean_threshold = 0;
  14470. - }
  14471. -#endif
  14472. -
  14473. - work_done = 0;
  14474. - if ((rdl(mp, RX_CURRENT_QUEUE_DESC_PTR_0(port_num)))
  14475. - != (u32) mp->rx_used_desc_q)
  14476. - work_done = mv643xx_eth_receive_queue(dev, budget);
  14477. -
  14478. - if (work_done < budget) {
  14479. - netif_rx_complete(dev, napi);
  14480. - wrl(mp, INTERRUPT_CAUSE_REG(port_num), 0);
  14481. - wrl(mp, INTERRUPT_CAUSE_EXTEND_REG(port_num), 0);
  14482. - wrl(mp, INTERRUPT_MASK_REG(port_num), ETH_INT_UNMASK_ALL);
  14483. - }
  14484. -
  14485. - return work_done;
  14486. -}
  14487. -#endif
  14488. -
  14489. -/**
  14490. - * has_tiny_unaligned_frags - check if skb has any small, unaligned fragments
  14491. - *
  14492. - * Hardware can't handle unaligned fragments smaller than 9 bytes.
  14493. - * This helper function detects that case.
  14494. - */
  14495. -
  14496. -static inline unsigned int has_tiny_unaligned_frags(struct sk_buff *skb)
  14497. -{
  14498. - unsigned int frag;
  14499. - skb_frag_t *fragp;
  14500. -
  14501. - for (frag = 0; frag < skb_shinfo(skb)->nr_frags; frag++) {
  14502. - fragp = &skb_shinfo(skb)->frags[frag];
  14503. - if (fragp->size <= 8 && fragp->page_offset & 0x7)
  14504. - return 1;
  14505. - }
  14506. - return 0;
  14507. -}
  14508. -
  14509. -/**
  14510. - * eth_alloc_tx_desc_index - return the index of the next available tx desc
  14511. - */
  14512. -static int eth_alloc_tx_desc_index(struct mv643xx_private *mp)
  14513. -{
  14514. - int tx_desc_curr;
  14515. -
  14516. - BUG_ON(mp->tx_desc_count >= mp->tx_ring_size);
  14517. -
  14518. - tx_desc_curr = mp->tx_curr_desc_q;
  14519. - mp->tx_curr_desc_q = (tx_desc_curr + 1) % mp->tx_ring_size;
  14520. -
  14521. - BUG_ON(mp->tx_curr_desc_q == mp->tx_used_desc_q);
  14522. + BUG_ON(txq->tx_curr_desc == txq->tx_used_desc);
  14523. return tx_desc_curr;
  14524. }
  14525. -/**
  14526. - * eth_tx_fill_frag_descs - fill tx hw descriptors for an skb's fragments.
  14527. - *
  14528. - * Ensure the data for each fragment to be transmitted is mapped properly,
  14529. - * then fill in descriptors in the tx hw queue.
  14530. - */
  14531. -static void eth_tx_fill_frag_descs(struct mv643xx_private *mp,
  14532. - struct sk_buff *skb)
  14533. +static void txq_submit_frag_skb(struct tx_queue *txq, struct sk_buff *skb)
  14534. {
  14535. + int nr_frags = skb_shinfo(skb)->nr_frags;
  14536. int frag;
  14537. - int tx_index;
  14538. - struct eth_tx_desc *desc;
  14539. -
  14540. - for (frag = 0; frag < skb_shinfo(skb)->nr_frags; frag++) {
  14541. - skb_frag_t *this_frag = &skb_shinfo(skb)->frags[frag];
  14542. - tx_index = eth_alloc_tx_desc_index(mp);
  14543. - desc = &mp->p_tx_desc_area[tx_index];
  14544. + for (frag = 0; frag < nr_frags; frag++) {
  14545. + skb_frag_t *this_frag;
  14546. + int tx_index;
  14547. + struct tx_desc *desc;
  14548. +
  14549. + this_frag = &skb_shinfo(skb)->frags[frag];
  14550. + tx_index = txq_alloc_desc_index(txq);
  14551. + desc = &txq->tx_desc_area[tx_index];
  14552. - desc->cmd_sts = ETH_BUFFER_OWNED_BY_DMA;
  14553. - /* Last Frag enables interrupt and frees the skb */
  14554. - if (frag == (skb_shinfo(skb)->nr_frags - 1)) {
  14555. - desc->cmd_sts |= ETH_ZERO_PADDING |
  14556. - ETH_TX_LAST_DESC |
  14557. - ETH_TX_ENABLE_INTERRUPT;
  14558. - mp->tx_skb[tx_index] = skb;
  14559. - } else
  14560. - mp->tx_skb[tx_index] = NULL;
  14561. + /*
  14562. + * The last fragment will generate an interrupt
  14563. + * which will free the skb on TX completion.
  14564. + */
  14565. + if (frag == nr_frags - 1) {
  14566. + desc->cmd_sts = BUFFER_OWNED_BY_DMA |
  14567. + ZERO_PADDING | TX_LAST_DESC |
  14568. + TX_ENABLE_INTERRUPT;
  14569. + txq->tx_skb[tx_index] = skb;
  14570. + } else {
  14571. + desc->cmd_sts = BUFFER_OWNED_BY_DMA;
  14572. + txq->tx_skb[tx_index] = NULL;
  14573. + }
  14574. - desc = &mp->p_tx_desc_area[tx_index];
  14575. desc->l4i_chk = 0;
  14576. desc->byte_cnt = this_frag->size;
  14577. desc->buf_ptr = dma_map_page(NULL, this_frag->page,
  14578. @@ -1651,37 +704,28 @@
  14579. return (__force __be16)sum;
  14580. }
  14581. -/**
  14582. - * eth_tx_submit_descs_for_skb - submit data from an skb to the tx hw
  14583. - *
  14584. - * Ensure the data for an skb to be transmitted is mapped properly,
  14585. - * then fill in descriptors in the tx hw queue and start the hardware.
  14586. - */
  14587. -static void eth_tx_submit_descs_for_skb(struct mv643xx_private *mp,
  14588. - struct sk_buff *skb)
  14589. +static void txq_submit_skb(struct tx_queue *txq, struct sk_buff *skb)
  14590. {
  14591. + int nr_frags = skb_shinfo(skb)->nr_frags;
  14592. int tx_index;
  14593. - struct eth_tx_desc *desc;
  14594. + struct tx_desc *desc;
  14595. u32 cmd_sts;
  14596. int length;
  14597. - int nr_frags = skb_shinfo(skb)->nr_frags;
  14598. - cmd_sts = ETH_TX_FIRST_DESC | ETH_GEN_CRC | ETH_BUFFER_OWNED_BY_DMA;
  14599. + cmd_sts = TX_FIRST_DESC | GEN_CRC | BUFFER_OWNED_BY_DMA;
  14600. - tx_index = eth_alloc_tx_desc_index(mp);
  14601. - desc = &mp->p_tx_desc_area[tx_index];
  14602. + tx_index = txq_alloc_desc_index(txq);
  14603. + desc = &txq->tx_desc_area[tx_index];
  14604. if (nr_frags) {
  14605. - eth_tx_fill_frag_descs(mp, skb);
  14606. + txq_submit_frag_skb(txq, skb);
  14607. length = skb_headlen(skb);
  14608. - mp->tx_skb[tx_index] = NULL;
  14609. + txq->tx_skb[tx_index] = NULL;
  14610. } else {
  14611. - cmd_sts |= ETH_ZERO_PADDING |
  14612. - ETH_TX_LAST_DESC |
  14613. - ETH_TX_ENABLE_INTERRUPT;
  14614. + cmd_sts |= ZERO_PADDING | TX_LAST_DESC | TX_ENABLE_INTERRUPT;
  14615. length = skb->len;
  14616. - mp->tx_skb[tx_index] = skb;
  14617. + txq->tx_skb[tx_index] = skb;
  14618. }
  14619. desc->byte_cnt = length;
  14620. @@ -1690,13 +734,13 @@
  14621. if (skb->ip_summed == CHECKSUM_PARTIAL) {
  14622. BUG_ON(skb->protocol != htons(ETH_P_IP));
  14623. - cmd_sts |= ETH_GEN_TCP_UDP_CHECKSUM |
  14624. - ETH_GEN_IP_V_4_CHECKSUM |
  14625. - ip_hdr(skb)->ihl << ETH_TX_IHL_SHIFT;
  14626. + cmd_sts |= GEN_TCP_UDP_CHECKSUM |
  14627. + GEN_IP_V4_CHECKSUM |
  14628. + ip_hdr(skb)->ihl << TX_IHL_SHIFT;
  14629. switch (ip_hdr(skb)->protocol) {
  14630. case IPPROTO_UDP:
  14631. - cmd_sts |= ETH_UDP_FRAME;
  14632. + cmd_sts |= UDP_FRAME;
  14633. desc->l4i_chk = ntohs(sum16_as_be(udp_hdr(skb)->check));
  14634. break;
  14635. case IPPROTO_TCP:
  14636. @@ -1707,7 +751,7 @@
  14637. }
  14638. } else {
  14639. /* Errata BTS #50, IHL must be 5 if no HW checksum */
  14640. - cmd_sts |= 5 << ETH_TX_IHL_SHIFT;
  14641. + cmd_sts |= 5 << TX_IHL_SHIFT;
  14642. desc->l4i_chk = 0;
  14643. }
  14644. @@ -1717,1649 +761,1818 @@
  14645. /* ensure all descriptors are written before poking hardware */
  14646. wmb();
  14647. - mv643xx_eth_port_enable_tx(mp, ETH_TX_QUEUES_ENABLED);
  14648. + txq_enable(txq);
  14649. - mp->tx_desc_count += nr_frags + 1;
  14650. + txq->tx_desc_count += nr_frags + 1;
  14651. }
  14652. -/**
  14653. - * mv643xx_eth_start_xmit - queue an skb to the hardware for transmission
  14654. - *
  14655. - */
  14656. -static int mv643xx_eth_start_xmit(struct sk_buff *skb, struct net_device *dev)
  14657. +static int mv643xx_eth_xmit(struct sk_buff *skb, struct net_device *dev)
  14658. {
  14659. - struct mv643xx_private *mp = netdev_priv(dev);
  14660. + struct mv643xx_eth_private *mp = netdev_priv(dev);
  14661. struct net_device_stats *stats = &dev->stats;
  14662. + struct tx_queue *txq;
  14663. unsigned long flags;
  14664. - BUG_ON(netif_queue_stopped(dev));
  14665. -
  14666. if (has_tiny_unaligned_frags(skb) && __skb_linearize(skb)) {
  14667. stats->tx_dropped++;
  14668. - printk(KERN_DEBUG "%s: failed to linearize tiny "
  14669. - "unaligned fragment\n", dev->name);
  14670. + dev_printk(KERN_DEBUG, &dev->dev,
  14671. + "failed to linearize skb with tiny "
  14672. + "unaligned fragment\n");
  14673. return NETDEV_TX_BUSY;
  14674. }
  14675. spin_lock_irqsave(&mp->lock, flags);
  14676. - if (mp->tx_ring_size - mp->tx_desc_count < MAX_DESCS_PER_SKB) {
  14677. - printk(KERN_ERR "%s: transmit with queue full\n", dev->name);
  14678. - netif_stop_queue(dev);
  14679. + txq = mp->txq + mp->txq_primary;
  14680. +
  14681. + if (txq->tx_ring_size - txq->tx_desc_count < MAX_DESCS_PER_SKB) {
  14682. spin_unlock_irqrestore(&mp->lock, flags);
  14683. - return NETDEV_TX_BUSY;
  14684. + if (txq->index == mp->txq_primary && net_ratelimit())
  14685. + dev_printk(KERN_ERR, &dev->dev,
  14686. + "primary tx queue full?!\n");
  14687. + kfree_skb(skb);
  14688. + return NETDEV_TX_OK;
  14689. }
  14690. - eth_tx_submit_descs_for_skb(mp, skb);
  14691. + txq_submit_skb(txq, skb);
  14692. stats->tx_bytes += skb->len;
  14693. stats->tx_packets++;
  14694. dev->trans_start = jiffies;
  14695. - if (mp->tx_ring_size - mp->tx_desc_count < MAX_DESCS_PER_SKB)
  14696. - netif_stop_queue(dev);
  14697. + if (txq->index == mp->txq_primary) {
  14698. + int entries_left;
  14699. +
  14700. + entries_left = txq->tx_ring_size - txq->tx_desc_count;
  14701. + if (entries_left < MAX_DESCS_PER_SKB)
  14702. + netif_stop_queue(dev);
  14703. + }
  14704. spin_unlock_irqrestore(&mp->lock, flags);
  14705. return NETDEV_TX_OK;
  14706. }
  14707. -#ifdef CONFIG_NET_POLL_CONTROLLER
  14708. -static void mv643xx_netpoll(struct net_device *netdev)
  14709. +
  14710. +/* tx rate control **********************************************************/
  14711. +/*
  14712. + * Set total maximum TX rate (shared by all TX queues for this port)
  14713. + * to 'rate' bits per second, with a maximum burst of 'burst' bytes.
  14714. + */
  14715. +static void tx_set_rate(struct mv643xx_eth_private *mp, int rate, int burst)
  14716. {
  14717. - struct mv643xx_private *mp = netdev_priv(netdev);
  14718. - int port_num = mp->port_num;
  14719. + int token_rate;
  14720. + int mtu;
  14721. + int bucket_size;
  14722. +
  14723. + token_rate = ((rate / 1000) * 64) / (mp->shared->t_clk / 1000);
  14724. + if (token_rate > 1023)
  14725. + token_rate = 1023;
  14726. - wrl(mp, INTERRUPT_MASK_REG(port_num), ETH_INT_MASK_ALL);
  14727. - /* wait for previous write to complete */
  14728. - rdl(mp, INTERRUPT_MASK_REG(port_num));
  14729. + mtu = (mp->dev->mtu + 255) >> 8;
  14730. + if (mtu > 63)
  14731. + mtu = 63;
  14732. - mv643xx_eth_int_handler(netdev->irq, netdev);
  14733. + bucket_size = (burst + 255) >> 8;
  14734. + if (bucket_size > 65535)
  14735. + bucket_size = 65535;
  14736. - wrl(mp, INTERRUPT_MASK_REG(port_num), ETH_INT_UNMASK_ALL);
  14737. + if (mp->shared->tx_bw_control_moved) {
  14738. + wrl(mp, TX_BW_RATE_MOVED(mp->port_num), token_rate);
  14739. + wrl(mp, TX_BW_MTU_MOVED(mp->port_num), mtu);
  14740. + wrl(mp, TX_BW_BURST_MOVED(mp->port_num), bucket_size);
  14741. + } else {
  14742. + wrl(mp, TX_BW_RATE(mp->port_num), token_rate);
  14743. + wrl(mp, TX_BW_MTU(mp->port_num), mtu);
  14744. + wrl(mp, TX_BW_BURST(mp->port_num), bucket_size);
  14745. + }
  14746. }
  14747. -#endif
  14748. -static void mv643xx_init_ethtool_cmd(struct net_device *dev, int phy_address,
  14749. - int speed, int duplex,
  14750. - struct ethtool_cmd *cmd)
  14751. +static void txq_set_rate(struct tx_queue *txq, int rate, int burst)
  14752. {
  14753. - struct mv643xx_private *mp = netdev_priv(dev);
  14754. + struct mv643xx_eth_private *mp = txq_to_mp(txq);
  14755. + int token_rate;
  14756. + int bucket_size;
  14757. - memset(cmd, 0, sizeof(*cmd));
  14758. + token_rate = ((rate / 1000) * 64) / (mp->shared->t_clk / 1000);
  14759. + if (token_rate > 1023)
  14760. + token_rate = 1023;
  14761. - cmd->port = PORT_MII;
  14762. - cmd->transceiver = XCVR_INTERNAL;
  14763. - cmd->phy_address = phy_address;
  14764. + bucket_size = (burst + 255) >> 8;
  14765. + if (bucket_size > 65535)
  14766. + bucket_size = 65535;
  14767. - if (speed == 0) {
  14768. - cmd->autoneg = AUTONEG_ENABLE;
  14769. - /* mii lib checks, but doesn't use speed on AUTONEG_ENABLE */
  14770. - cmd->speed = SPEED_100;
  14771. - cmd->advertising = ADVERTISED_10baseT_Half |
  14772. - ADVERTISED_10baseT_Full |
  14773. - ADVERTISED_100baseT_Half |
  14774. - ADVERTISED_100baseT_Full;
  14775. - if (mp->mii.supports_gmii)
  14776. - cmd->advertising |= ADVERTISED_1000baseT_Full;
  14777. - } else {
  14778. - cmd->autoneg = AUTONEG_DISABLE;
  14779. - cmd->speed = speed;
  14780. - cmd->duplex = duplex;
  14781. - }
  14782. + wrl(mp, TXQ_BW_TOKENS(mp->port_num, txq->index), token_rate << 14);
  14783. + wrl(mp, TXQ_BW_CONF(mp->port_num, txq->index),
  14784. + (bucket_size << 10) | token_rate);
  14785. }
  14786. -/*/
  14787. - * mv643xx_eth_probe
  14788. - *
  14789. - * First function called after registering the network device.
  14790. - * It's purpose is to initialize the device as an ethernet device,
  14791. - * fill the ethernet device structure with pointers * to functions,
  14792. - * and set the MAC address of the interface
  14793. - *
  14794. - * Input : struct device *
  14795. - * Output : -ENOMEM if failed , 0 if success
  14796. - */
  14797. -static int mv643xx_eth_probe(struct platform_device *pdev)
  14798. +static void txq_set_fixed_prio_mode(struct tx_queue *txq)
  14799. {
  14800. - struct mv643xx_eth_platform_data *pd;
  14801. - int port_num;
  14802. - struct mv643xx_private *mp;
  14803. - struct net_device *dev;
  14804. - u8 *p;
  14805. - struct resource *res;
  14806. - int err;
  14807. - struct ethtool_cmd cmd;
  14808. - int duplex = DUPLEX_HALF;
  14809. - int speed = 0; /* default to auto-negotiation */
  14810. - DECLARE_MAC_BUF(mac);
  14811. + struct mv643xx_eth_private *mp = txq_to_mp(txq);
  14812. + int off;
  14813. + u32 val;
  14814. - pd = pdev->dev.platform_data;
  14815. - if (pd == NULL) {
  14816. - printk(KERN_ERR "No mv643xx_eth_platform_data\n");
  14817. - return -ENODEV;
  14818. - }
  14819. + /*
  14820. + * Turn on fixed priority mode.
  14821. + */
  14822. + if (mp->shared->tx_bw_control_moved)
  14823. + off = TXQ_FIX_PRIO_CONF_MOVED(mp->port_num);
  14824. + else
  14825. + off = TXQ_FIX_PRIO_CONF(mp->port_num);
  14826. - if (pd->shared == NULL) {
  14827. - printk(KERN_ERR "No mv643xx_eth_platform_data->shared\n");
  14828. - return -ENODEV;
  14829. - }
  14830. + val = rdl(mp, off);
  14831. + val |= 1 << txq->index;
  14832. + wrl(mp, off, val);
  14833. +}
  14834. - dev = alloc_etherdev(sizeof(struct mv643xx_private));
  14835. - if (!dev)
  14836. - return -ENOMEM;
  14837. +static void txq_set_wrr(struct tx_queue *txq, int weight)
  14838. +{
  14839. + struct mv643xx_eth_private *mp = txq_to_mp(txq);
  14840. + int off;
  14841. + u32 val;
  14842. - platform_set_drvdata(pdev, dev);
  14843. + /*
  14844. + * Turn off fixed priority mode.
  14845. + */
  14846. + if (mp->shared->tx_bw_control_moved)
  14847. + off = TXQ_FIX_PRIO_CONF_MOVED(mp->port_num);
  14848. + else
  14849. + off = TXQ_FIX_PRIO_CONF(mp->port_num);
  14850. - mp = netdev_priv(dev);
  14851. - mp->dev = dev;
  14852. -#ifdef MV643XX_NAPI
  14853. - netif_napi_add(dev, &mp->napi, mv643xx_poll, 64);
  14854. -#endif
  14855. + val = rdl(mp, off);
  14856. + val &= ~(1 << txq->index);
  14857. + wrl(mp, off, val);
  14858. - res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
  14859. - BUG_ON(!res);
  14860. - dev->irq = res->start;
  14861. + /*
  14862. + * Configure WRR weight for this queue.
  14863. + */
  14864. + off = TXQ_BW_WRR_CONF(mp->port_num, txq->index);
  14865. - dev->open = mv643xx_eth_open;
  14866. - dev->stop = mv643xx_eth_stop;
  14867. - dev->hard_start_xmit = mv643xx_eth_start_xmit;
  14868. - dev->set_mac_address = mv643xx_eth_set_mac_address;
  14869. - dev->set_multicast_list = mv643xx_eth_set_rx_mode;
  14870. + val = rdl(mp, off);
  14871. + val = (val & ~0xff) | (weight & 0xff);
  14872. + wrl(mp, off, val);
  14873. +}
  14874. - /* No need to Tx Timeout */
  14875. - dev->tx_timeout = mv643xx_eth_tx_timeout;
  14876. -#ifdef CONFIG_NET_POLL_CONTROLLER
  14877. - dev->poll_controller = mv643xx_netpoll;
  14878. -#endif
  14879. +/* mii management interface *************************************************/
  14880. +#define SMI_BUSY 0x10000000
  14881. +#define SMI_READ_VALID 0x08000000
  14882. +#define SMI_OPCODE_READ 0x04000000
  14883. +#define SMI_OPCODE_WRITE 0x00000000
  14884. - dev->watchdog_timeo = 2 * HZ;
  14885. - dev->base_addr = 0;
  14886. - dev->change_mtu = mv643xx_eth_change_mtu;
  14887. - dev->do_ioctl = mv643xx_eth_do_ioctl;
  14888. - SET_ETHTOOL_OPS(dev, &mv643xx_ethtool_ops);
  14889. +static void smi_reg_read(struct mv643xx_eth_private *mp, unsigned int addr,
  14890. + unsigned int reg, unsigned int *value)
  14891. +{
  14892. + void __iomem *smi_reg = mp->shared_smi->base + SMI_REG;
  14893. + unsigned long flags;
  14894. + int i;
  14895. +
  14896. + /* the SMI register is a shared resource */
  14897. + spin_lock_irqsave(&mp->shared_smi->phy_lock, flags);
  14898. +
  14899. + /* wait for the SMI register to become available */
  14900. + for (i = 0; readl(smi_reg) & SMI_BUSY; i++) {
  14901. + if (i == 1000) {
  14902. + printk("%s: PHY busy timeout\n", mp->dev->name);
  14903. + goto out;
  14904. + }
  14905. + udelay(10);
  14906. + }
  14907. +
  14908. + writel(SMI_OPCODE_READ | (reg << 21) | (addr << 16), smi_reg);
  14909. +
  14910. + /* now wait for the data to be valid */
  14911. + for (i = 0; !(readl(smi_reg) & SMI_READ_VALID); i++) {
  14912. + if (i == 1000) {
  14913. + printk("%s: PHY read timeout\n", mp->dev->name);
  14914. + goto out;
  14915. + }
  14916. + udelay(10);
  14917. + }
  14918. +
  14919. + *value = readl(smi_reg) & 0xffff;
  14920. +out:
  14921. + spin_unlock_irqrestore(&mp->shared_smi->phy_lock, flags);
  14922. +}
  14923. +
  14924. +static void smi_reg_write(struct mv643xx_eth_private *mp,
  14925. + unsigned int addr,
  14926. + unsigned int reg, unsigned int value)
  14927. +{
  14928. + void __iomem *smi_reg = mp->shared_smi->base + SMI_REG;
  14929. + unsigned long flags;
  14930. + int i;
  14931. +
  14932. + /* the SMI register is a shared resource */
  14933. + spin_lock_irqsave(&mp->shared_smi->phy_lock, flags);
  14934. +
  14935. + /* wait for the SMI register to become available */
  14936. + for (i = 0; readl(smi_reg) & SMI_BUSY; i++) {
  14937. + if (i == 1000) {
  14938. + printk("%s: PHY busy timeout\n", mp->dev->name);
  14939. + goto out;
  14940. + }
  14941. + udelay(10);
  14942. + }
  14943. +
  14944. + writel(SMI_OPCODE_WRITE | (reg << 21) |
  14945. + (addr << 16) | (value & 0xffff), smi_reg);
  14946. +out:
  14947. + spin_unlock_irqrestore(&mp->shared_smi->phy_lock, flags);
  14948. +}
  14949. +
  14950. +
  14951. +/* mib counters *************************************************************/
  14952. +static inline u32 mib_read(struct mv643xx_eth_private *mp, int offset)
  14953. +{
  14954. + return rdl(mp, MIB_COUNTERS(mp->port_num) + offset);
  14955. +}
  14956. +
  14957. +static void mib_counters_clear(struct mv643xx_eth_private *mp)
  14958. +{
  14959. + int i;
  14960. +
  14961. + for (i = 0; i < 0x80; i += 4)
  14962. + mib_read(mp, i);
  14963. +}
  14964. +
  14965. +static void mib_counters_update(struct mv643xx_eth_private *mp)
  14966. +{
  14967. + struct mib_counters *p = &mp->mib_counters;
  14968. +
  14969. + p->good_octets_received += mib_read(mp, 0x00);
  14970. + p->good_octets_received += (u64)mib_read(mp, 0x04) << 32;
  14971. + p->bad_octets_received += mib_read(mp, 0x08);
  14972. + p->internal_mac_transmit_err += mib_read(mp, 0x0c);
  14973. + p->good_frames_received += mib_read(mp, 0x10);
  14974. + p->bad_frames_received += mib_read(mp, 0x14);
  14975. + p->broadcast_frames_received += mib_read(mp, 0x18);
  14976. + p->multicast_frames_received += mib_read(mp, 0x1c);
  14977. + p->frames_64_octets += mib_read(mp, 0x20);
  14978. + p->frames_65_to_127_octets += mib_read(mp, 0x24);
  14979. + p->frames_128_to_255_octets += mib_read(mp, 0x28);
  14980. + p->frames_256_to_511_octets += mib_read(mp, 0x2c);
  14981. + p->frames_512_to_1023_octets += mib_read(mp, 0x30);
  14982. + p->frames_1024_to_max_octets += mib_read(mp, 0x34);
  14983. + p->good_octets_sent += mib_read(mp, 0x38);
  14984. + p->good_octets_sent += (u64)mib_read(mp, 0x3c) << 32;
  14985. + p->good_frames_sent += mib_read(mp, 0x40);
  14986. + p->excessive_collision += mib_read(mp, 0x44);
  14987. + p->multicast_frames_sent += mib_read(mp, 0x48);
  14988. + p->broadcast_frames_sent += mib_read(mp, 0x4c);
  14989. + p->unrec_mac_control_received += mib_read(mp, 0x50);
  14990. + p->fc_sent += mib_read(mp, 0x54);
  14991. + p->good_fc_received += mib_read(mp, 0x58);
  14992. + p->bad_fc_received += mib_read(mp, 0x5c);
  14993. + p->undersize_received += mib_read(mp, 0x60);
  14994. + p->fragments_received += mib_read(mp, 0x64);
  14995. + p->oversize_received += mib_read(mp, 0x68);
  14996. + p->jabber_received += mib_read(mp, 0x6c);
  14997. + p->mac_receive_error += mib_read(mp, 0x70);
  14998. + p->bad_crc_event += mib_read(mp, 0x74);
  14999. + p->collision += mib_read(mp, 0x78);
  15000. + p->late_collision += mib_read(mp, 0x7c);
  15001. +}
  15002. +
  15003. +
  15004. +/* ethtool ******************************************************************/
  15005. +struct mv643xx_eth_stats {
  15006. + char stat_string[ETH_GSTRING_LEN];
  15007. + int sizeof_stat;
  15008. + int netdev_off;
  15009. + int mp_off;
  15010. +};
  15011. +
  15012. +#define SSTAT(m) \
  15013. + { #m, FIELD_SIZEOF(struct net_device_stats, m), \
  15014. + offsetof(struct net_device, stats.m), -1 }
  15015. +
  15016. +#define MIBSTAT(m) \
  15017. + { #m, FIELD_SIZEOF(struct mib_counters, m), \
  15018. + -1, offsetof(struct mv643xx_eth_private, mib_counters.m) }
  15019. +
  15020. +static const struct mv643xx_eth_stats mv643xx_eth_stats[] = {
  15021. + SSTAT(rx_packets),
  15022. + SSTAT(tx_packets),
  15023. + SSTAT(rx_bytes),
  15024. + SSTAT(tx_bytes),
  15025. + SSTAT(rx_errors),
  15026. + SSTAT(tx_errors),
  15027. + SSTAT(rx_dropped),
  15028. + SSTAT(tx_dropped),
  15029. + MIBSTAT(good_octets_received),
  15030. + MIBSTAT(bad_octets_received),
  15031. + MIBSTAT(internal_mac_transmit_err),
  15032. + MIBSTAT(good_frames_received),
  15033. + MIBSTAT(bad_frames_received),
  15034. + MIBSTAT(broadcast_frames_received),
  15035. + MIBSTAT(multicast_frames_received),
  15036. + MIBSTAT(frames_64_octets),
  15037. + MIBSTAT(frames_65_to_127_octets),
  15038. + MIBSTAT(frames_128_to_255_octets),
  15039. + MIBSTAT(frames_256_to_511_octets),
  15040. + MIBSTAT(frames_512_to_1023_octets),
  15041. + MIBSTAT(frames_1024_to_max_octets),
  15042. + MIBSTAT(good_octets_sent),
  15043. + MIBSTAT(good_frames_sent),
  15044. + MIBSTAT(excessive_collision),
  15045. + MIBSTAT(multicast_frames_sent),
  15046. + MIBSTAT(broadcast_frames_sent),
  15047. + MIBSTAT(unrec_mac_control_received),
  15048. + MIBSTAT(fc_sent),
  15049. + MIBSTAT(good_fc_received),
  15050. + MIBSTAT(bad_fc_received),
  15051. + MIBSTAT(undersize_received),
  15052. + MIBSTAT(fragments_received),
  15053. + MIBSTAT(oversize_received),
  15054. + MIBSTAT(jabber_received),
  15055. + MIBSTAT(mac_receive_error),
  15056. + MIBSTAT(bad_crc_event),
  15057. + MIBSTAT(collision),
  15058. + MIBSTAT(late_collision),
  15059. +};
  15060. +
  15061. +static int mv643xx_eth_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
  15062. +{
  15063. + struct mv643xx_eth_private *mp = netdev_priv(dev);
  15064. + int err;
  15065. +
  15066. + spin_lock_irq(&mp->lock);
  15067. + err = mii_ethtool_gset(&mp->mii, cmd);
  15068. + spin_unlock_irq(&mp->lock);
  15069. -#ifdef MV643XX_CHECKSUM_OFFLOAD_TX
  15070. -#ifdef MAX_SKB_FRAGS
  15071. /*
  15072. - * Zero copy can only work if we use Discovery II memory. Else, we will
  15073. - * have to map the buffers to ISA memory which is only 16 MB
  15074. + * The MAC does not support 1000baseT_Half.
  15075. */
  15076. - dev->features = NETIF_F_SG | NETIF_F_IP_CSUM;
  15077. -#endif
  15078. -#endif
  15079. + cmd->supported &= ~SUPPORTED_1000baseT_Half;
  15080. + cmd->advertising &= ~ADVERTISED_1000baseT_Half;
  15081. - /* Configure the timeout task */
  15082. - INIT_WORK(&mp->tx_timeout_task, mv643xx_eth_tx_timeout_task);
  15083. + return err;
  15084. +}
  15085. - spin_lock_init(&mp->lock);
  15086. +static int mv643xx_eth_get_settings_phyless(struct net_device *dev, struct ethtool_cmd *cmd)
  15087. +{
  15088. + cmd->supported = SUPPORTED_MII;
  15089. + cmd->advertising = ADVERTISED_MII;
  15090. + cmd->speed = SPEED_1000;
  15091. + cmd->duplex = DUPLEX_FULL;
  15092. + cmd->port = PORT_MII;
  15093. + cmd->phy_address = 0;
  15094. + cmd->transceiver = XCVR_INTERNAL;
  15095. + cmd->autoneg = AUTONEG_DISABLE;
  15096. + cmd->maxtxpkt = 1;
  15097. + cmd->maxrxpkt = 1;
  15098. - mp->shared = platform_get_drvdata(pd->shared);
  15099. - port_num = mp->port_num = pd->port_number;
  15100. + return 0;
  15101. +}
  15102. - if (mp->shared->win_protect)
  15103. - wrl(mp, WINDOW_PROTECT(port_num), mp->shared->win_protect);
  15104. +static int mv643xx_eth_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
  15105. +{
  15106. + struct mv643xx_eth_private *mp = netdev_priv(dev);
  15107. + int err;
  15108. - mp->shared_smi = mp->shared;
  15109. - if (pd->shared_smi != NULL)
  15110. - mp->shared_smi = platform_get_drvdata(pd->shared_smi);
  15111. -
  15112. - /* set default config values */
  15113. - eth_port_uc_addr_get(mp, dev->dev_addr);
  15114. - mp->rx_ring_size = PORT_DEFAULT_RECEIVE_QUEUE_SIZE;
  15115. - mp->tx_ring_size = PORT_DEFAULT_TRANSMIT_QUEUE_SIZE;
  15116. + /*
  15117. + * The MAC does not support 1000baseT_Half.
  15118. + */
  15119. + cmd->advertising &= ~ADVERTISED_1000baseT_Half;
  15120. - if (is_valid_ether_addr(pd->mac_addr))
  15121. - memcpy(dev->dev_addr, pd->mac_addr, 6);
  15122. + spin_lock_irq(&mp->lock);
  15123. + err = mii_ethtool_sset(&mp->mii, cmd);
  15124. + spin_unlock_irq(&mp->lock);
  15125. - if (pd->phy_addr || pd->force_phy_addr)
  15126. - ethernet_phy_set(mp, pd->phy_addr);
  15127. + return err;
  15128. +}
  15129. - if (pd->rx_queue_size)
  15130. - mp->rx_ring_size = pd->rx_queue_size;
  15131. +static int mv643xx_eth_set_settings_phyless(struct net_device *dev, struct ethtool_cmd *cmd)
  15132. +{
  15133. + return -EINVAL;
  15134. +}
  15135. - if (pd->tx_queue_size)
  15136. - mp->tx_ring_size = pd->tx_queue_size;
  15137. +static void mv643xx_eth_get_drvinfo(struct net_device *dev,
  15138. + struct ethtool_drvinfo *drvinfo)
  15139. +{
  15140. + strncpy(drvinfo->driver, mv643xx_eth_driver_name, 32);
  15141. + strncpy(drvinfo->version, mv643xx_eth_driver_version, 32);
  15142. + strncpy(drvinfo->fw_version, "N/A", 32);
  15143. + strncpy(drvinfo->bus_info, "platform", 32);
  15144. + drvinfo->n_stats = ARRAY_SIZE(mv643xx_eth_stats);
  15145. +}
  15146. +
  15147. +static int mv643xx_eth_nway_reset(struct net_device *dev)
  15148. +{
  15149. + struct mv643xx_eth_private *mp = netdev_priv(dev);
  15150. - if (pd->tx_sram_size) {
  15151. - mp->tx_sram_size = pd->tx_sram_size;
  15152. - mp->tx_sram_addr = pd->tx_sram_addr;
  15153. + return mii_nway_restart(&mp->mii);
  15154. +}
  15155. +
  15156. +static int mv643xx_eth_nway_reset_phyless(struct net_device *dev)
  15157. +{
  15158. + return -EINVAL;
  15159. +}
  15160. +
  15161. +static u32 mv643xx_eth_get_link(struct net_device *dev)
  15162. +{
  15163. + struct mv643xx_eth_private *mp = netdev_priv(dev);
  15164. +
  15165. + return mii_link_ok(&mp->mii);
  15166. +}
  15167. +
  15168. +static u32 mv643xx_eth_get_link_phyless(struct net_device *dev)
  15169. +{
  15170. + return 1;
  15171. +}
  15172. +
  15173. +static void mv643xx_eth_get_strings(struct net_device *dev,
  15174. + uint32_t stringset, uint8_t *data)
  15175. +{
  15176. + int i;
  15177. +
  15178. + if (stringset == ETH_SS_STATS) {
  15179. + for (i = 0; i < ARRAY_SIZE(mv643xx_eth_stats); i++) {
  15180. + memcpy(data + i * ETH_GSTRING_LEN,
  15181. + mv643xx_eth_stats[i].stat_string,
  15182. + ETH_GSTRING_LEN);
  15183. + }
  15184. }
  15185. +}
  15186. +
  15187. +static void mv643xx_eth_get_ethtool_stats(struct net_device *dev,
  15188. + struct ethtool_stats *stats,
  15189. + uint64_t *data)
  15190. +{
  15191. + struct mv643xx_eth_private *mp = dev->priv;
  15192. + int i;
  15193. +
  15194. + mib_counters_update(mp);
  15195. +
  15196. + for (i = 0; i < ARRAY_SIZE(mv643xx_eth_stats); i++) {
  15197. + const struct mv643xx_eth_stats *stat;
  15198. + void *p;
  15199. +
  15200. + stat = mv643xx_eth_stats + i;
  15201. +
  15202. + if (stat->netdev_off >= 0)
  15203. + p = ((void *)mp->dev) + stat->netdev_off;
  15204. + else
  15205. + p = ((void *)mp) + stat->mp_off;
  15206. - if (pd->rx_sram_size) {
  15207. - mp->rx_sram_size = pd->rx_sram_size;
  15208. - mp->rx_sram_addr = pd->rx_sram_addr;
  15209. + data[i] = (stat->sizeof_stat == 8) ?
  15210. + *(uint64_t *)p : *(uint32_t *)p;
  15211. }
  15212. +}
  15213. - duplex = pd->duplex;
  15214. - speed = pd->speed;
  15215. +static int mv643xx_eth_get_sset_count(struct net_device *dev, int sset)
  15216. +{
  15217. + if (sset == ETH_SS_STATS)
  15218. + return ARRAY_SIZE(mv643xx_eth_stats);
  15219. - /* Hook up MII support for ethtool */
  15220. - mp->mii.dev = dev;
  15221. - mp->mii.mdio_read = mv643xx_mdio_read;
  15222. - mp->mii.mdio_write = mv643xx_mdio_write;
  15223. - mp->mii.phy_id = ethernet_phy_get(mp);
  15224. - mp->mii.phy_id_mask = 0x3f;
  15225. - mp->mii.reg_num_mask = 0x1f;
  15226. + return -EOPNOTSUPP;
  15227. +}
  15228. - err = ethernet_phy_detect(mp);
  15229. - if (err) {
  15230. - pr_debug("%s: No PHY detected at addr %d\n",
  15231. - dev->name, ethernet_phy_get(mp));
  15232. +static const struct ethtool_ops mv643xx_eth_ethtool_ops = {
  15233. + .get_settings = mv643xx_eth_get_settings,
  15234. + .set_settings = mv643xx_eth_set_settings,
  15235. + .get_drvinfo = mv643xx_eth_get_drvinfo,
  15236. + .nway_reset = mv643xx_eth_nway_reset,
  15237. + .get_link = mv643xx_eth_get_link,
  15238. + .set_sg = ethtool_op_set_sg,
  15239. + .get_strings = mv643xx_eth_get_strings,
  15240. + .get_ethtool_stats = mv643xx_eth_get_ethtool_stats,
  15241. + .get_sset_count = mv643xx_eth_get_sset_count,
  15242. +};
  15243. +
  15244. +static const struct ethtool_ops mv643xx_eth_ethtool_ops_phyless = {
  15245. + .get_settings = mv643xx_eth_get_settings_phyless,
  15246. + .set_settings = mv643xx_eth_set_settings_phyless,
  15247. + .get_drvinfo = mv643xx_eth_get_drvinfo,
  15248. + .nway_reset = mv643xx_eth_nway_reset_phyless,
  15249. + .get_link = mv643xx_eth_get_link_phyless,
  15250. + .set_sg = ethtool_op_set_sg,
  15251. + .get_strings = mv643xx_eth_get_strings,
  15252. + .get_ethtool_stats = mv643xx_eth_get_ethtool_stats,
  15253. + .get_sset_count = mv643xx_eth_get_sset_count,
  15254. +};
  15255. +
  15256. +
  15257. +/* address handling *********************************************************/
  15258. +static void uc_addr_get(struct mv643xx_eth_private *mp, unsigned char *addr)
  15259. +{
  15260. + unsigned int mac_h;
  15261. + unsigned int mac_l;
  15262. +
  15263. + mac_h = rdl(mp, MAC_ADDR_HIGH(mp->port_num));
  15264. + mac_l = rdl(mp, MAC_ADDR_LOW(mp->port_num));
  15265. +
  15266. + addr[0] = (mac_h >> 24) & 0xff;
  15267. + addr[1] = (mac_h >> 16) & 0xff;
  15268. + addr[2] = (mac_h >> 8) & 0xff;
  15269. + addr[3] = mac_h & 0xff;
  15270. + addr[4] = (mac_l >> 8) & 0xff;
  15271. + addr[5] = mac_l & 0xff;
  15272. +}
  15273. +
  15274. +static void init_mac_tables(struct mv643xx_eth_private *mp)
  15275. +{
  15276. + int i;
  15277. +
  15278. + for (i = 0; i < 0x100; i += 4) {
  15279. + wrl(mp, SPECIAL_MCAST_TABLE(mp->port_num) + i, 0);
  15280. + wrl(mp, OTHER_MCAST_TABLE(mp->port_num) + i, 0);
  15281. + }
  15282. +
  15283. + for (i = 0; i < 0x10; i += 4)
  15284. + wrl(mp, UNICAST_TABLE(mp->port_num) + i, 0);
  15285. +}
  15286. +
  15287. +static void set_filter_table_entry(struct mv643xx_eth_private *mp,
  15288. + int table, unsigned char entry)
  15289. +{
  15290. + unsigned int table_reg;
  15291. +
  15292. + /* Set "accepts frame bit" at specified table entry */
  15293. + table_reg = rdl(mp, table + (entry & 0xfc));
  15294. + table_reg |= 0x01 << (8 * (entry & 3));
  15295. + wrl(mp, table + (entry & 0xfc), table_reg);
  15296. +}
  15297. +
  15298. +static void uc_addr_set(struct mv643xx_eth_private *mp, unsigned char *addr)
  15299. +{
  15300. + unsigned int mac_h;
  15301. + unsigned int mac_l;
  15302. + int table;
  15303. +
  15304. + mac_l = (addr[4] << 8) | addr[5];
  15305. + mac_h = (addr[0] << 24) | (addr[1] << 16) | (addr[2] << 8) | addr[3];
  15306. +
  15307. + wrl(mp, MAC_ADDR_LOW(mp->port_num), mac_l);
  15308. + wrl(mp, MAC_ADDR_HIGH(mp->port_num), mac_h);
  15309. +
  15310. + table = UNICAST_TABLE(mp->port_num);
  15311. + set_filter_table_entry(mp, table, addr[5] & 0x0f);
  15312. +}
  15313. +
  15314. +static int mv643xx_eth_set_mac_address(struct net_device *dev, void *addr)
  15315. +{
  15316. + struct mv643xx_eth_private *mp = netdev_priv(dev);
  15317. +
  15318. + /* +2 is for the offset of the HW addr type */
  15319. + memcpy(dev->dev_addr, addr + 2, 6);
  15320. +
  15321. + init_mac_tables(mp);
  15322. + uc_addr_set(mp, dev->dev_addr);
  15323. +
  15324. + return 0;
  15325. +}
  15326. +
  15327. +static int addr_crc(unsigned char *addr)
  15328. +{
  15329. + int crc = 0;
  15330. + int i;
  15331. +
  15332. + for (i = 0; i < 6; i++) {
  15333. + int j;
  15334. +
  15335. + crc = (crc ^ addr[i]) << 8;
  15336. + for (j = 7; j >= 0; j--) {
  15337. + if (crc & (0x100 << j))
  15338. + crc ^= 0x107 << j;
  15339. + }
  15340. + }
  15341. +
  15342. + return crc;
  15343. +}
  15344. +
  15345. +static void mv643xx_eth_set_rx_mode(struct net_device *dev)
  15346. +{
  15347. + struct mv643xx_eth_private *mp = netdev_priv(dev);
  15348. + u32 port_config;
  15349. + struct dev_addr_list *addr;
  15350. + int i;
  15351. +
  15352. + port_config = rdl(mp, PORT_CONFIG(mp->port_num));
  15353. + if (dev->flags & IFF_PROMISC)
  15354. + port_config |= UNICAST_PROMISCUOUS_MODE;
  15355. + else
  15356. + port_config &= ~UNICAST_PROMISCUOUS_MODE;
  15357. + wrl(mp, PORT_CONFIG(mp->port_num), port_config);
  15358. +
  15359. + if (dev->flags & (IFF_PROMISC | IFF_ALLMULTI)) {
  15360. + int port_num = mp->port_num;
  15361. + u32 accept = 0x01010101;
  15362. +
  15363. + for (i = 0; i < 0x100; i += 4) {
  15364. + wrl(mp, SPECIAL_MCAST_TABLE(port_num) + i, accept);
  15365. + wrl(mp, OTHER_MCAST_TABLE(port_num) + i, accept);
  15366. + }
  15367. + return;
  15368. + }
  15369. +
  15370. + for (i = 0; i < 0x100; i += 4) {
  15371. + wrl(mp, SPECIAL_MCAST_TABLE(mp->port_num) + i, 0);
  15372. + wrl(mp, OTHER_MCAST_TABLE(mp->port_num) + i, 0);
  15373. + }
  15374. +
  15375. + for (addr = dev->mc_list; addr != NULL; addr = addr->next) {
  15376. + u8 *a = addr->da_addr;
  15377. + int table;
  15378. +
  15379. + if (addr->da_addrlen != 6)
  15380. + continue;
  15381. +
  15382. + if (memcmp(a, "\x01\x00\x5e\x00\x00", 5) == 0) {
  15383. + table = SPECIAL_MCAST_TABLE(mp->port_num);
  15384. + set_filter_table_entry(mp, table, a[5]);
  15385. + } else {
  15386. + int crc = addr_crc(a);
  15387. +
  15388. + table = OTHER_MCAST_TABLE(mp->port_num);
  15389. + set_filter_table_entry(mp, table, crc);
  15390. + }
  15391. + }
  15392. +}
  15393. +
  15394. +
  15395. +/* rx/tx queue initialisation ***********************************************/
  15396. +static int rxq_init(struct mv643xx_eth_private *mp, int index)
  15397. +{
  15398. + struct rx_queue *rxq = mp->rxq + index;
  15399. + struct rx_desc *rx_desc;
  15400. + int size;
  15401. + int i;
  15402. +
  15403. + rxq->index = index;
  15404. +
  15405. + rxq->rx_ring_size = mp->default_rx_ring_size;
  15406. +
  15407. + rxq->rx_desc_count = 0;
  15408. + rxq->rx_curr_desc = 0;
  15409. + rxq->rx_used_desc = 0;
  15410. +
  15411. + size = rxq->rx_ring_size * sizeof(struct rx_desc);
  15412. +
  15413. + if (index == mp->rxq_primary && size <= mp->rx_desc_sram_size) {
  15414. + rxq->rx_desc_area = ioremap(mp->rx_desc_sram_addr,
  15415. + mp->rx_desc_sram_size);
  15416. + rxq->rx_desc_dma = mp->rx_desc_sram_addr;
  15417. + } else {
  15418. + rxq->rx_desc_area = dma_alloc_coherent(NULL, size,
  15419. + &rxq->rx_desc_dma,
  15420. + GFP_KERNEL);
  15421. + }
  15422. +
  15423. + if (rxq->rx_desc_area == NULL) {
  15424. + dev_printk(KERN_ERR, &mp->dev->dev,
  15425. + "can't allocate rx ring (%d bytes)\n", size);
  15426. goto out;
  15427. }
  15428. + memset(rxq->rx_desc_area, 0, size);
  15429. - ethernet_phy_reset(mp);
  15430. - mp->mii.supports_gmii = mii_check_gmii_support(&mp->mii);
  15431. - mv643xx_init_ethtool_cmd(dev, mp->mii.phy_id, speed, duplex, &cmd);
  15432. - mv643xx_eth_update_pscr(dev, &cmd);
  15433. - mv643xx_set_settings(dev, &cmd);
  15434. + rxq->rx_desc_area_size = size;
  15435. + rxq->rx_skb = kmalloc(rxq->rx_ring_size * sizeof(*rxq->rx_skb),
  15436. + GFP_KERNEL);
  15437. + if (rxq->rx_skb == NULL) {
  15438. + dev_printk(KERN_ERR, &mp->dev->dev,
  15439. + "can't allocate rx skb ring\n");
  15440. + goto out_free;
  15441. + }
  15442. - SET_NETDEV_DEV(dev, &pdev->dev);
  15443. - err = register_netdev(dev);
  15444. - if (err)
  15445. + rx_desc = (struct rx_desc *)rxq->rx_desc_area;
  15446. + for (i = 0; i < rxq->rx_ring_size; i++) {
  15447. + int nexti = (i + 1) % rxq->rx_ring_size;
  15448. + rx_desc[i].next_desc_ptr = rxq->rx_desc_dma +
  15449. + nexti * sizeof(struct rx_desc);
  15450. + }
  15451. +
  15452. + init_timer(&rxq->rx_oom);
  15453. + rxq->rx_oom.data = (unsigned long)rxq;
  15454. + rxq->rx_oom.function = rxq_refill_timer_wrapper;
  15455. +
  15456. + return 0;
  15457. +
  15458. +
  15459. +out_free:
  15460. + if (index == mp->rxq_primary && size <= mp->rx_desc_sram_size)
  15461. + iounmap(rxq->rx_desc_area);
  15462. + else
  15463. + dma_free_coherent(NULL, size,
  15464. + rxq->rx_desc_area,
  15465. + rxq->rx_desc_dma);
  15466. +
  15467. +out:
  15468. + return -ENOMEM;
  15469. +}
  15470. +
  15471. +static void rxq_deinit(struct rx_queue *rxq)
  15472. +{
  15473. + struct mv643xx_eth_private *mp = rxq_to_mp(rxq);
  15474. + int i;
  15475. +
  15476. + rxq_disable(rxq);
  15477. +
  15478. + del_timer_sync(&rxq->rx_oom);
  15479. +
  15480. + for (i = 0; i < rxq->rx_ring_size; i++) {
  15481. + if (rxq->rx_skb[i]) {
  15482. + dev_kfree_skb(rxq->rx_skb[i]);
  15483. + rxq->rx_desc_count--;
  15484. + }
  15485. + }
  15486. +
  15487. + if (rxq->rx_desc_count) {
  15488. + dev_printk(KERN_ERR, &mp->dev->dev,
  15489. + "error freeing rx ring -- %d skbs stuck\n",
  15490. + rxq->rx_desc_count);
  15491. + }
  15492. +
  15493. + if (rxq->index == mp->rxq_primary &&
  15494. + rxq->rx_desc_area_size <= mp->rx_desc_sram_size)
  15495. + iounmap(rxq->rx_desc_area);
  15496. + else
  15497. + dma_free_coherent(NULL, rxq->rx_desc_area_size,
  15498. + rxq->rx_desc_area, rxq->rx_desc_dma);
  15499. +
  15500. + kfree(rxq->rx_skb);
  15501. +}
  15502. +
  15503. +static int txq_init(struct mv643xx_eth_private *mp, int index)
  15504. +{
  15505. + struct tx_queue *txq = mp->txq + index;
  15506. + struct tx_desc *tx_desc;
  15507. + int size;
  15508. + int i;
  15509. +
  15510. + txq->index = index;
  15511. +
  15512. + txq->tx_ring_size = mp->default_tx_ring_size;
  15513. +
  15514. + txq->tx_desc_count = 0;
  15515. + txq->tx_curr_desc = 0;
  15516. + txq->tx_used_desc = 0;
  15517. +
  15518. + size = txq->tx_ring_size * sizeof(struct tx_desc);
  15519. +
  15520. + if (index == mp->txq_primary && size <= mp->tx_desc_sram_size) {
  15521. + txq->tx_desc_area = ioremap(mp->tx_desc_sram_addr,
  15522. + mp->tx_desc_sram_size);
  15523. + txq->tx_desc_dma = mp->tx_desc_sram_addr;
  15524. + } else {
  15525. + txq->tx_desc_area = dma_alloc_coherent(NULL, size,
  15526. + &txq->tx_desc_dma,
  15527. + GFP_KERNEL);
  15528. + }
  15529. +
  15530. + if (txq->tx_desc_area == NULL) {
  15531. + dev_printk(KERN_ERR, &mp->dev->dev,
  15532. + "can't allocate tx ring (%d bytes)\n", size);
  15533. goto out;
  15534. + }
  15535. + memset(txq->tx_desc_area, 0, size);
  15536. - p = dev->dev_addr;
  15537. - printk(KERN_NOTICE
  15538. - "%s: port %d with MAC address %s\n",
  15539. - dev->name, port_num, print_mac(mac, p));
  15540. + txq->tx_desc_area_size = size;
  15541. + txq->tx_skb = kmalloc(txq->tx_ring_size * sizeof(*txq->tx_skb),
  15542. + GFP_KERNEL);
  15543. + if (txq->tx_skb == NULL) {
  15544. + dev_printk(KERN_ERR, &mp->dev->dev,
  15545. + "can't allocate tx skb ring\n");
  15546. + goto out_free;
  15547. + }
  15548. - if (dev->features & NETIF_F_SG)
  15549. - printk(KERN_NOTICE "%s: Scatter Gather Enabled\n", dev->name);
  15550. + tx_desc = (struct tx_desc *)txq->tx_desc_area;
  15551. + for (i = 0; i < txq->tx_ring_size; i++) {
  15552. + int nexti = (i + 1) % txq->tx_ring_size;
  15553. + tx_desc[i].next_desc_ptr = txq->tx_desc_dma +
  15554. + nexti * sizeof(struct tx_desc);
  15555. + }
  15556. - if (dev->features & NETIF_F_IP_CSUM)
  15557. - printk(KERN_NOTICE "%s: TX TCP/IP Checksumming Supported\n",
  15558. - dev->name);
  15559. + return 0;
  15560. +
  15561. +
  15562. +out_free:
  15563. + if (index == mp->txq_primary && size <= mp->tx_desc_sram_size)
  15564. + iounmap(txq->tx_desc_area);
  15565. + else
  15566. + dma_free_coherent(NULL, size,
  15567. + txq->tx_desc_area,
  15568. + txq->tx_desc_dma);
  15569. +
  15570. +out:
  15571. + return -ENOMEM;
  15572. +}
  15573. +
  15574. +static void txq_reclaim(struct tx_queue *txq, int force)
  15575. +{
  15576. + struct mv643xx_eth_private *mp = txq_to_mp(txq);
  15577. + unsigned long flags;
  15578. +
  15579. + spin_lock_irqsave(&mp->lock, flags);
  15580. + while (txq->tx_desc_count > 0) {
  15581. + int tx_index;
  15582. + struct tx_desc *desc;
  15583. + u32 cmd_sts;
  15584. + struct sk_buff *skb;
  15585. + dma_addr_t addr;
  15586. + int count;
  15587. +
  15588. + tx_index = txq->tx_used_desc;
  15589. + desc = &txq->tx_desc_area[tx_index];
  15590. + cmd_sts = desc->cmd_sts;
  15591. +
  15592. + if (!force && (cmd_sts & BUFFER_OWNED_BY_DMA))
  15593. + break;
  15594. +
  15595. + txq->tx_used_desc = (tx_index + 1) % txq->tx_ring_size;
  15596. + txq->tx_desc_count--;
  15597. +
  15598. + addr = desc->buf_ptr;
  15599. + count = desc->byte_cnt;
  15600. + skb = txq->tx_skb[tx_index];
  15601. + txq->tx_skb[tx_index] = NULL;
  15602. +
  15603. + if (cmd_sts & ERROR_SUMMARY) {
  15604. + dev_printk(KERN_INFO, &mp->dev->dev, "tx error\n");
  15605. + mp->dev->stats.tx_errors++;
  15606. + }
  15607. +
  15608. + /*
  15609. + * Drop mp->lock while we free the skb.
  15610. + */
  15611. + spin_unlock_irqrestore(&mp->lock, flags);
  15612. -#ifdef MV643XX_CHECKSUM_OFFLOAD_TX
  15613. - printk(KERN_NOTICE "%s: RX TCP/UDP Checksum Offload ON \n", dev->name);
  15614. + if (cmd_sts & TX_FIRST_DESC)
  15615. + dma_unmap_single(NULL, addr, count, DMA_TO_DEVICE);
  15616. + else
  15617. + dma_unmap_page(NULL, addr, count, DMA_TO_DEVICE);
  15618. +
  15619. + if (skb)
  15620. + dev_kfree_skb_irq(skb);
  15621. +
  15622. + spin_lock_irqsave(&mp->lock, flags);
  15623. + }
  15624. + spin_unlock_irqrestore(&mp->lock, flags);
  15625. +}
  15626. +
  15627. +static void txq_deinit(struct tx_queue *txq)
  15628. +{
  15629. + struct mv643xx_eth_private *mp = txq_to_mp(txq);
  15630. +
  15631. + txq_disable(txq);
  15632. + txq_reclaim(txq, 1);
  15633. +
  15634. + BUG_ON(txq->tx_used_desc != txq->tx_curr_desc);
  15635. +
  15636. + if (txq->index == mp->txq_primary &&
  15637. + txq->tx_desc_area_size <= mp->tx_desc_sram_size)
  15638. + iounmap(txq->tx_desc_area);
  15639. + else
  15640. + dma_free_coherent(NULL, txq->tx_desc_area_size,
  15641. + txq->tx_desc_area, txq->tx_desc_dma);
  15642. +
  15643. + kfree(txq->tx_skb);
  15644. +}
  15645. +
  15646. +
  15647. +/* netdev ops and related ***************************************************/
  15648. +static void update_pscr(struct mv643xx_eth_private *mp, int speed, int duplex)
  15649. +{
  15650. + u32 pscr_o;
  15651. + u32 pscr_n;
  15652. +
  15653. + pscr_o = rdl(mp, PORT_SERIAL_CONTROL(mp->port_num));
  15654. +
  15655. + /* clear speed, duplex and rx buffer size fields */
  15656. + pscr_n = pscr_o & ~(SET_MII_SPEED_TO_100 |
  15657. + SET_GMII_SPEED_TO_1000 |
  15658. + SET_FULL_DUPLEX_MODE |
  15659. + MAX_RX_PACKET_MASK);
  15660. +
  15661. + if (speed == SPEED_1000) {
  15662. + pscr_n |= SET_GMII_SPEED_TO_1000 | MAX_RX_PACKET_9700BYTE;
  15663. + } else {
  15664. + if (speed == SPEED_100)
  15665. + pscr_n |= SET_MII_SPEED_TO_100;
  15666. + pscr_n |= MAX_RX_PACKET_1522BYTE;
  15667. + }
  15668. +
  15669. + if (duplex == DUPLEX_FULL)
  15670. + pscr_n |= SET_FULL_DUPLEX_MODE;
  15671. +
  15672. + if (pscr_n != pscr_o) {
  15673. + if ((pscr_o & SERIAL_PORT_ENABLE) == 0)
  15674. + wrl(mp, PORT_SERIAL_CONTROL(mp->port_num), pscr_n);
  15675. + else {
  15676. + int i;
  15677. +
  15678. + for (i = 0; i < 8; i++)
  15679. + if (mp->txq_mask & (1 << i))
  15680. + txq_disable(mp->txq + i);
  15681. +
  15682. + pscr_o &= ~SERIAL_PORT_ENABLE;
  15683. + wrl(mp, PORT_SERIAL_CONTROL(mp->port_num), pscr_o);
  15684. + wrl(mp, PORT_SERIAL_CONTROL(mp->port_num), pscr_n);
  15685. + wrl(mp, PORT_SERIAL_CONTROL(mp->port_num), pscr_n);
  15686. +
  15687. + for (i = 0; i < 8; i++)
  15688. + if (mp->txq_mask & (1 << i))
  15689. + txq_enable(mp->txq + i);
  15690. + }
  15691. + }
  15692. +}
  15693. +
  15694. +static irqreturn_t mv643xx_eth_irq(int irq, void *dev_id)
  15695. +{
  15696. + struct net_device *dev = (struct net_device *)dev_id;
  15697. + struct mv643xx_eth_private *mp = netdev_priv(dev);
  15698. + u32 int_cause;
  15699. + u32 int_cause_ext;
  15700. + u32 txq_active;
  15701. +
  15702. + int_cause = rdl(mp, INT_CAUSE(mp->port_num)) &
  15703. + (INT_TX_END | INT_RX | INT_EXT);
  15704. + if (int_cause == 0)
  15705. + return IRQ_NONE;
  15706. +
  15707. + int_cause_ext = 0;
  15708. + if (int_cause & INT_EXT) {
  15709. + int_cause_ext = rdl(mp, INT_CAUSE_EXT(mp->port_num))
  15710. + & (INT_EXT_LINK | INT_EXT_PHY | INT_EXT_TX);
  15711. + wrl(mp, INT_CAUSE_EXT(mp->port_num), ~int_cause_ext);
  15712. + }
  15713. +
  15714. + if (int_cause_ext & (INT_EXT_PHY | INT_EXT_LINK)) {
  15715. + if (mp->phy_addr == -1 || mii_link_ok(&mp->mii)) {
  15716. + int i;
  15717. +
  15718. + if (mp->phy_addr != -1) {
  15719. + struct ethtool_cmd cmd;
  15720. +
  15721. + mii_ethtool_gset(&mp->mii, &cmd);
  15722. + update_pscr(mp, cmd.speed, cmd.duplex);
  15723. + }
  15724. +
  15725. + for (i = 0; i < 8; i++)
  15726. + if (mp->txq_mask & (1 << i))
  15727. + txq_enable(mp->txq + i);
  15728. +
  15729. + if (!netif_carrier_ok(dev)) {
  15730. + netif_carrier_on(dev);
  15731. + __txq_maybe_wake(mp->txq + mp->txq_primary);
  15732. + }
  15733. + } else if (netif_carrier_ok(dev)) {
  15734. + netif_stop_queue(dev);
  15735. + netif_carrier_off(dev);
  15736. + }
  15737. + }
  15738. +
  15739. + /*
  15740. + * RxBuffer or RxError set for any of the 8 queues?
  15741. + */
  15742. +#ifdef MV643XX_ETH_NAPI
  15743. + if (int_cause & INT_RX) {
  15744. + wrl(mp, INT_MASK(mp->port_num), 0x00000000);
  15745. + rdl(mp, INT_MASK(mp->port_num));
  15746. +
  15747. + netif_rx_schedule(dev, &mp->napi);
  15748. + }
  15749. +#else
  15750. + if (int_cause & INT_RX) {
  15751. + int i;
  15752. +
  15753. + for (i = 7; i >= 0; i--)
  15754. + if (mp->rxq_mask & (1 << i))
  15755. + rxq_process(mp->rxq + i, INT_MAX);
  15756. + }
  15757. #endif
  15758. -#ifdef MV643XX_COAL
  15759. - printk(KERN_NOTICE "%s: TX and RX Interrupt Coalescing ON \n",
  15760. - dev->name);
  15761. -#endif
  15762. + txq_active = rdl(mp, TXQ_COMMAND(mp->port_num));
  15763. +
  15764. + /*
  15765. + * TxBuffer or TxError set for any of the 8 queues?
  15766. + */
  15767. + if (int_cause_ext & INT_EXT_TX) {
  15768. + int i;
  15769. +
  15770. + for (i = 0; i < 8; i++)
  15771. + if (mp->txq_mask & (1 << i))
  15772. + txq_reclaim(mp->txq + i, 0);
  15773. + }
  15774. +
  15775. + /*
  15776. + * Any TxEnd interrupts?
  15777. + */
  15778. + if (int_cause & INT_TX_END) {
  15779. + int i;
  15780. +
  15781. + wrl(mp, INT_CAUSE(mp->port_num), ~(int_cause & INT_TX_END));
  15782. + for (i = 0; i < 8; i++) {
  15783. + struct tx_queue *txq = mp->txq + i;
  15784. + if (txq->tx_desc_count && !((txq_active >> i) & 1))
  15785. + txq_enable(txq);
  15786. + }
  15787. + }
  15788. +
  15789. + /*
  15790. + * Enough space again in the primary TX queue for a full packet?
  15791. + */
  15792. + if (int_cause_ext & INT_EXT_TX) {
  15793. + struct tx_queue *txq = mp->txq + mp->txq_primary;
  15794. + __txq_maybe_wake(txq);
  15795. + }
  15796. +
  15797. + return IRQ_HANDLED;
  15798. +}
  15799. +
  15800. +static void phy_reset(struct mv643xx_eth_private *mp)
  15801. +{
  15802. + unsigned int data;
  15803. +
  15804. + smi_reg_read(mp, mp->phy_addr, 0, &data);
  15805. + data |= 0x8000;
  15806. + smi_reg_write(mp, mp->phy_addr, 0, data);
  15807. +
  15808. + do {
  15809. + udelay(1);
  15810. + smi_reg_read(mp, mp->phy_addr, 0, &data);
  15811. + } while (data & 0x8000);
  15812. +}
  15813. +
  15814. +static void port_start(struct mv643xx_eth_private *mp)
  15815. +{
  15816. + u32 pscr;
  15817. + int i;
  15818. +
  15819. + /*
  15820. + * Configure basic link parameters.
  15821. + */
  15822. + pscr = rdl(mp, PORT_SERIAL_CONTROL(mp->port_num));
  15823. + pscr &= ~(SERIAL_PORT_ENABLE | FORCE_LINK_PASS);
  15824. + wrl(mp, PORT_SERIAL_CONTROL(mp->port_num), pscr);
  15825. + pscr |= DISABLE_AUTO_NEG_FOR_FLOW_CTRL |
  15826. + DISABLE_AUTO_NEG_SPEED_GMII |
  15827. + DISABLE_AUTO_NEG_FOR_DUPLEX |
  15828. + DO_NOT_FORCE_LINK_FAIL |
  15829. + SERIAL_PORT_CONTROL_RESERVED;
  15830. + wrl(mp, PORT_SERIAL_CONTROL(mp->port_num), pscr);
  15831. + pscr |= SERIAL_PORT_ENABLE;
  15832. + wrl(mp, PORT_SERIAL_CONTROL(mp->port_num), pscr);
  15833. +
  15834. + wrl(mp, SDMA_CONFIG(mp->port_num), PORT_SDMA_CONFIG_DEFAULT_VALUE);
  15835. +
  15836. + /*
  15837. + * Perform PHY reset, if there is a PHY.
  15838. + */
  15839. + if (mp->phy_addr != -1) {
  15840. + struct ethtool_cmd cmd;
  15841. +
  15842. + mv643xx_eth_get_settings(mp->dev, &cmd);
  15843. + phy_reset(mp);
  15844. + mv643xx_eth_set_settings(mp->dev, &cmd);
  15845. + }
  15846. +
  15847. + /*
  15848. + * Configure TX path and queues.
  15849. + */
  15850. + tx_set_rate(mp, 1000000000, 16777216);
  15851. + for (i = 0; i < 8; i++) {
  15852. + struct tx_queue *txq = mp->txq + i;
  15853. + int off = TXQ_CURRENT_DESC_PTR(mp->port_num, i);
  15854. + u32 addr;
  15855. +
  15856. + if ((mp->txq_mask & (1 << i)) == 0)
  15857. + continue;
  15858. +
  15859. + addr = (u32)txq->tx_desc_dma;
  15860. + addr += txq->tx_curr_desc * sizeof(struct tx_desc);
  15861. + wrl(mp, off, addr);
  15862. +
  15863. + txq_set_rate(txq, 1000000000, 16777216);
  15864. + txq_set_fixed_prio_mode(txq);
  15865. + }
  15866. +
  15867. + /*
  15868. + * Add configured unicast address to address filter table.
  15869. + */
  15870. + uc_addr_set(mp, mp->dev->dev_addr);
  15871. +
  15872. + /*
  15873. + * Receive all unmatched unicast, TCP, UDP, BPDU and broadcast
  15874. + * frames to RX queue #0.
  15875. + */
  15876. + wrl(mp, PORT_CONFIG(mp->port_num), 0x00000000);
  15877. -#ifdef MV643XX_NAPI
  15878. - printk(KERN_NOTICE "%s: RX NAPI Enabled \n", dev->name);
  15879. -#endif
  15880. + /*
  15881. + * Treat BPDUs as normal multicasts, and disable partition mode.
  15882. + */
  15883. + wrl(mp, PORT_CONFIG_EXT(mp->port_num), 0x00000000);
  15884. - if (mp->tx_sram_size > 0)
  15885. - printk(KERN_NOTICE "%s: Using SRAM\n", dev->name);
  15886. + /*
  15887. + * Enable the receive queues.
  15888. + */
  15889. + for (i = 0; i < 8; i++) {
  15890. + struct rx_queue *rxq = mp->rxq + i;
  15891. + int off = RXQ_CURRENT_DESC_PTR(mp->port_num, i);
  15892. + u32 addr;
  15893. - return 0;
  15894. + if ((mp->rxq_mask & (1 << i)) == 0)
  15895. + continue;
  15896. -out:
  15897. - free_netdev(dev);
  15898. + addr = (u32)rxq->rx_desc_dma;
  15899. + addr += rxq->rx_curr_desc * sizeof(struct rx_desc);
  15900. + wrl(mp, off, addr);
  15901. - return err;
  15902. + rxq_enable(rxq);
  15903. + }
  15904. }
  15905. -static int mv643xx_eth_remove(struct platform_device *pdev)
  15906. +static void set_rx_coal(struct mv643xx_eth_private *mp, unsigned int delay)
  15907. {
  15908. - struct net_device *dev = platform_get_drvdata(pdev);
  15909. + unsigned int coal = ((mp->shared->t_clk / 1000000) * delay) / 64;
  15910. + u32 val;
  15911. - unregister_netdev(dev);
  15912. - flush_scheduled_work();
  15913. + val = rdl(mp, SDMA_CONFIG(mp->port_num));
  15914. + if (mp->shared->extended_rx_coal_limit) {
  15915. + if (coal > 0xffff)
  15916. + coal = 0xffff;
  15917. + val &= ~0x023fff80;
  15918. + val |= (coal & 0x8000) << 10;
  15919. + val |= (coal & 0x7fff) << 7;
  15920. + } else {
  15921. + if (coal > 0x3fff)
  15922. + coal = 0x3fff;
  15923. + val &= ~0x003fff00;
  15924. + val |= (coal & 0x3fff) << 8;
  15925. + }
  15926. + wrl(mp, SDMA_CONFIG(mp->port_num), val);
  15927. +}
  15928. - free_netdev(dev);
  15929. - platform_set_drvdata(pdev, NULL);
  15930. - return 0;
  15931. +static void set_tx_coal(struct mv643xx_eth_private *mp, unsigned int delay)
  15932. +{
  15933. + unsigned int coal = ((mp->shared->t_clk / 1000000) * delay) / 64;
  15934. +
  15935. + if (coal > 0x3fff)
  15936. + coal = 0x3fff;
  15937. + wrl(mp, TX_FIFO_URGENT_THRESHOLD(mp->port_num), (coal & 0x3fff) << 4);
  15938. }
  15939. -static void mv643xx_eth_conf_mbus_windows(struct mv643xx_shared_private *msp,
  15940. - struct mbus_dram_target_info *dram)
  15941. +static int mv643xx_eth_open(struct net_device *dev)
  15942. {
  15943. - void __iomem *base = msp->eth_base;
  15944. - u32 win_enable;
  15945. - u32 win_protect;
  15946. + struct mv643xx_eth_private *mp = netdev_priv(dev);
  15947. + int err;
  15948. int i;
  15949. - for (i = 0; i < 6; i++) {
  15950. - writel(0, base + WINDOW_BASE(i));
  15951. - writel(0, base + WINDOW_SIZE(i));
  15952. - if (i < 4)
  15953. - writel(0, base + WINDOW_REMAP_HIGH(i));
  15954. + wrl(mp, INT_CAUSE(mp->port_num), 0);
  15955. + wrl(mp, INT_CAUSE_EXT(mp->port_num), 0);
  15956. + rdl(mp, INT_CAUSE_EXT(mp->port_num));
  15957. +
  15958. + err = request_irq(dev->irq, mv643xx_eth_irq,
  15959. + IRQF_SHARED | IRQF_SAMPLE_RANDOM,
  15960. + dev->name, dev);
  15961. + if (err) {
  15962. + dev_printk(KERN_ERR, &dev->dev, "can't assign irq\n");
  15963. + return -EAGAIN;
  15964. }
  15965. - win_enable = 0x3f;
  15966. - win_protect = 0;
  15967. -
  15968. - for (i = 0; i < dram->num_cs; i++) {
  15969. - struct mbus_dram_window *cs = dram->cs + i;
  15970. + init_mac_tables(mp);
  15971. - writel((cs->base & 0xffff0000) |
  15972. - (cs->mbus_attr << 8) |
  15973. - dram->mbus_dram_target_id, base + WINDOW_BASE(i));
  15974. - writel((cs->size - 1) & 0xffff0000, base + WINDOW_SIZE(i));
  15975. + for (i = 0; i < 8; i++) {
  15976. + if ((mp->rxq_mask & (1 << i)) == 0)
  15977. + continue;
  15978. +
  15979. + err = rxq_init(mp, i);
  15980. + if (err) {
  15981. + while (--i >= 0)
  15982. + if (mp->rxq_mask & (1 << i))
  15983. + rxq_deinit(mp->rxq + i);
  15984. + goto out;
  15985. + }
  15986. - win_enable &= ~(1 << i);
  15987. - win_protect |= 3 << (2 * i);
  15988. + rxq_refill(mp->rxq + i);
  15989. }
  15990. - writel(win_enable, base + WINDOW_BAR_ENABLE);
  15991. - msp->win_protect = win_protect;
  15992. -}
  15993. -
  15994. -static int mv643xx_eth_shared_probe(struct platform_device *pdev)
  15995. -{
  15996. - static int mv643xx_version_printed = 0;
  15997. - struct mv643xx_eth_shared_platform_data *pd = pdev->dev.platform_data;
  15998. - struct mv643xx_shared_private *msp;
  15999. - struct resource *res;
  16000. - int ret;
  16001. -
  16002. - if (!mv643xx_version_printed++)
  16003. - printk(KERN_NOTICE "MV-643xx 10/100/1000 Ethernet Driver\n");
  16004. -
  16005. - ret = -EINVAL;
  16006. - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
  16007. - if (res == NULL)
  16008. - goto out;
  16009. + for (i = 0; i < 8; i++) {
  16010. + if ((mp->txq_mask & (1 << i)) == 0)
  16011. + continue;
  16012. +
  16013. + err = txq_init(mp, i);
  16014. + if (err) {
  16015. + while (--i >= 0)
  16016. + if (mp->txq_mask & (1 << i))
  16017. + txq_deinit(mp->txq + i);
  16018. + goto out_free;
  16019. + }
  16020. + }
  16021. - ret = -ENOMEM;
  16022. - msp = kmalloc(sizeof(*msp), GFP_KERNEL);
  16023. - if (msp == NULL)
  16024. - goto out;
  16025. - memset(msp, 0, sizeof(*msp));
  16026. +#ifdef MV643XX_ETH_NAPI
  16027. + napi_enable(&mp->napi);
  16028. +#endif
  16029. - msp->eth_base = ioremap(res->start, res->end - res->start + 1);
  16030. - if (msp->eth_base == NULL)
  16031. - goto out_free;
  16032. + port_start(mp);
  16033. - spin_lock_init(&msp->phy_lock);
  16034. - msp->t_clk = (pd != NULL && pd->t_clk != 0) ? pd->t_clk : 133000000;
  16035. + set_rx_coal(mp, 0);
  16036. + set_tx_coal(mp, 0);
  16037. - platform_set_drvdata(pdev, msp);
  16038. + wrl(mp, INT_MASK_EXT(mp->port_num),
  16039. + INT_EXT_LINK | INT_EXT_PHY | INT_EXT_TX);
  16040. - /*
  16041. - * (Re-)program MBUS remapping windows if we are asked to.
  16042. - */
  16043. - if (pd != NULL && pd->dram != NULL)
  16044. - mv643xx_eth_conf_mbus_windows(msp, pd->dram);
  16045. + wrl(mp, INT_MASK(mp->port_num), INT_TX_END | INT_RX | INT_EXT);
  16046. return 0;
  16047. +
  16048. out_free:
  16049. - kfree(msp);
  16050. + for (i = 0; i < 8; i++)
  16051. + if (mp->rxq_mask & (1 << i))
  16052. + rxq_deinit(mp->rxq + i);
  16053. out:
  16054. - return ret;
  16055. + free_irq(dev->irq, dev);
  16056. +
  16057. + return err;
  16058. }
  16059. -static int mv643xx_eth_shared_remove(struct platform_device *pdev)
  16060. +static void port_reset(struct mv643xx_eth_private *mp)
  16061. {
  16062. - struct mv643xx_shared_private *msp = platform_get_drvdata(pdev);
  16063. + unsigned int data;
  16064. + int i;
  16065. - iounmap(msp->eth_base);
  16066. - kfree(msp);
  16067. + for (i = 0; i < 8; i++) {
  16068. + if (mp->rxq_mask & (1 << i))
  16069. + rxq_disable(mp->rxq + i);
  16070. + if (mp->txq_mask & (1 << i))
  16071. + txq_disable(mp->txq + i);
  16072. + }
  16073. + while (!(rdl(mp, PORT_STATUS(mp->port_num)) & TX_FIFO_EMPTY))
  16074. + udelay(10);
  16075. - return 0;
  16076. + /* Reset the Enable bit in the Configuration Register */
  16077. + data = rdl(mp, PORT_SERIAL_CONTROL(mp->port_num));
  16078. + data &= ~(SERIAL_PORT_ENABLE |
  16079. + DO_NOT_FORCE_LINK_FAIL |
  16080. + FORCE_LINK_PASS);
  16081. + wrl(mp, PORT_SERIAL_CONTROL(mp->port_num), data);
  16082. }
  16083. -static void mv643xx_eth_shutdown(struct platform_device *pdev)
  16084. +static int mv643xx_eth_stop(struct net_device *dev)
  16085. {
  16086. - struct net_device *dev = platform_get_drvdata(pdev);
  16087. - struct mv643xx_private *mp = netdev_priv(dev);
  16088. - unsigned int port_num = mp->port_num;
  16089. -
  16090. - /* Mask all interrupts on ethernet port */
  16091. - wrl(mp, INTERRUPT_MASK_REG(port_num), 0);
  16092. - rdl(mp, INTERRUPT_MASK_REG(port_num));
  16093. + struct mv643xx_eth_private *mp = netdev_priv(dev);
  16094. + int i;
  16095. - eth_port_reset(mp);
  16096. -}
  16097. + wrl(mp, INT_MASK(mp->port_num), 0x00000000);
  16098. + rdl(mp, INT_MASK(mp->port_num));
  16099. -static struct platform_driver mv643xx_eth_driver = {
  16100. - .probe = mv643xx_eth_probe,
  16101. - .remove = mv643xx_eth_remove,
  16102. - .shutdown = mv643xx_eth_shutdown,
  16103. - .driver = {
  16104. - .name = MV643XX_ETH_NAME,
  16105. - .owner = THIS_MODULE,
  16106. - },
  16107. -};
  16108. +#ifdef MV643XX_ETH_NAPI
  16109. + napi_disable(&mp->napi);
  16110. +#endif
  16111. + netif_carrier_off(dev);
  16112. + netif_stop_queue(dev);
  16113. -static struct platform_driver mv643xx_eth_shared_driver = {
  16114. - .probe = mv643xx_eth_shared_probe,
  16115. - .remove = mv643xx_eth_shared_remove,
  16116. - .driver = {
  16117. - .name = MV643XX_ETH_SHARED_NAME,
  16118. - .owner = THIS_MODULE,
  16119. - },
  16120. -};
  16121. + free_irq(dev->irq, dev);
  16122. -/*
  16123. - * mv643xx_init_module
  16124. - *
  16125. - * Registers the network drivers into the Linux kernel
  16126. - *
  16127. - * Input : N/A
  16128. - *
  16129. - * Output : N/A
  16130. - */
  16131. -static int __init mv643xx_init_module(void)
  16132. -{
  16133. - int rc;
  16134. + port_reset(mp);
  16135. + mib_counters_update(mp);
  16136. - rc = platform_driver_register(&mv643xx_eth_shared_driver);
  16137. - if (!rc) {
  16138. - rc = platform_driver_register(&mv643xx_eth_driver);
  16139. - if (rc)
  16140. - platform_driver_unregister(&mv643xx_eth_shared_driver);
  16141. + for (i = 0; i < 8; i++) {
  16142. + if (mp->rxq_mask & (1 << i))
  16143. + rxq_deinit(mp->rxq + i);
  16144. + if (mp->txq_mask & (1 << i))
  16145. + txq_deinit(mp->txq + i);
  16146. }
  16147. - return rc;
  16148. -}
  16149. -/*
  16150. - * mv643xx_cleanup_module
  16151. - *
  16152. - * Registers the network drivers into the Linux kernel
  16153. - *
  16154. - * Input : N/A
  16155. - *
  16156. - * Output : N/A
  16157. - */
  16158. -static void __exit mv643xx_cleanup_module(void)
  16159. -{
  16160. - platform_driver_unregister(&mv643xx_eth_driver);
  16161. - platform_driver_unregister(&mv643xx_eth_shared_driver);
  16162. + return 0;
  16163. }
  16164. -module_init(mv643xx_init_module);
  16165. -module_exit(mv643xx_cleanup_module);
  16166. -
  16167. -MODULE_LICENSE("GPL");
  16168. -MODULE_AUTHOR( "Rabeeh Khoury, Assaf Hoffman, Matthew Dharm, Manish Lachwani"
  16169. - " and Dale Farnsworth");
  16170. -MODULE_DESCRIPTION("Ethernet driver for Marvell MV643XX");
  16171. -MODULE_ALIAS("platform:" MV643XX_ETH_NAME);
  16172. -MODULE_ALIAS("platform:" MV643XX_ETH_SHARED_NAME);
  16173. -
  16174. -/*
  16175. - * The second part is the low level driver of the gigE ethernet ports.
  16176. - */
  16177. -
  16178. -/*
  16179. - * Marvell's Gigabit Ethernet controller low level driver
  16180. - *
  16181. - * DESCRIPTION:
  16182. - * This file introduce low level API to Marvell's Gigabit Ethernet
  16183. - * controller. This Gigabit Ethernet Controller driver API controls
  16184. - * 1) Operations (i.e. port init, start, reset etc').
  16185. - * 2) Data flow (i.e. port send, receive etc').
  16186. - * Each Gigabit Ethernet port is controlled via
  16187. - * struct mv643xx_private.
  16188. - * This struct includes user configuration information as well as
  16189. - * driver internal data needed for its operations.
  16190. - *
  16191. - * Supported Features:
  16192. - * - This low level driver is OS independent. Allocating memory for
  16193. - * the descriptor rings and buffers are not within the scope of
  16194. - * this driver.
  16195. - * - The user is free from Rx/Tx queue managing.
  16196. - * - This low level driver introduce functionality API that enable
  16197. - * the to operate Marvell's Gigabit Ethernet Controller in a
  16198. - * convenient way.
  16199. - * - Simple Gigabit Ethernet port operation API.
  16200. - * - Simple Gigabit Ethernet port data flow API.
  16201. - * - Data flow and operation API support per queue functionality.
  16202. - * - Support cached descriptors for better performance.
  16203. - * - Enable access to all four DRAM banks and internal SRAM memory
  16204. - * spaces.
  16205. - * - PHY access and control API.
  16206. - * - Port control register configuration API.
  16207. - * - Full control over Unicast and Multicast MAC configurations.
  16208. - *
  16209. - * Operation flow:
  16210. - *
  16211. - * Initialization phase
  16212. - * This phase complete the initialization of the the
  16213. - * mv643xx_private struct.
  16214. - * User information regarding port configuration has to be set
  16215. - * prior to calling the port initialization routine.
  16216. - *
  16217. - * In this phase any port Tx/Rx activity is halted, MIB counters
  16218. - * are cleared, PHY address is set according to user parameter and
  16219. - * access to DRAM and internal SRAM memory spaces.
  16220. - *
  16221. - * Driver ring initialization
  16222. - * Allocating memory for the descriptor rings and buffers is not
  16223. - * within the scope of this driver. Thus, the user is required to
  16224. - * allocate memory for the descriptors ring and buffers. Those
  16225. - * memory parameters are used by the Rx and Tx ring initialization
  16226. - * routines in order to curve the descriptor linked list in a form
  16227. - * of a ring.
  16228. - * Note: Pay special attention to alignment issues when using
  16229. - * cached descriptors/buffers. In this phase the driver store
  16230. - * information in the mv643xx_private struct regarding each queue
  16231. - * ring.
  16232. - *
  16233. - * Driver start
  16234. - * This phase prepares the Ethernet port for Rx and Tx activity.
  16235. - * It uses the information stored in the mv643xx_private struct to
  16236. - * initialize the various port registers.
  16237. - *
  16238. - * Data flow:
  16239. - * All packet references to/from the driver are done using
  16240. - * struct pkt_info.
  16241. - * This struct is a unified struct used with Rx and Tx operations.
  16242. - * This way the user is not required to be familiar with neither
  16243. - * Tx nor Rx descriptors structures.
  16244. - * The driver's descriptors rings are management by indexes.
  16245. - * Those indexes controls the ring resources and used to indicate
  16246. - * a SW resource error:
  16247. - * 'current'
  16248. - * This index points to the current available resource for use. For
  16249. - * example in Rx process this index will point to the descriptor
  16250. - * that will be passed to the user upon calling the receive
  16251. - * routine. In Tx process, this index will point to the descriptor
  16252. - * that will be assigned with the user packet info and transmitted.
  16253. - * 'used'
  16254. - * This index points to the descriptor that need to restore its
  16255. - * resources. For example in Rx process, using the Rx buffer return
  16256. - * API will attach the buffer returned in packet info to the
  16257. - * descriptor pointed by 'used'. In Tx process, using the Tx
  16258. - * descriptor return will merely return the user packet info with
  16259. - * the command status of the transmitted buffer pointed by the
  16260. - * 'used' index. Nevertheless, it is essential to use this routine
  16261. - * to update the 'used' index.
  16262. - * 'first'
  16263. - * This index supports Tx Scatter-Gather. It points to the first
  16264. - * descriptor of a packet assembled of multiple buffers. For
  16265. - * example when in middle of Such packet we have a Tx resource
  16266. - * error the 'curr' index get the value of 'first' to indicate
  16267. - * that the ring returned to its state before trying to transmit
  16268. - * this packet.
  16269. - *
  16270. - * Receive operation:
  16271. - * The eth_port_receive API set the packet information struct,
  16272. - * passed by the caller, with received information from the
  16273. - * 'current' SDMA descriptor.
  16274. - * It is the user responsibility to return this resource back
  16275. - * to the Rx descriptor ring to enable the reuse of this source.
  16276. - * Return Rx resource is done using the eth_rx_return_buff API.
  16277. - *
  16278. - * Prior to calling the initialization routine eth_port_init() the user
  16279. - * must set the following fields under mv643xx_private struct:
  16280. - * port_num User Ethernet port number.
  16281. - * port_config User port configuration value.
  16282. - * port_config_extend User port config extend value.
  16283. - * port_sdma_config User port SDMA config value.
  16284. - * port_serial_control User port serial control value.
  16285. - *
  16286. - * This driver data flow is done using the struct pkt_info which
  16287. - * is a unified struct for Rx and Tx operations:
  16288. - *
  16289. - * byte_cnt Tx/Rx descriptor buffer byte count.
  16290. - * l4i_chk CPU provided TCP Checksum. For Tx operation
  16291. - * only.
  16292. - * cmd_sts Tx/Rx descriptor command status.
  16293. - * buf_ptr Tx/Rx descriptor buffer pointer.
  16294. - * return_info Tx/Rx user resource return information.
  16295. - */
  16296. -
  16297. -/* Ethernet Port routines */
  16298. -static void eth_port_set_filter_table_entry(struct mv643xx_private *mp,
  16299. - int table, unsigned char entry);
  16300. -
  16301. -/*
  16302. - * eth_port_init - Initialize the Ethernet port driver
  16303. - *
  16304. - * DESCRIPTION:
  16305. - * This function prepares the ethernet port to start its activity:
  16306. - * 1) Completes the ethernet port driver struct initialization toward port
  16307. - * start routine.
  16308. - * 2) Resets the device to a quiescent state in case of warm reboot.
  16309. - * 3) Enable SDMA access to all four DRAM banks as well as internal SRAM.
  16310. - * 4) Clean MAC tables. The reset status of those tables is unknown.
  16311. - * 5) Set PHY address.
  16312. - * Note: Call this routine prior to eth_port_start routine and after
  16313. - * setting user values in the user fields of Ethernet port control
  16314. - * struct.
  16315. - *
  16316. - * INPUT:
  16317. - * struct mv643xx_private *mp Ethernet port control struct
  16318. - *
  16319. - * OUTPUT:
  16320. - * See description.
  16321. - *
  16322. - * RETURN:
  16323. - * None.
  16324. - */
  16325. -static void eth_port_init(struct mv643xx_private *mp)
  16326. +static int mv643xx_eth_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
  16327. {
  16328. - mp->rx_resource_err = 0;
  16329. + struct mv643xx_eth_private *mp = netdev_priv(dev);
  16330. - eth_port_reset(mp);
  16331. + if (mp->phy_addr != -1)
  16332. + return generic_mii_ioctl(&mp->mii, if_mii(ifr), cmd, NULL);
  16333. - eth_port_init_mac_tables(mp);
  16334. + return -EOPNOTSUPP;
  16335. }
  16336. -/*
  16337. - * eth_port_start - Start the Ethernet port activity.
  16338. - *
  16339. - * DESCRIPTION:
  16340. - * This routine prepares the Ethernet port for Rx and Tx activity:
  16341. - * 1. Initialize Tx and Rx Current Descriptor Pointer for each queue that
  16342. - * has been initialized a descriptor's ring (using
  16343. - * ether_init_tx_desc_ring for Tx and ether_init_rx_desc_ring for Rx)
  16344. - * 2. Initialize and enable the Ethernet configuration port by writing to
  16345. - * the port's configuration and command registers.
  16346. - * 3. Initialize and enable the SDMA by writing to the SDMA's
  16347. - * configuration and command registers. After completing these steps,
  16348. - * the ethernet port SDMA can starts to perform Rx and Tx activities.
  16349. - *
  16350. - * Note: Each Rx and Tx queue descriptor's list must be initialized prior
  16351. - * to calling this function (use ether_init_tx_desc_ring for Tx queues
  16352. - * and ether_init_rx_desc_ring for Rx queues).
  16353. - *
  16354. - * INPUT:
  16355. - * dev - a pointer to the required interface
  16356. - *
  16357. - * OUTPUT:
  16358. - * Ethernet port is ready to receive and transmit.
  16359. - *
  16360. - * RETURN:
  16361. - * None.
  16362. - */
  16363. -static void eth_port_start(struct net_device *dev)
  16364. +static int mv643xx_eth_change_mtu(struct net_device *dev, int new_mtu)
  16365. {
  16366. - struct mv643xx_private *mp = netdev_priv(dev);
  16367. - unsigned int port_num = mp->port_num;
  16368. - int tx_curr_desc, rx_curr_desc;
  16369. - u32 pscr;
  16370. - struct ethtool_cmd ethtool_cmd;
  16371. -
  16372. - /* Assignment of Tx CTRP of given queue */
  16373. - tx_curr_desc = mp->tx_curr_desc_q;
  16374. - wrl(mp, TX_CURRENT_QUEUE_DESC_PTR_0(port_num),
  16375. - (u32)((struct eth_tx_desc *)mp->tx_desc_dma + tx_curr_desc));
  16376. + struct mv643xx_eth_private *mp = netdev_priv(dev);
  16377. - /* Assignment of Rx CRDP of given queue */
  16378. - rx_curr_desc = mp->rx_curr_desc_q;
  16379. - wrl(mp, RX_CURRENT_QUEUE_DESC_PTR_0(port_num),
  16380. - (u32)((struct eth_rx_desc *)mp->rx_desc_dma + rx_curr_desc));
  16381. -
  16382. - /* Add the assigned Ethernet address to the port's address table */
  16383. - eth_port_uc_addr_set(mp, dev->dev_addr);
  16384. + if (new_mtu < 64 || new_mtu > 9500)
  16385. + return -EINVAL;
  16386. - /* Assign port configuration and command. */
  16387. - wrl(mp, PORT_CONFIG_REG(port_num),
  16388. - PORT_CONFIG_DEFAULT_VALUE);
  16389. + dev->mtu = new_mtu;
  16390. + tx_set_rate(mp, 1000000000, 16777216);
  16391. - wrl(mp, PORT_CONFIG_EXTEND_REG(port_num),
  16392. - PORT_CONFIG_EXTEND_DEFAULT_VALUE);
  16393. + if (!netif_running(dev))
  16394. + return 0;
  16395. - pscr = rdl(mp, PORT_SERIAL_CONTROL_REG(port_num));
  16396. + /*
  16397. + * Stop and then re-open the interface. This will allocate RX
  16398. + * skbs of the new MTU.
  16399. + * There is a possible danger that the open will not succeed,
  16400. + * due to memory being full.
  16401. + */
  16402. + mv643xx_eth_stop(dev);
  16403. + if (mv643xx_eth_open(dev)) {
  16404. + dev_printk(KERN_ERR, &dev->dev,
  16405. + "fatal error on re-opening device after "
  16406. + "MTU change\n");
  16407. + }
  16408. - pscr &= ~(SERIAL_PORT_ENABLE | FORCE_LINK_PASS);
  16409. - wrl(mp, PORT_SERIAL_CONTROL_REG(port_num), pscr);
  16410. + return 0;
  16411. +}
  16412. - pscr |= DISABLE_AUTO_NEG_FOR_FLOW_CTRL |
  16413. - DISABLE_AUTO_NEG_SPEED_GMII |
  16414. - DISABLE_AUTO_NEG_FOR_DUPLX |
  16415. - DO_NOT_FORCE_LINK_FAIL |
  16416. - SERIAL_PORT_CONTROL_RESERVED;
  16417. +static void tx_timeout_task(struct work_struct *ugly)
  16418. +{
  16419. + struct mv643xx_eth_private *mp;
  16420. - wrl(mp, PORT_SERIAL_CONTROL_REG(port_num), pscr);
  16421. + mp = container_of(ugly, struct mv643xx_eth_private, tx_timeout_task);
  16422. + if (netif_running(mp->dev)) {
  16423. + netif_stop_queue(mp->dev);
  16424. - pscr |= SERIAL_PORT_ENABLE;
  16425. - wrl(mp, PORT_SERIAL_CONTROL_REG(port_num), pscr);
  16426. + port_reset(mp);
  16427. + port_start(mp);
  16428. - /* Assign port SDMA configuration */
  16429. - wrl(mp, SDMA_CONFIG_REG(port_num),
  16430. - PORT_SDMA_CONFIG_DEFAULT_VALUE);
  16431. -
  16432. - /* Enable port Rx. */
  16433. - mv643xx_eth_port_enable_rx(mp, ETH_RX_QUEUES_ENABLED);
  16434. -
  16435. - /* Disable port bandwidth limits by clearing MTU register */
  16436. - wrl(mp, MAXIMUM_TRANSMIT_UNIT(port_num), 0);
  16437. -
  16438. - /* save phy settings across reset */
  16439. - mv643xx_get_settings(dev, &ethtool_cmd);
  16440. - ethernet_phy_reset(mp);
  16441. - mv643xx_set_settings(dev, &ethtool_cmd);
  16442. + __txq_maybe_wake(mp->txq + mp->txq_primary);
  16443. + }
  16444. }
  16445. -/*
  16446. - * eth_port_uc_addr_set - Write a MAC address into the port's hw registers
  16447. - */
  16448. -static void eth_port_uc_addr_set(struct mv643xx_private *mp,
  16449. - unsigned char *p_addr)
  16450. +static void mv643xx_eth_tx_timeout(struct net_device *dev)
  16451. {
  16452. - unsigned int port_num = mp->port_num;
  16453. - unsigned int mac_h;
  16454. - unsigned int mac_l;
  16455. - int table;
  16456. + struct mv643xx_eth_private *mp = netdev_priv(dev);
  16457. - mac_l = (p_addr[4] << 8) | (p_addr[5]);
  16458. - mac_h = (p_addr[0] << 24) | (p_addr[1] << 16) | (p_addr[2] << 8) |
  16459. - (p_addr[3] << 0);
  16460. -
  16461. - wrl(mp, MAC_ADDR_LOW(port_num), mac_l);
  16462. - wrl(mp, MAC_ADDR_HIGH(port_num), mac_h);
  16463. -
  16464. - /* Accept frames with this address */
  16465. - table = DA_FILTER_UNICAST_TABLE_BASE(port_num);
  16466. - eth_port_set_filter_table_entry(mp, table, p_addr[5] & 0x0f);
  16467. + dev_printk(KERN_INFO, &dev->dev, "tx timeout\n");
  16468. +
  16469. + schedule_work(&mp->tx_timeout_task);
  16470. }
  16471. -/*
  16472. - * eth_port_uc_addr_get - Read the MAC address from the port's hw registers
  16473. - */
  16474. -static void eth_port_uc_addr_get(struct mv643xx_private *mp,
  16475. - unsigned char *p_addr)
  16476. +#ifdef CONFIG_NET_POLL_CONTROLLER
  16477. +static void mv643xx_eth_netpoll(struct net_device *dev)
  16478. {
  16479. - unsigned int port_num = mp->port_num;
  16480. - unsigned int mac_h;
  16481. - unsigned int mac_l;
  16482. + struct mv643xx_eth_private *mp = netdev_priv(dev);
  16483. +
  16484. + wrl(mp, INT_MASK(mp->port_num), 0x00000000);
  16485. + rdl(mp, INT_MASK(mp->port_num));
  16486. - mac_h = rdl(mp, MAC_ADDR_HIGH(port_num));
  16487. - mac_l = rdl(mp, MAC_ADDR_LOW(port_num));
  16488. + mv643xx_eth_irq(dev->irq, dev);
  16489. - p_addr[0] = (mac_h >> 24) & 0xff;
  16490. - p_addr[1] = (mac_h >> 16) & 0xff;
  16491. - p_addr[2] = (mac_h >> 8) & 0xff;
  16492. - p_addr[3] = mac_h & 0xff;
  16493. - p_addr[4] = (mac_l >> 8) & 0xff;
  16494. - p_addr[5] = mac_l & 0xff;
  16495. + wrl(mp, INT_MASK(mp->port_num), INT_TX_END | INT_RX | INT_CAUSE_EXT);
  16496. }
  16497. +#endif
  16498. -/*
  16499. - * The entries in each table are indexed by a hash of a packet's MAC
  16500. - * address. One bit in each entry determines whether the packet is
  16501. - * accepted. There are 4 entries (each 8 bits wide) in each register
  16502. - * of the table. The bits in each entry are defined as follows:
  16503. - * 0 Accept=1, Drop=0
  16504. - * 3-1 Queue (ETH_Q0=0)
  16505. - * 7-4 Reserved = 0;
  16506. - */
  16507. -static void eth_port_set_filter_table_entry(struct mv643xx_private *mp,
  16508. - int table, unsigned char entry)
  16509. +static int mv643xx_eth_mdio_read(struct net_device *dev, int addr, int reg)
  16510. {
  16511. - unsigned int table_reg;
  16512. - unsigned int tbl_offset;
  16513. - unsigned int reg_offset;
  16514. + struct mv643xx_eth_private *mp = netdev_priv(dev);
  16515. + int val;
  16516. - tbl_offset = (entry / 4) * 4; /* Register offset of DA table entry */
  16517. - reg_offset = entry % 4; /* Entry offset within the register */
  16518. + smi_reg_read(mp, addr, reg, &val);
  16519. - /* Set "accepts frame bit" at specified table entry */
  16520. - table_reg = rdl(mp, table + tbl_offset);
  16521. - table_reg |= 0x01 << (8 * reg_offset);
  16522. - wrl(mp, table + tbl_offset, table_reg);
  16523. + return val;
  16524. }
  16525. -/*
  16526. - * eth_port_mc_addr - Multicast address settings.
  16527. - *
  16528. - * The MV device supports multicast using two tables:
  16529. - * 1) Special Multicast Table for MAC addresses of the form
  16530. - * 0x01-00-5E-00-00-XX (where XX is between 0x00 and 0x_FF).
  16531. - * The MAC DA[7:0] bits are used as a pointer to the Special Multicast
  16532. - * Table entries in the DA-Filter table.
  16533. - * 2) Other Multicast Table for multicast of another type. A CRC-8bit
  16534. - * is used as an index to the Other Multicast Table entries in the
  16535. - * DA-Filter table. This function calculates the CRC-8bit value.
  16536. - * In either case, eth_port_set_filter_table_entry() is then called
  16537. - * to set to set the actual table entry.
  16538. - */
  16539. -static void eth_port_mc_addr(struct mv643xx_private *mp, unsigned char *p_addr)
  16540. +static void mv643xx_eth_mdio_write(struct net_device *dev, int addr, int reg, int val)
  16541. {
  16542. - unsigned int port_num = mp->port_num;
  16543. - unsigned int mac_h;
  16544. - unsigned int mac_l;
  16545. - unsigned char crc_result = 0;
  16546. - int table;
  16547. - int mac_array[48];
  16548. - int crc[8];
  16549. - int i;
  16550. + struct mv643xx_eth_private *mp = netdev_priv(dev);
  16551. + smi_reg_write(mp, addr, reg, val);
  16552. +}
  16553. - if ((p_addr[0] == 0x01) && (p_addr[1] == 0x00) &&
  16554. - (p_addr[2] == 0x5E) && (p_addr[3] == 0x00) && (p_addr[4] == 0x00)) {
  16555. - table = DA_FILTER_SPECIAL_MULTICAST_TABLE_BASE(port_num);
  16556. - eth_port_set_filter_table_entry(mp, table, p_addr[5]);
  16557. - return;
  16558. - }
  16559. - /* Calculate CRC-8 out of the given address */
  16560. - mac_h = (p_addr[0] << 8) | (p_addr[1]);
  16561. - mac_l = (p_addr[2] << 24) | (p_addr[3] << 16) |
  16562. - (p_addr[4] << 8) | (p_addr[5] << 0);
  16563. -
  16564. - for (i = 0; i < 32; i++)
  16565. - mac_array[i] = (mac_l >> i) & 0x1;
  16566. - for (i = 32; i < 48; i++)
  16567. - mac_array[i] = (mac_h >> (i - 32)) & 0x1;
  16568. -
  16569. - crc[0] = mac_array[45] ^ mac_array[43] ^ mac_array[40] ^ mac_array[39] ^
  16570. - mac_array[35] ^ mac_array[34] ^ mac_array[31] ^ mac_array[30] ^
  16571. - mac_array[28] ^ mac_array[23] ^ mac_array[21] ^ mac_array[19] ^
  16572. - mac_array[18] ^ mac_array[16] ^ mac_array[14] ^ mac_array[12] ^
  16573. - mac_array[8] ^ mac_array[7] ^ mac_array[6] ^ mac_array[0];
  16574. -
  16575. - crc[1] = mac_array[46] ^ mac_array[45] ^ mac_array[44] ^ mac_array[43] ^
  16576. - mac_array[41] ^ mac_array[39] ^ mac_array[36] ^ mac_array[34] ^
  16577. - mac_array[32] ^ mac_array[30] ^ mac_array[29] ^ mac_array[28] ^
  16578. - mac_array[24] ^ mac_array[23] ^ mac_array[22] ^ mac_array[21] ^
  16579. - mac_array[20] ^ mac_array[18] ^ mac_array[17] ^ mac_array[16] ^
  16580. - mac_array[15] ^ mac_array[14] ^ mac_array[13] ^ mac_array[12] ^
  16581. - mac_array[9] ^ mac_array[6] ^ mac_array[1] ^ mac_array[0];
  16582. -
  16583. - crc[2] = mac_array[47] ^ mac_array[46] ^ mac_array[44] ^ mac_array[43] ^
  16584. - mac_array[42] ^ mac_array[39] ^ mac_array[37] ^ mac_array[34] ^
  16585. - mac_array[33] ^ mac_array[29] ^ mac_array[28] ^ mac_array[25] ^
  16586. - mac_array[24] ^ mac_array[22] ^ mac_array[17] ^ mac_array[15] ^
  16587. - mac_array[13] ^ mac_array[12] ^ mac_array[10] ^ mac_array[8] ^
  16588. - mac_array[6] ^ mac_array[2] ^ mac_array[1] ^ mac_array[0];
  16589. -
  16590. - crc[3] = mac_array[47] ^ mac_array[45] ^ mac_array[44] ^ mac_array[43] ^
  16591. - mac_array[40] ^ mac_array[38] ^ mac_array[35] ^ mac_array[34] ^
  16592. - mac_array[30] ^ mac_array[29] ^ mac_array[26] ^ mac_array[25] ^
  16593. - mac_array[23] ^ mac_array[18] ^ mac_array[16] ^ mac_array[14] ^
  16594. - mac_array[13] ^ mac_array[11] ^ mac_array[9] ^ mac_array[7] ^
  16595. - mac_array[3] ^ mac_array[2] ^ mac_array[1];
  16596. -
  16597. - crc[4] = mac_array[46] ^ mac_array[45] ^ mac_array[44] ^ mac_array[41] ^
  16598. - mac_array[39] ^ mac_array[36] ^ mac_array[35] ^ mac_array[31] ^
  16599. - mac_array[30] ^ mac_array[27] ^ mac_array[26] ^ mac_array[24] ^
  16600. - mac_array[19] ^ mac_array[17] ^ mac_array[15] ^ mac_array[14] ^
  16601. - mac_array[12] ^ mac_array[10] ^ mac_array[8] ^ mac_array[4] ^
  16602. - mac_array[3] ^ mac_array[2];
  16603. -
  16604. - crc[5] = mac_array[47] ^ mac_array[46] ^ mac_array[45] ^ mac_array[42] ^
  16605. - mac_array[40] ^ mac_array[37] ^ mac_array[36] ^ mac_array[32] ^
  16606. - mac_array[31] ^ mac_array[28] ^ mac_array[27] ^ mac_array[25] ^
  16607. - mac_array[20] ^ mac_array[18] ^ mac_array[16] ^ mac_array[15] ^
  16608. - mac_array[13] ^ mac_array[11] ^ mac_array[9] ^ mac_array[5] ^
  16609. - mac_array[4] ^ mac_array[3];
  16610. -
  16611. - crc[6] = mac_array[47] ^ mac_array[46] ^ mac_array[43] ^ mac_array[41] ^
  16612. - mac_array[38] ^ mac_array[37] ^ mac_array[33] ^ mac_array[32] ^
  16613. - mac_array[29] ^ mac_array[28] ^ mac_array[26] ^ mac_array[21] ^
  16614. - mac_array[19] ^ mac_array[17] ^ mac_array[16] ^ mac_array[14] ^
  16615. - mac_array[12] ^ mac_array[10] ^ mac_array[6] ^ mac_array[5] ^
  16616. - mac_array[4];
  16617. -
  16618. - crc[7] = mac_array[47] ^ mac_array[44] ^ mac_array[42] ^ mac_array[39] ^
  16619. - mac_array[38] ^ mac_array[34] ^ mac_array[33] ^ mac_array[30] ^
  16620. - mac_array[29] ^ mac_array[27] ^ mac_array[22] ^ mac_array[20] ^
  16621. - mac_array[18] ^ mac_array[17] ^ mac_array[15] ^ mac_array[13] ^
  16622. - mac_array[11] ^ mac_array[7] ^ mac_array[6] ^ mac_array[5];
  16623. +/* platform glue ************************************************************/
  16624. +static void
  16625. +mv643xx_eth_conf_mbus_windows(struct mv643xx_eth_shared_private *msp,
  16626. + struct mbus_dram_target_info *dram)
  16627. +{
  16628. + void __iomem *base = msp->base;
  16629. + u32 win_enable;
  16630. + u32 win_protect;
  16631. + int i;
  16632. - for (i = 0; i < 8; i++)
  16633. - crc_result = crc_result | (crc[i] << i);
  16634. + for (i = 0; i < 6; i++) {
  16635. + writel(0, base + WINDOW_BASE(i));
  16636. + writel(0, base + WINDOW_SIZE(i));
  16637. + if (i < 4)
  16638. + writel(0, base + WINDOW_REMAP_HIGH(i));
  16639. + }
  16640. - table = DA_FILTER_OTHER_MULTICAST_TABLE_BASE(port_num);
  16641. - eth_port_set_filter_table_entry(mp, table, crc_result);
  16642. -}
  16643. + win_enable = 0x3f;
  16644. + win_protect = 0;
  16645. -/*
  16646. - * Set the entire multicast list based on dev->mc_list.
  16647. - */
  16648. -static void eth_port_set_multicast_list(struct net_device *dev)
  16649. -{
  16650. + for (i = 0; i < dram->num_cs; i++) {
  16651. + struct mbus_dram_window *cs = dram->cs + i;
  16652. - struct dev_mc_list *mc_list;
  16653. - int i;
  16654. - int table_index;
  16655. - struct mv643xx_private *mp = netdev_priv(dev);
  16656. - unsigned int eth_port_num = mp->port_num;
  16657. -
  16658. - /* If the device is in promiscuous mode or in all multicast mode,
  16659. - * we will fully populate both multicast tables with accept.
  16660. - * This is guaranteed to yield a match on all multicast addresses...
  16661. - */
  16662. - if ((dev->flags & IFF_PROMISC) || (dev->flags & IFF_ALLMULTI)) {
  16663. - for (table_index = 0; table_index <= 0xFC; table_index += 4) {
  16664. - /* Set all entries in DA filter special multicast
  16665. - * table (Ex_dFSMT)
  16666. - * Set for ETH_Q0 for now
  16667. - * Bits
  16668. - * 0 Accept=1, Drop=0
  16669. - * 3-1 Queue ETH_Q0=0
  16670. - * 7-4 Reserved = 0;
  16671. - */
  16672. - wrl(mp, DA_FILTER_SPECIAL_MULTICAST_TABLE_BASE(eth_port_num) + table_index, 0x01010101);
  16673. + writel((cs->base & 0xffff0000) |
  16674. + (cs->mbus_attr << 8) |
  16675. + dram->mbus_dram_target_id, base + WINDOW_BASE(i));
  16676. + writel((cs->size - 1) & 0xffff0000, base + WINDOW_SIZE(i));
  16677. - /* Set all entries in DA filter other multicast
  16678. - * table (Ex_dFOMT)
  16679. - * Set for ETH_Q0 for now
  16680. - * Bits
  16681. - * 0 Accept=1, Drop=0
  16682. - * 3-1 Queue ETH_Q0=0
  16683. - * 7-4 Reserved = 0;
  16684. - */
  16685. - wrl(mp, DA_FILTER_OTHER_MULTICAST_TABLE_BASE(eth_port_num) + table_index, 0x01010101);
  16686. - }
  16687. - return;
  16688. + win_enable &= ~(1 << i);
  16689. + win_protect |= 3 << (2 * i);
  16690. }
  16691. - /* We will clear out multicast tables every time we get the list.
  16692. - * Then add the entire new list...
  16693. - */
  16694. - for (table_index = 0; table_index <= 0xFC; table_index += 4) {
  16695. - /* Clear DA filter special multicast table (Ex_dFSMT) */
  16696. - wrl(mp, DA_FILTER_SPECIAL_MULTICAST_TABLE_BASE
  16697. - (eth_port_num) + table_index, 0);
  16698. -
  16699. - /* Clear DA filter other multicast table (Ex_dFOMT) */
  16700. - wrl(mp, DA_FILTER_OTHER_MULTICAST_TABLE_BASE
  16701. - (eth_port_num) + table_index, 0);
  16702. - }
  16703. -
  16704. - /* Get pointer to net_device multicast list and add each one... */
  16705. - for (i = 0, mc_list = dev->mc_list;
  16706. - (i < 256) && (mc_list != NULL) && (i < dev->mc_count);
  16707. - i++, mc_list = mc_list->next)
  16708. - if (mc_list->dmi_addrlen == 6)
  16709. - eth_port_mc_addr(mp, mc_list->dmi_addr);
  16710. + writel(win_enable, base + WINDOW_BAR_ENABLE);
  16711. + msp->win_protect = win_protect;
  16712. }
  16713. -/*
  16714. - * eth_port_init_mac_tables - Clear all entrance in the UC, SMC and OMC tables
  16715. - *
  16716. - * DESCRIPTION:
  16717. - * Go through all the DA filter tables (Unicast, Special Multicast &
  16718. - * Other Multicast) and set each entry to 0.
  16719. - *
  16720. - * INPUT:
  16721. - * struct mv643xx_private *mp Ethernet Port.
  16722. - *
  16723. - * OUTPUT:
  16724. - * Multicast and Unicast packets are rejected.
  16725. - *
  16726. - * RETURN:
  16727. - * None.
  16728. - */
  16729. -static void eth_port_init_mac_tables(struct mv643xx_private *mp)
  16730. +static void infer_hw_params(struct mv643xx_eth_shared_private *msp)
  16731. {
  16732. - unsigned int port_num = mp->port_num;
  16733. - int table_index;
  16734. + /*
  16735. + * Check whether we have a 14-bit coal limit field in bits
  16736. + * [21:8], or a 16-bit coal limit in bits [25,21:7] of the
  16737. + * SDMA config register.
  16738. + */
  16739. + writel(0x02000000, msp->base + SDMA_CONFIG(0));
  16740. + if (readl(msp->base + SDMA_CONFIG(0)) & 0x02000000)
  16741. + msp->extended_rx_coal_limit = 1;
  16742. + else
  16743. + msp->extended_rx_coal_limit = 0;
  16744. - /* Clear DA filter unicast table (Ex_dFUT) */
  16745. - for (table_index = 0; table_index <= 0xC; table_index += 4)
  16746. - wrl(mp, DA_FILTER_UNICAST_TABLE_BASE(port_num) +
  16747. - table_index, 0);
  16748. -
  16749. - for (table_index = 0; table_index <= 0xFC; table_index += 4) {
  16750. - /* Clear DA filter special multicast table (Ex_dFSMT) */
  16751. - wrl(mp, DA_FILTER_SPECIAL_MULTICAST_TABLE_BASE(port_num) +
  16752. - table_index, 0);
  16753. - /* Clear DA filter other multicast table (Ex_dFOMT) */
  16754. - wrl(mp, DA_FILTER_OTHER_MULTICAST_TABLE_BASE(port_num) +
  16755. - table_index, 0);
  16756. - }
  16757. + /*
  16758. + * Check whether the TX rate control registers are in the
  16759. + * old or the new place.
  16760. + */
  16761. + writel(1, msp->base + TX_BW_MTU_MOVED(0));
  16762. + if (readl(msp->base + TX_BW_MTU_MOVED(0)) & 1)
  16763. + msp->tx_bw_control_moved = 1;
  16764. + else
  16765. + msp->tx_bw_control_moved = 0;
  16766. }
  16767. -/*
  16768. - * eth_clear_mib_counters - Clear all MIB counters
  16769. - *
  16770. - * DESCRIPTION:
  16771. - * This function clears all MIB counters of a specific ethernet port.
  16772. - * A read from the MIB counter will reset the counter.
  16773. - *
  16774. - * INPUT:
  16775. - * struct mv643xx_private *mp Ethernet Port.
  16776. - *
  16777. - * OUTPUT:
  16778. - * After reading all MIB counters, the counters resets.
  16779. - *
  16780. - * RETURN:
  16781. - * MIB counter value.
  16782. - *
  16783. - */
  16784. -static void eth_clear_mib_counters(struct mv643xx_private *mp)
  16785. +static int mv643xx_eth_shared_probe(struct platform_device *pdev)
  16786. {
  16787. - unsigned int port_num = mp->port_num;
  16788. - int i;
  16789. -
  16790. - /* Perform dummy reads from MIB counters */
  16791. - for (i = ETH_MIB_GOOD_OCTETS_RECEIVED_LOW; i < ETH_MIB_LATE_COLLISION;
  16792. - i += 4)
  16793. - rdl(mp, MIB_COUNTERS_BASE(port_num) + i);
  16794. -}
  16795. + static int mv643xx_eth_version_printed = 0;
  16796. + struct mv643xx_eth_shared_platform_data *pd = pdev->dev.platform_data;
  16797. + struct mv643xx_eth_shared_private *msp;
  16798. + struct resource *res;
  16799. + int ret;
  16800. -static inline u32 read_mib(struct mv643xx_private *mp, int offset)
  16801. -{
  16802. - return rdl(mp, MIB_COUNTERS_BASE(mp->port_num) + offset);
  16803. -}
  16804. + if (!mv643xx_eth_version_printed++)
  16805. + printk(KERN_NOTICE "MV-643xx 10/100/1000 Ethernet Driver\n");
  16806. -static void eth_update_mib_counters(struct mv643xx_private *mp)
  16807. -{
  16808. - struct mv643xx_mib_counters *p = &mp->mib_counters;
  16809. - int offset;
  16810. + ret = -EINVAL;
  16811. + res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
  16812. + if (res == NULL)
  16813. + goto out;
  16814. - p->good_octets_received +=
  16815. - read_mib(mp, ETH_MIB_GOOD_OCTETS_RECEIVED_LOW);
  16816. - p->good_octets_received +=
  16817. - (u64)read_mib(mp, ETH_MIB_GOOD_OCTETS_RECEIVED_HIGH) << 32;
  16818. + ret = -ENOMEM;
  16819. + msp = kmalloc(sizeof(*msp), GFP_KERNEL);
  16820. + if (msp == NULL)
  16821. + goto out;
  16822. + memset(msp, 0, sizeof(*msp));
  16823. - for (offset = ETH_MIB_BAD_OCTETS_RECEIVED;
  16824. - offset <= ETH_MIB_FRAMES_1024_TO_MAX_OCTETS;
  16825. - offset += 4)
  16826. - *(u32 *)((char *)p + offset) += read_mib(mp, offset);
  16827. + msp->base = ioremap(res->start, res->end - res->start + 1);
  16828. + if (msp->base == NULL)
  16829. + goto out_free;
  16830. - p->good_octets_sent += read_mib(mp, ETH_MIB_GOOD_OCTETS_SENT_LOW);
  16831. - p->good_octets_sent +=
  16832. - (u64)read_mib(mp, ETH_MIB_GOOD_OCTETS_SENT_HIGH) << 32;
  16833. + spin_lock_init(&msp->phy_lock);
  16834. - for (offset = ETH_MIB_GOOD_FRAMES_SENT;
  16835. - offset <= ETH_MIB_LATE_COLLISION;
  16836. - offset += 4)
  16837. - *(u32 *)((char *)p + offset) += read_mib(mp, offset);
  16838. -}
  16839. + /*
  16840. + * (Re-)program MBUS remapping windows if we are asked to.
  16841. + */
  16842. + if (pd != NULL && pd->dram != NULL)
  16843. + mv643xx_eth_conf_mbus_windows(msp, pd->dram);
  16844. -/*
  16845. - * ethernet_phy_detect - Detect whether a phy is present
  16846. - *
  16847. - * DESCRIPTION:
  16848. - * This function tests whether there is a PHY present on
  16849. - * the specified port.
  16850. - *
  16851. - * INPUT:
  16852. - * struct mv643xx_private *mp Ethernet Port.
  16853. - *
  16854. - * OUTPUT:
  16855. - * None
  16856. - *
  16857. - * RETURN:
  16858. - * 0 on success
  16859. - * -ENODEV on failure
  16860. - *
  16861. - */
  16862. -static int ethernet_phy_detect(struct mv643xx_private *mp)
  16863. -{
  16864. - unsigned int phy_reg_data0;
  16865. - int auto_neg;
  16866. + /*
  16867. + * Detect hardware parameters.
  16868. + */
  16869. + msp->t_clk = (pd != NULL && pd->t_clk != 0) ? pd->t_clk : 133000000;
  16870. + infer_hw_params(msp);
  16871. - eth_port_read_smi_reg(mp, 0, &phy_reg_data0);
  16872. - auto_neg = phy_reg_data0 & 0x1000;
  16873. - phy_reg_data0 ^= 0x1000; /* invert auto_neg */
  16874. - eth_port_write_smi_reg(mp, 0, phy_reg_data0);
  16875. -
  16876. - eth_port_read_smi_reg(mp, 0, &phy_reg_data0);
  16877. - if ((phy_reg_data0 & 0x1000) == auto_neg)
  16878. - return -ENODEV; /* change didn't take */
  16879. + platform_set_drvdata(pdev, msp);
  16880. - phy_reg_data0 ^= 0x1000;
  16881. - eth_port_write_smi_reg(mp, 0, phy_reg_data0);
  16882. return 0;
  16883. +
  16884. +out_free:
  16885. + kfree(msp);
  16886. +out:
  16887. + return ret;
  16888. }
  16889. -/*
  16890. - * ethernet_phy_get - Get the ethernet port PHY address.
  16891. - *
  16892. - * DESCRIPTION:
  16893. - * This routine returns the given ethernet port PHY address.
  16894. - *
  16895. - * INPUT:
  16896. - * struct mv643xx_private *mp Ethernet Port.
  16897. - *
  16898. - * OUTPUT:
  16899. - * None.
  16900. - *
  16901. - * RETURN:
  16902. - * PHY address.
  16903. - *
  16904. - */
  16905. -static int ethernet_phy_get(struct mv643xx_private *mp)
  16906. +static int mv643xx_eth_shared_remove(struct platform_device *pdev)
  16907. {
  16908. - unsigned int reg_data;
  16909. + struct mv643xx_eth_shared_private *msp = platform_get_drvdata(pdev);
  16910. - reg_data = rdl(mp, PHY_ADDR_REG);
  16911. + iounmap(msp->base);
  16912. + kfree(msp);
  16913. - return ((reg_data >> (5 * mp->port_num)) & 0x1f);
  16914. + return 0;
  16915. }
  16916. -/*
  16917. - * ethernet_phy_set - Set the ethernet port PHY address.
  16918. - *
  16919. - * DESCRIPTION:
  16920. - * This routine sets the given ethernet port PHY address.
  16921. - *
  16922. - * INPUT:
  16923. - * struct mv643xx_private *mp Ethernet Port.
  16924. - * int phy_addr PHY address.
  16925. - *
  16926. - * OUTPUT:
  16927. - * None.
  16928. - *
  16929. - * RETURN:
  16930. - * None.
  16931. - *
  16932. - */
  16933. -static void ethernet_phy_set(struct mv643xx_private *mp, int phy_addr)
  16934. +static struct platform_driver mv643xx_eth_shared_driver = {
  16935. + .probe = mv643xx_eth_shared_probe,
  16936. + .remove = mv643xx_eth_shared_remove,
  16937. + .driver = {
  16938. + .name = MV643XX_ETH_SHARED_NAME,
  16939. + .owner = THIS_MODULE,
  16940. + },
  16941. +};
  16942. +
  16943. +static void phy_addr_set(struct mv643xx_eth_private *mp, int phy_addr)
  16944. {
  16945. - u32 reg_data;
  16946. int addr_shift = 5 * mp->port_num;
  16947. + u32 data;
  16948. - reg_data = rdl(mp, PHY_ADDR_REG);
  16949. - reg_data &= ~(0x1f << addr_shift);
  16950. - reg_data |= (phy_addr & 0x1f) << addr_shift;
  16951. - wrl(mp, PHY_ADDR_REG, reg_data);
  16952. + data = rdl(mp, PHY_ADDR);
  16953. + data &= ~(0x1f << addr_shift);
  16954. + data |= (phy_addr & 0x1f) << addr_shift;
  16955. + wrl(mp, PHY_ADDR, data);
  16956. }
  16957. -/*
  16958. - * ethernet_phy_reset - Reset Ethernet port PHY.
  16959. - *
  16960. - * DESCRIPTION:
  16961. - * This routine utilizes the SMI interface to reset the ethernet port PHY.
  16962. - *
  16963. - * INPUT:
  16964. - * struct mv643xx_private *mp Ethernet Port.
  16965. - *
  16966. - * OUTPUT:
  16967. - * The PHY is reset.
  16968. - *
  16969. - * RETURN:
  16970. - * None.
  16971. - *
  16972. - */
  16973. -static void ethernet_phy_reset(struct mv643xx_private *mp)
  16974. +static int phy_addr_get(struct mv643xx_eth_private *mp)
  16975. {
  16976. - unsigned int phy_reg_data;
  16977. + unsigned int data;
  16978. - /* Reset the PHY */
  16979. - eth_port_read_smi_reg(mp, 0, &phy_reg_data);
  16980. - phy_reg_data |= 0x8000; /* Set bit 15 to reset the PHY */
  16981. - eth_port_write_smi_reg(mp, 0, phy_reg_data);
  16982. + data = rdl(mp, PHY_ADDR);
  16983. - /* wait for PHY to come out of reset */
  16984. - do {
  16985. - udelay(1);
  16986. - eth_port_read_smi_reg(mp, 0, &phy_reg_data);
  16987. - } while (phy_reg_data & 0x8000);
  16988. + return (data >> (5 * mp->port_num)) & 0x1f;
  16989. }
  16990. -static void mv643xx_eth_port_enable_tx(struct mv643xx_private *mp,
  16991. - unsigned int queues)
  16992. +static void set_params(struct mv643xx_eth_private *mp,
  16993. + struct mv643xx_eth_platform_data *pd)
  16994. {
  16995. - wrl(mp, TRANSMIT_QUEUE_COMMAND_REG(mp->port_num), queues);
  16996. -}
  16997. + struct net_device *dev = mp->dev;
  16998. -static void mv643xx_eth_port_enable_rx(struct mv643xx_private *mp,
  16999. - unsigned int queues)
  17000. -{
  17001. - wrl(mp, RECEIVE_QUEUE_COMMAND_REG(mp->port_num), queues);
  17002. -}
  17003. + if (is_valid_ether_addr(pd->mac_addr))
  17004. + memcpy(dev->dev_addr, pd->mac_addr, 6);
  17005. + else
  17006. + uc_addr_get(mp, dev->dev_addr);
  17007. -static unsigned int mv643xx_eth_port_disable_tx(struct mv643xx_private *mp)
  17008. -{
  17009. - unsigned int port_num = mp->port_num;
  17010. - u32 queues;
  17011. + if (pd->phy_addr == -1) {
  17012. + mp->shared_smi = NULL;
  17013. + mp->phy_addr = -1;
  17014. + } else {
  17015. + mp->shared_smi = mp->shared;
  17016. + if (pd->shared_smi != NULL)
  17017. + mp->shared_smi = platform_get_drvdata(pd->shared_smi);
  17018. +
  17019. + if (pd->force_phy_addr || pd->phy_addr) {
  17020. + mp->phy_addr = pd->phy_addr & 0x3f;
  17021. + phy_addr_set(mp, mp->phy_addr);
  17022. + } else {
  17023. + mp->phy_addr = phy_addr_get(mp);
  17024. + }
  17025. + }
  17026. - /* Stop Tx port activity. Check port Tx activity. */
  17027. - queues = rdl(mp, TRANSMIT_QUEUE_COMMAND_REG(port_num)) & 0xFF;
  17028. - if (queues) {
  17029. - /* Issue stop command for active queues only */
  17030. - wrl(mp, TRANSMIT_QUEUE_COMMAND_REG(port_num), (queues << 8));
  17031. + mp->default_rx_ring_size = DEFAULT_RX_QUEUE_SIZE;
  17032. + if (pd->rx_queue_size)
  17033. + mp->default_rx_ring_size = pd->rx_queue_size;
  17034. + mp->rx_desc_sram_addr = pd->rx_sram_addr;
  17035. + mp->rx_desc_sram_size = pd->rx_sram_size;
  17036. - /* Wait for all Tx activity to terminate. */
  17037. - /* Check port cause register that all Tx queues are stopped */
  17038. - while (rdl(mp, TRANSMIT_QUEUE_COMMAND_REG(port_num)) & 0xFF)
  17039. - udelay(PHY_WAIT_MICRO_SECONDS);
  17040. + if (pd->rx_queue_mask)
  17041. + mp->rxq_mask = pd->rx_queue_mask;
  17042. + else
  17043. + mp->rxq_mask = 0x01;
  17044. + mp->rxq_primary = fls(mp->rxq_mask) - 1;
  17045. - /* Wait for Tx FIFO to empty */
  17046. - while (rdl(mp, PORT_STATUS_REG(port_num)) &
  17047. - ETH_PORT_TX_FIFO_EMPTY)
  17048. - udelay(PHY_WAIT_MICRO_SECONDS);
  17049. - }
  17050. + mp->default_tx_ring_size = DEFAULT_TX_QUEUE_SIZE;
  17051. + if (pd->tx_queue_size)
  17052. + mp->default_tx_ring_size = pd->tx_queue_size;
  17053. + mp->tx_desc_sram_addr = pd->tx_sram_addr;
  17054. + mp->tx_desc_sram_size = pd->tx_sram_size;
  17055. - return queues;
  17056. + if (pd->tx_queue_mask)
  17057. + mp->txq_mask = pd->tx_queue_mask;
  17058. + else
  17059. + mp->txq_mask = 0x01;
  17060. + mp->txq_primary = fls(mp->txq_mask) - 1;
  17061. }
  17062. -static unsigned int mv643xx_eth_port_disable_rx(struct mv643xx_private *mp)
  17063. +static int phy_detect(struct mv643xx_eth_private *mp)
  17064. {
  17065. - unsigned int port_num = mp->port_num;
  17066. - u32 queues;
  17067. + unsigned int data;
  17068. + unsigned int data2;
  17069. - /* Stop Rx port activity. Check port Rx activity. */
  17070. - queues = rdl(mp, RECEIVE_QUEUE_COMMAND_REG(port_num)) & 0xFF;
  17071. - if (queues) {
  17072. - /* Issue stop command for active queues only */
  17073. - wrl(mp, RECEIVE_QUEUE_COMMAND_REG(port_num), (queues << 8));
  17074. + smi_reg_read(mp, mp->phy_addr, 0, &data);
  17075. + smi_reg_write(mp, mp->phy_addr, 0, data ^ 0x1000);
  17076. - /* Wait for all Rx activity to terminate. */
  17077. - /* Check port cause register that all Rx queues are stopped */
  17078. - while (rdl(mp, RECEIVE_QUEUE_COMMAND_REG(port_num)) & 0xFF)
  17079. - udelay(PHY_WAIT_MICRO_SECONDS);
  17080. - }
  17081. + smi_reg_read(mp, mp->phy_addr, 0, &data2);
  17082. + if (((data ^ data2) & 0x1000) == 0)
  17083. + return -ENODEV;
  17084. +
  17085. + smi_reg_write(mp, mp->phy_addr, 0, data);
  17086. - return queues;
  17087. + return 0;
  17088. }
  17089. -/*
  17090. - * eth_port_reset - Reset Ethernet port
  17091. - *
  17092. - * DESCRIPTION:
  17093. - * This routine resets the chip by aborting any SDMA engine activity and
  17094. - * clearing the MIB counters. The Receiver and the Transmit unit are in
  17095. - * idle state after this command is performed and the port is disabled.
  17096. - *
  17097. - * INPUT:
  17098. - * struct mv643xx_private *mp Ethernet Port.
  17099. - *
  17100. - * OUTPUT:
  17101. - * Channel activity is halted.
  17102. - *
  17103. - * RETURN:
  17104. - * None.
  17105. - *
  17106. - */
  17107. -static void eth_port_reset(struct mv643xx_private *mp)
  17108. +static int phy_init(struct mv643xx_eth_private *mp,
  17109. + struct mv643xx_eth_platform_data *pd)
  17110. {
  17111. - unsigned int port_num = mp->port_num;
  17112. - unsigned int reg_data;
  17113. -
  17114. - mv643xx_eth_port_disable_tx(mp);
  17115. - mv643xx_eth_port_disable_rx(mp);
  17116. -
  17117. - /* Clear all MIB counters */
  17118. - eth_clear_mib_counters(mp);
  17119. + struct ethtool_cmd cmd;
  17120. + int err;
  17121. - /* Reset the Enable bit in the Configuration Register */
  17122. - reg_data = rdl(mp, PORT_SERIAL_CONTROL_REG(port_num));
  17123. - reg_data &= ~(SERIAL_PORT_ENABLE |
  17124. - DO_NOT_FORCE_LINK_FAIL |
  17125. - FORCE_LINK_PASS);
  17126. - wrl(mp, PORT_SERIAL_CONTROL_REG(port_num), reg_data);
  17127. -}
  17128. + err = phy_detect(mp);
  17129. + if (err) {
  17130. + dev_printk(KERN_INFO, &mp->dev->dev,
  17131. + "no PHY detected at addr %d\n", mp->phy_addr);
  17132. + return err;
  17133. + }
  17134. + phy_reset(mp);
  17135. + mp->mii.phy_id = mp->phy_addr;
  17136. + mp->mii.phy_id_mask = 0x3f;
  17137. + mp->mii.reg_num_mask = 0x1f;
  17138. + mp->mii.dev = mp->dev;
  17139. + mp->mii.mdio_read = mv643xx_eth_mdio_read;
  17140. + mp->mii.mdio_write = mv643xx_eth_mdio_write;
  17141. -/*
  17142. - * eth_port_read_smi_reg - Read PHY registers
  17143. - *
  17144. - * DESCRIPTION:
  17145. - * This routine utilize the SMI interface to interact with the PHY in
  17146. - * order to perform PHY register read.
  17147. - *
  17148. - * INPUT:
  17149. - * struct mv643xx_private *mp Ethernet Port.
  17150. - * unsigned int phy_reg PHY register address offset.
  17151. - * unsigned int *value Register value buffer.
  17152. - *
  17153. - * OUTPUT:
  17154. - * Write the value of a specified PHY register into given buffer.
  17155. - *
  17156. - * RETURN:
  17157. - * false if the PHY is busy or read data is not in valid state.
  17158. - * true otherwise.
  17159. - *
  17160. - */
  17161. -static void eth_port_read_smi_reg(struct mv643xx_private *mp,
  17162. - unsigned int phy_reg, unsigned int *value)
  17163. -{
  17164. - void __iomem *smi_reg = mp->shared_smi->eth_base + SMI_REG;
  17165. - int phy_addr = ethernet_phy_get(mp);
  17166. - unsigned long flags;
  17167. - int i;
  17168. + mp->mii.supports_gmii = mii_check_gmii_support(&mp->mii);
  17169. - /* the SMI register is a shared resource */
  17170. - spin_lock_irqsave(&mp->shared_smi->phy_lock, flags);
  17171. + memset(&cmd, 0, sizeof(cmd));
  17172. - /* wait for the SMI register to become available */
  17173. - for (i = 0; readl(smi_reg) & ETH_SMI_BUSY; i++) {
  17174. - if (i == PHY_WAIT_ITERATIONS) {
  17175. - printk("%s: PHY busy timeout\n", mp->dev->name);
  17176. - goto out;
  17177. - }
  17178. - udelay(PHY_WAIT_MICRO_SECONDS);
  17179. + cmd.port = PORT_MII;
  17180. + cmd.transceiver = XCVR_INTERNAL;
  17181. + cmd.phy_address = mp->phy_addr;
  17182. + if (pd->speed == 0) {
  17183. + cmd.autoneg = AUTONEG_ENABLE;
  17184. + cmd.speed = SPEED_100;
  17185. + cmd.advertising = ADVERTISED_10baseT_Half |
  17186. + ADVERTISED_10baseT_Full |
  17187. + ADVERTISED_100baseT_Half |
  17188. + ADVERTISED_100baseT_Full;
  17189. + if (mp->mii.supports_gmii)
  17190. + cmd.advertising |= ADVERTISED_1000baseT_Full;
  17191. + } else {
  17192. + cmd.autoneg = AUTONEG_DISABLE;
  17193. + cmd.speed = pd->speed;
  17194. + cmd.duplex = pd->duplex;
  17195. }
  17196. - writel((phy_addr << 16) | (phy_reg << 21) | ETH_SMI_OPCODE_READ,
  17197. - smi_reg);
  17198. -
  17199. - /* now wait for the data to be valid */
  17200. - for (i = 0; !(readl(smi_reg) & ETH_SMI_READ_VALID); i++) {
  17201. - if (i == PHY_WAIT_ITERATIONS) {
  17202. - printk("%s: PHY read timeout\n", mp->dev->name);
  17203. - goto out;
  17204. - }
  17205. - udelay(PHY_WAIT_MICRO_SECONDS);
  17206. - }
  17207. + update_pscr(mp, cmd.speed, cmd.duplex);
  17208. + mv643xx_eth_set_settings(mp->dev, &cmd);
  17209. - *value = readl(smi_reg) & 0xffff;
  17210. -out:
  17211. - spin_unlock_irqrestore(&mp->shared_smi->phy_lock, flags);
  17212. + return 0;
  17213. }
  17214. -/*
  17215. - * eth_port_write_smi_reg - Write to PHY registers
  17216. - *
  17217. - * DESCRIPTION:
  17218. - * This routine utilize the SMI interface to interact with the PHY in
  17219. - * order to perform writes to PHY registers.
  17220. - *
  17221. - * INPUT:
  17222. - * struct mv643xx_private *mp Ethernet Port.
  17223. - * unsigned int phy_reg PHY register address offset.
  17224. - * unsigned int value Register value.
  17225. - *
  17226. - * OUTPUT:
  17227. - * Write the given value to the specified PHY register.
  17228. - *
  17229. - * RETURN:
  17230. - * false if the PHY is busy.
  17231. - * true otherwise.
  17232. - *
  17233. - */
  17234. -static void eth_port_write_smi_reg(struct mv643xx_private *mp,
  17235. - unsigned int phy_reg, unsigned int value)
  17236. +static int mv643xx_eth_probe(struct platform_device *pdev)
  17237. {
  17238. - void __iomem *smi_reg = mp->shared_smi->eth_base + SMI_REG;
  17239. - int phy_addr = ethernet_phy_get(mp);
  17240. - unsigned long flags;
  17241. - int i;
  17242. + struct mv643xx_eth_platform_data *pd;
  17243. + struct mv643xx_eth_private *mp;
  17244. + struct net_device *dev;
  17245. + struct resource *res;
  17246. + DECLARE_MAC_BUF(mac);
  17247. + int err;
  17248. - /* the SMI register is a shared resource */
  17249. - spin_lock_irqsave(&mp->shared_smi->phy_lock, flags);
  17250. + pd = pdev->dev.platform_data;
  17251. + if (pd == NULL) {
  17252. + dev_printk(KERN_ERR, &pdev->dev,
  17253. + "no mv643xx_eth_platform_data\n");
  17254. + return -ENODEV;
  17255. + }
  17256. - /* wait for the SMI register to become available */
  17257. - for (i = 0; readl(smi_reg) & ETH_SMI_BUSY; i++) {
  17258. - if (i == PHY_WAIT_ITERATIONS) {
  17259. - printk("%s: PHY busy timeout\n", mp->dev->name);
  17260. - goto out;
  17261. - }
  17262. - udelay(PHY_WAIT_MICRO_SECONDS);
  17263. + if (pd->shared == NULL) {
  17264. + dev_printk(KERN_ERR, &pdev->dev,
  17265. + "no mv643xx_eth_platform_data->shared\n");
  17266. + return -ENODEV;
  17267. }
  17268. - writel((phy_addr << 16) | (phy_reg << 21) |
  17269. - ETH_SMI_OPCODE_WRITE | (value & 0xffff), smi_reg);
  17270. -out:
  17271. - spin_unlock_irqrestore(&mp->shared_smi->phy_lock, flags);
  17272. -}
  17273. + dev = alloc_etherdev(sizeof(struct mv643xx_eth_private));
  17274. + if (!dev)
  17275. + return -ENOMEM;
  17276. -/*
  17277. - * Wrappers for MII support library.
  17278. - */
  17279. -static int mv643xx_mdio_read(struct net_device *dev, int phy_id, int location)
  17280. -{
  17281. - struct mv643xx_private *mp = netdev_priv(dev);
  17282. - int val;
  17283. + mp = netdev_priv(dev);
  17284. + platform_set_drvdata(pdev, mp);
  17285. - eth_port_read_smi_reg(mp, location, &val);
  17286. - return val;
  17287. -}
  17288. + mp->shared = platform_get_drvdata(pd->shared);
  17289. + mp->port_num = pd->port_number;
  17290. -static void mv643xx_mdio_write(struct net_device *dev, int phy_id, int location, int val)
  17291. -{
  17292. - struct mv643xx_private *mp = netdev_priv(dev);
  17293. - eth_port_write_smi_reg(mp, location, val);
  17294. -}
  17295. + mp->dev = dev;
  17296. +#ifdef MV643XX_ETH_NAPI
  17297. + netif_napi_add(dev, &mp->napi, mv643xx_eth_poll, 64);
  17298. +#endif
  17299. -/*
  17300. - * eth_port_receive - Get received information from Rx ring.
  17301. - *
  17302. - * DESCRIPTION:
  17303. - * This routine returns the received data to the caller. There is no
  17304. - * data copying during routine operation. All information is returned
  17305. - * using pointer to packet information struct passed from the caller.
  17306. - * If the routine exhausts Rx ring resources then the resource error flag
  17307. - * is set.
  17308. - *
  17309. - * INPUT:
  17310. - * struct mv643xx_private *mp Ethernet Port Control srtuct.
  17311. - * struct pkt_info *p_pkt_info User packet buffer.
  17312. - *
  17313. - * OUTPUT:
  17314. - * Rx ring current and used indexes are updated.
  17315. - *
  17316. - * RETURN:
  17317. - * ETH_ERROR in case the routine can not access Rx desc ring.
  17318. - * ETH_QUEUE_FULL if Rx ring resources are exhausted.
  17319. - * ETH_END_OF_JOB if there is no received data.
  17320. - * ETH_OK otherwise.
  17321. - */
  17322. -static ETH_FUNC_RET_STATUS eth_port_receive(struct mv643xx_private *mp,
  17323. - struct pkt_info *p_pkt_info)
  17324. -{
  17325. - int rx_next_curr_desc, rx_curr_desc, rx_used_desc;
  17326. - volatile struct eth_rx_desc *p_rx_desc;
  17327. - unsigned int command_status;
  17328. - unsigned long flags;
  17329. + set_params(mp, pd);
  17330. - /* Do not process Rx ring in case of Rx ring resource error */
  17331. - if (mp->rx_resource_err)
  17332. - return ETH_QUEUE_FULL;
  17333. + spin_lock_init(&mp->lock);
  17334. - spin_lock_irqsave(&mp->lock, flags);
  17335. + mib_counters_clear(mp);
  17336. + INIT_WORK(&mp->tx_timeout_task, tx_timeout_task);
  17337. - /* Get the Rx Desc ring 'curr and 'used' indexes */
  17338. - rx_curr_desc = mp->rx_curr_desc_q;
  17339. - rx_used_desc = mp->rx_used_desc_q;
  17340. -
  17341. - p_rx_desc = &mp->p_rx_desc_area[rx_curr_desc];
  17342. -
  17343. - /* The following parameters are used to save readings from memory */
  17344. - command_status = p_rx_desc->cmd_sts;
  17345. - rmb();
  17346. + if (mp->phy_addr != -1) {
  17347. + err = phy_init(mp, pd);
  17348. + if (err)
  17349. + goto out;
  17350. - /* Nothing to receive... */
  17351. - if (command_status & (ETH_BUFFER_OWNED_BY_DMA)) {
  17352. - spin_unlock_irqrestore(&mp->lock, flags);
  17353. - return ETH_END_OF_JOB;
  17354. + SET_ETHTOOL_OPS(dev, &mv643xx_eth_ethtool_ops);
  17355. + } else {
  17356. + SET_ETHTOOL_OPS(dev, &mv643xx_eth_ethtool_ops_phyless);
  17357. }
  17358. - p_pkt_info->byte_cnt = (p_rx_desc->byte_cnt) - RX_BUF_OFFSET;
  17359. - p_pkt_info->cmd_sts = command_status;
  17360. - p_pkt_info->buf_ptr = (p_rx_desc->buf_ptr) + RX_BUF_OFFSET;
  17361. - p_pkt_info->return_info = mp->rx_skb[rx_curr_desc];
  17362. - p_pkt_info->l4i_chk = p_rx_desc->buf_size;
  17363. -
  17364. - /*
  17365. - * Clean the return info field to indicate that the
  17366. - * packet has been moved to the upper layers
  17367. - */
  17368. - mp->rx_skb[rx_curr_desc] = NULL;
  17369. - /* Update current index in data structure */
  17370. - rx_next_curr_desc = (rx_curr_desc + 1) % mp->rx_ring_size;
  17371. - mp->rx_curr_desc_q = rx_next_curr_desc;
  17372. + res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
  17373. + BUG_ON(!res);
  17374. + dev->irq = res->start;
  17375. - /* Rx descriptors exhausted. Set the Rx ring resource error flag */
  17376. - if (rx_next_curr_desc == rx_used_desc)
  17377. - mp->rx_resource_err = 1;
  17378. + dev->hard_start_xmit = mv643xx_eth_xmit;
  17379. + dev->open = mv643xx_eth_open;
  17380. + dev->stop = mv643xx_eth_stop;
  17381. + dev->set_multicast_list = mv643xx_eth_set_rx_mode;
  17382. + dev->set_mac_address = mv643xx_eth_set_mac_address;
  17383. + dev->do_ioctl = mv643xx_eth_ioctl;
  17384. + dev->change_mtu = mv643xx_eth_change_mtu;
  17385. + dev->tx_timeout = mv643xx_eth_tx_timeout;
  17386. +#ifdef CONFIG_NET_POLL_CONTROLLER
  17387. + dev->poll_controller = mv643xx_eth_netpoll;
  17388. +#endif
  17389. + dev->watchdog_timeo = 2 * HZ;
  17390. + dev->base_addr = 0;
  17391. - spin_unlock_irqrestore(&mp->lock, flags);
  17392. +#ifdef MV643XX_ETH_CHECKSUM_OFFLOAD_TX
  17393. + /*
  17394. + * Zero copy can only work if we use Discovery II memory. Else, we will
  17395. + * have to map the buffers to ISA memory which is only 16 MB
  17396. + */
  17397. + dev->features = NETIF_F_SG | NETIF_F_IP_CSUM;
  17398. +#endif
  17399. - return ETH_OK;
  17400. -}
  17401. + SET_NETDEV_DEV(dev, &pdev->dev);
  17402. -/*
  17403. - * eth_rx_return_buff - Returns a Rx buffer back to the Rx ring.
  17404. - *
  17405. - * DESCRIPTION:
  17406. - * This routine returns a Rx buffer back to the Rx ring. It retrieves the
  17407. - * next 'used' descriptor and attached the returned buffer to it.
  17408. - * In case the Rx ring was in "resource error" condition, where there are
  17409. - * no available Rx resources, the function resets the resource error flag.
  17410. - *
  17411. - * INPUT:
  17412. - * struct mv643xx_private *mp Ethernet Port Control srtuct.
  17413. - * struct pkt_info *p_pkt_info Information on returned buffer.
  17414. - *
  17415. - * OUTPUT:
  17416. - * New available Rx resource in Rx descriptor ring.
  17417. - *
  17418. - * RETURN:
  17419. - * ETH_ERROR in case the routine can not access Rx desc ring.
  17420. - * ETH_OK otherwise.
  17421. - */
  17422. -static ETH_FUNC_RET_STATUS eth_rx_return_buff(struct mv643xx_private *mp,
  17423. - struct pkt_info *p_pkt_info)
  17424. -{
  17425. - int used_rx_desc; /* Where to return Rx resource */
  17426. - volatile struct eth_rx_desc *p_used_rx_desc;
  17427. - unsigned long flags;
  17428. + if (mp->shared->win_protect)
  17429. + wrl(mp, WINDOW_PROTECT(mp->port_num), mp->shared->win_protect);
  17430. - spin_lock_irqsave(&mp->lock, flags);
  17431. + err = register_netdev(dev);
  17432. + if (err)
  17433. + goto out;
  17434. - /* Get 'used' Rx descriptor */
  17435. - used_rx_desc = mp->rx_used_desc_q;
  17436. - p_used_rx_desc = &mp->p_rx_desc_area[used_rx_desc];
  17437. + dev_printk(KERN_NOTICE, &dev->dev, "port %d with MAC address %s\n",
  17438. + mp->port_num, print_mac(mac, dev->dev_addr));
  17439. - p_used_rx_desc->buf_ptr = p_pkt_info->buf_ptr;
  17440. - p_used_rx_desc->buf_size = p_pkt_info->byte_cnt;
  17441. - mp->rx_skb[used_rx_desc] = p_pkt_info->return_info;
  17442. + if (dev->features & NETIF_F_SG)
  17443. + dev_printk(KERN_NOTICE, &dev->dev, "scatter/gather enabled\n");
  17444. - /* Flush the write pipe */
  17445. + if (dev->features & NETIF_F_IP_CSUM)
  17446. + dev_printk(KERN_NOTICE, &dev->dev, "tx checksum offload\n");
  17447. - /* Return the descriptor to DMA ownership */
  17448. - wmb();
  17449. - p_used_rx_desc->cmd_sts =
  17450. - ETH_BUFFER_OWNED_BY_DMA | ETH_RX_ENABLE_INTERRUPT;
  17451. - wmb();
  17452. +#ifdef MV643XX_ETH_NAPI
  17453. + dev_printk(KERN_NOTICE, &dev->dev, "napi enabled\n");
  17454. +#endif
  17455. - /* Move the used descriptor pointer to the next descriptor */
  17456. - mp->rx_used_desc_q = (used_rx_desc + 1) % mp->rx_ring_size;
  17457. + if (mp->tx_desc_sram_size > 0)
  17458. + dev_printk(KERN_NOTICE, &dev->dev, "configured with sram\n");
  17459. - /* Any Rx return cancels the Rx resource error status */
  17460. - mp->rx_resource_err = 0;
  17461. + return 0;
  17462. - spin_unlock_irqrestore(&mp->lock, flags);
  17463. +out:
  17464. + free_netdev(dev);
  17465. - return ETH_OK;
  17466. + return err;
  17467. }
  17468. -/************* Begin ethtool support *************************/
  17469. -
  17470. -struct mv643xx_stats {
  17471. - char stat_string[ETH_GSTRING_LEN];
  17472. - int sizeof_stat;
  17473. - int stat_offset;
  17474. -};
  17475. -
  17476. -#define MV643XX_STAT(m) FIELD_SIZEOF(struct mv643xx_private, m), \
  17477. - offsetof(struct mv643xx_private, m)
  17478. -
  17479. -static const struct mv643xx_stats mv643xx_gstrings_stats[] = {
  17480. - { "rx_packets", MV643XX_STAT(stats.rx_packets) },
  17481. - { "tx_packets", MV643XX_STAT(stats.tx_packets) },
  17482. - { "rx_bytes", MV643XX_STAT(stats.rx_bytes) },
  17483. - { "tx_bytes", MV643XX_STAT(stats.tx_bytes) },
  17484. - { "rx_errors", MV643XX_STAT(stats.rx_errors) },
  17485. - { "tx_errors", MV643XX_STAT(stats.tx_errors) },
  17486. - { "rx_dropped", MV643XX_STAT(stats.rx_dropped) },
  17487. - { "tx_dropped", MV643XX_STAT(stats.tx_dropped) },
  17488. - { "good_octets_received", MV643XX_STAT(mib_counters.good_octets_received) },
  17489. - { "bad_octets_received", MV643XX_STAT(mib_counters.bad_octets_received) },
  17490. - { "internal_mac_transmit_err", MV643XX_STAT(mib_counters.internal_mac_transmit_err) },
  17491. - { "good_frames_received", MV643XX_STAT(mib_counters.good_frames_received) },
  17492. - { "bad_frames_received", MV643XX_STAT(mib_counters.bad_frames_received) },
  17493. - { "broadcast_frames_received", MV643XX_STAT(mib_counters.broadcast_frames_received) },
  17494. - { "multicast_frames_received", MV643XX_STAT(mib_counters.multicast_frames_received) },
  17495. - { "frames_64_octets", MV643XX_STAT(mib_counters.frames_64_octets) },
  17496. - { "frames_65_to_127_octets", MV643XX_STAT(mib_counters.frames_65_to_127_octets) },
  17497. - { "frames_128_to_255_octets", MV643XX_STAT(mib_counters.frames_128_to_255_octets) },
  17498. - { "frames_256_to_511_octets", MV643XX_STAT(mib_counters.frames_256_to_511_octets) },
  17499. - { "frames_512_to_1023_octets", MV643XX_STAT(mib_counters.frames_512_to_1023_octets) },
  17500. - { "frames_1024_to_max_octets", MV643XX_STAT(mib_counters.frames_1024_to_max_octets) },
  17501. - { "good_octets_sent", MV643XX_STAT(mib_counters.good_octets_sent) },
  17502. - { "good_frames_sent", MV643XX_STAT(mib_counters.good_frames_sent) },
  17503. - { "excessive_collision", MV643XX_STAT(mib_counters.excessive_collision) },
  17504. - { "multicast_frames_sent", MV643XX_STAT(mib_counters.multicast_frames_sent) },
  17505. - { "broadcast_frames_sent", MV643XX_STAT(mib_counters.broadcast_frames_sent) },
  17506. - { "unrec_mac_control_received", MV643XX_STAT(mib_counters.unrec_mac_control_received) },
  17507. - { "fc_sent", MV643XX_STAT(mib_counters.fc_sent) },
  17508. - { "good_fc_received", MV643XX_STAT(mib_counters.good_fc_received) },
  17509. - { "bad_fc_received", MV643XX_STAT(mib_counters.bad_fc_received) },
  17510. - { "undersize_received", MV643XX_STAT(mib_counters.undersize_received) },
  17511. - { "fragments_received", MV643XX_STAT(mib_counters.fragments_received) },
  17512. - { "oversize_received", MV643XX_STAT(mib_counters.oversize_received) },
  17513. - { "jabber_received", MV643XX_STAT(mib_counters.jabber_received) },
  17514. - { "mac_receive_error", MV643XX_STAT(mib_counters.mac_receive_error) },
  17515. - { "bad_crc_event", MV643XX_STAT(mib_counters.bad_crc_event) },
  17516. - { "collision", MV643XX_STAT(mib_counters.collision) },
  17517. - { "late_collision", MV643XX_STAT(mib_counters.late_collision) },
  17518. -};
  17519. +static int mv643xx_eth_remove(struct platform_device *pdev)
  17520. +{
  17521. + struct mv643xx_eth_private *mp = platform_get_drvdata(pdev);
  17522. -#define MV643XX_STATS_LEN ARRAY_SIZE(mv643xx_gstrings_stats)
  17523. + unregister_netdev(mp->dev);
  17524. + flush_scheduled_work();
  17525. + free_netdev(mp->dev);
  17526. -static void mv643xx_get_drvinfo(struct net_device *netdev,
  17527. - struct ethtool_drvinfo *drvinfo)
  17528. -{
  17529. - strncpy(drvinfo->driver, mv643xx_driver_name, 32);
  17530. - strncpy(drvinfo->version, mv643xx_driver_version, 32);
  17531. - strncpy(drvinfo->fw_version, "N/A", 32);
  17532. - strncpy(drvinfo->bus_info, "mv643xx", 32);
  17533. - drvinfo->n_stats = MV643XX_STATS_LEN;
  17534. -}
  17535. + platform_set_drvdata(pdev, NULL);
  17536. -static int mv643xx_get_sset_count(struct net_device *netdev, int sset)
  17537. -{
  17538. - switch (sset) {
  17539. - case ETH_SS_STATS:
  17540. - return MV643XX_STATS_LEN;
  17541. - default:
  17542. - return -EOPNOTSUPP;
  17543. - }
  17544. + return 0;
  17545. }
  17546. -static void mv643xx_get_ethtool_stats(struct net_device *netdev,
  17547. - struct ethtool_stats *stats, uint64_t *data)
  17548. +static void mv643xx_eth_shutdown(struct platform_device *pdev)
  17549. {
  17550. - struct mv643xx_private *mp = netdev->priv;
  17551. - int i;
  17552. + struct mv643xx_eth_private *mp = platform_get_drvdata(pdev);
  17553. - eth_update_mib_counters(mp);
  17554. + /* Mask all interrupts on ethernet port */
  17555. + wrl(mp, INT_MASK(mp->port_num), 0);
  17556. + rdl(mp, INT_MASK(mp->port_num));
  17557. - for (i = 0; i < MV643XX_STATS_LEN; i++) {
  17558. - char *p = (char *)mp+mv643xx_gstrings_stats[i].stat_offset;
  17559. - data[i] = (mv643xx_gstrings_stats[i].sizeof_stat ==
  17560. - sizeof(uint64_t)) ? *(uint64_t *)p : *(uint32_t *)p;
  17561. - }
  17562. + if (netif_running(mp->dev))
  17563. + port_reset(mp);
  17564. }
  17565. -static void mv643xx_get_strings(struct net_device *netdev, uint32_t stringset,
  17566. - uint8_t *data)
  17567. -{
  17568. - int i;
  17569. -
  17570. - switch(stringset) {
  17571. - case ETH_SS_STATS:
  17572. - for (i=0; i < MV643XX_STATS_LEN; i++) {
  17573. - memcpy(data + i * ETH_GSTRING_LEN,
  17574. - mv643xx_gstrings_stats[i].stat_string,
  17575. - ETH_GSTRING_LEN);
  17576. - }
  17577. - break;
  17578. - }
  17579. -}
  17580. +static struct platform_driver mv643xx_eth_driver = {
  17581. + .probe = mv643xx_eth_probe,
  17582. + .remove = mv643xx_eth_remove,
  17583. + .shutdown = mv643xx_eth_shutdown,
  17584. + .driver = {
  17585. + .name = MV643XX_ETH_NAME,
  17586. + .owner = THIS_MODULE,
  17587. + },
  17588. +};
  17589. -static u32 mv643xx_eth_get_link(struct net_device *dev)
  17590. +static int __init mv643xx_eth_init_module(void)
  17591. {
  17592. - struct mv643xx_private *mp = netdev_priv(dev);
  17593. -
  17594. - return mii_link_ok(&mp->mii);
  17595. -}
  17596. + int rc;
  17597. -static int mv643xx_eth_nway_restart(struct net_device *dev)
  17598. -{
  17599. - struct mv643xx_private *mp = netdev_priv(dev);
  17600. + rc = platform_driver_register(&mv643xx_eth_shared_driver);
  17601. + if (!rc) {
  17602. + rc = platform_driver_register(&mv643xx_eth_driver);
  17603. + if (rc)
  17604. + platform_driver_unregister(&mv643xx_eth_shared_driver);
  17605. + }
  17606. - return mii_nway_restart(&mp->mii);
  17607. + return rc;
  17608. }
  17609. +module_init(mv643xx_eth_init_module);
  17610. -static int mv643xx_eth_do_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
  17611. +static void __exit mv643xx_eth_cleanup_module(void)
  17612. {
  17613. - struct mv643xx_private *mp = netdev_priv(dev);
  17614. -
  17615. - return generic_mii_ioctl(&mp->mii, if_mii(ifr), cmd, NULL);
  17616. + platform_driver_unregister(&mv643xx_eth_driver);
  17617. + platform_driver_unregister(&mv643xx_eth_shared_driver);
  17618. }
  17619. +module_exit(mv643xx_eth_cleanup_module);
  17620. -static const struct ethtool_ops mv643xx_ethtool_ops = {
  17621. - .get_settings = mv643xx_get_settings,
  17622. - .set_settings = mv643xx_set_settings,
  17623. - .get_drvinfo = mv643xx_get_drvinfo,
  17624. - .get_link = mv643xx_eth_get_link,
  17625. - .set_sg = ethtool_op_set_sg,
  17626. - .get_sset_count = mv643xx_get_sset_count,
  17627. - .get_ethtool_stats = mv643xx_get_ethtool_stats,
  17628. - .get_strings = mv643xx_get_strings,
  17629. - .nway_reset = mv643xx_eth_nway_restart,
  17630. -};
  17631. -
  17632. -/************* End ethtool support *************************/
  17633. +MODULE_AUTHOR("Rabeeh Khoury, Assaf Hoffman, Matthew Dharm, "
  17634. + "Manish Lachwani, Dale Farnsworth and Lennert Buytenhek");
  17635. +MODULE_DESCRIPTION("Ethernet driver for Marvell MV643XX");
  17636. +MODULE_LICENSE("GPL");
  17637. +MODULE_ALIAS("platform:" MV643XX_ETH_SHARED_NAME);
  17638. +MODULE_ALIAS("platform:" MV643XX_ETH_NAME);
  17639. --- /dev/null
  17640. +++ b/include/asm-arm/arch-kirkwood/debug-macro.S
  17641. @@ -0,0 +1,20 @@
  17642. +/*
  17643. + * include/asm-arm/arch-kirkwood/debug-macro.S
  17644. + *
  17645. + * This program is free software; you can redistribute it and/or modify
  17646. + * it under the terms of the GNU General Public License version 2 as
  17647. + * published by the Free Software Foundation.
  17648. +*/
  17649. +
  17650. +#include <asm/arch/kirkwood.h>
  17651. +
  17652. + .macro addruart,rx
  17653. + mrc p15, 0, \rx, c1, c0
  17654. + tst \rx, #1 @ MMU enabled?
  17655. + ldreq \rx, =KIRKWOOD_REGS_PHYS_BASE
  17656. + ldrne \rx, =KIRKWOOD_REGS_VIRT_BASE
  17657. + orr \rx, \rx, #0x00012000
  17658. + .endm
  17659. +
  17660. +#define UART_SHIFT 2
  17661. +#include <asm/hardware/debug-8250.S>
  17662. --- /dev/null
  17663. +++ b/include/asm-arm/arch-kirkwood/dma.h
  17664. @@ -0,0 +1 @@
  17665. +/* empty */
  17666. --- /dev/null
  17667. +++ b/include/asm-arm/arch-kirkwood/entry-macro.S
  17668. @@ -0,0 +1,40 @@
  17669. +/*
  17670. + * include/asm-arm/arch-kirkwood/entry-macro.S
  17671. + *
  17672. + * Low-level IRQ helper macros for Marvell Kirkwood platforms
  17673. + *
  17674. + * This file is licensed under the terms of the GNU General Public
  17675. + * License version 2. This program is licensed "as is" without any
  17676. + * warranty of any kind, whether express or implied.
  17677. + */
  17678. +
  17679. +#include <asm/arch/kirkwood.h>
  17680. +
  17681. + .macro disable_fiq
  17682. + .endm
  17683. +
  17684. + .macro arch_ret_to_user, tmp1, tmp2
  17685. + .endm
  17686. +
  17687. + .macro get_irqnr_preamble, base, tmp
  17688. + ldr \base, =IRQ_VIRT_BASE
  17689. + .endm
  17690. +
  17691. + .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
  17692. + @ check low interrupts
  17693. + ldr \irqstat, [\base, #IRQ_CAUSE_LOW_OFF]
  17694. + ldr \tmp, [\base, #IRQ_MASK_LOW_OFF]
  17695. + mov \irqnr, #31
  17696. + ands \irqstat, \irqstat, \tmp
  17697. + bne 1001f
  17698. +
  17699. + @ if no low interrupts set, check high interrupts
  17700. + ldr \irqstat, [\base, #IRQ_CAUSE_HIGH_OFF]
  17701. + ldr \tmp, [\base, #IRQ_MASK_HIGH_OFF]
  17702. + mov \irqnr, #63
  17703. + ands \irqstat, \irqstat, \tmp
  17704. +
  17705. + @ find first active interrupt source
  17706. +1001: clzne \irqstat, \irqstat
  17707. + subne \irqnr, \irqnr, \irqstat
  17708. + .endm
  17709. --- /dev/null
  17710. +++ b/include/asm-arm/arch-kirkwood/hardware.h
  17711. @@ -0,0 +1,21 @@
  17712. +/*
  17713. + * include/asm-arm/arch-kirkwood/hardware.h
  17714. + *
  17715. + * This program is free software; you can redistribute it and/or modify
  17716. + * it under the terms of the GNU General Public License version 2 as
  17717. + * published by the Free Software Foundation.
  17718. + */
  17719. +
  17720. +#ifndef __ASM_ARCH_HARDWARE_H
  17721. +#define __ASM_ARCH_HARDWARE_H
  17722. +
  17723. +#include "kirkwood.h"
  17724. +
  17725. +#define pcibios_assign_all_busses() 1
  17726. +
  17727. +#define PCIBIOS_MIN_IO 0x00001000
  17728. +#define PCIBIOS_MIN_MEM 0x01000000
  17729. +#define PCIMEM_BASE KIRKWOOD_PCIE_MEM_PHYS_BASE /* mem base for VGA */
  17730. +
  17731. +
  17732. +#endif
  17733. --- /dev/null
  17734. +++ b/include/asm-arm/arch-kirkwood/io.h
  17735. @@ -0,0 +1,26 @@
  17736. +/*
  17737. + * include/asm-arm/arch-kirkwood/io.h
  17738. + *
  17739. + * This file is licensed under the terms of the GNU General Public
  17740. + * License version 2. This program is licensed "as is" without any
  17741. + * warranty of any kind, whether express or implied.
  17742. + */
  17743. +
  17744. +#ifndef __ASM_ARCH_IO_H
  17745. +#define __ASM_ARCH_IO_H
  17746. +
  17747. +#include "kirkwood.h"
  17748. +
  17749. +#define IO_SPACE_LIMIT 0xffffffff
  17750. +
  17751. +static inline void __iomem *__io(unsigned long addr)
  17752. +{
  17753. + return (void __iomem *)((addr - KIRKWOOD_PCIE_IO_PHYS_BASE)
  17754. + + KIRKWOOD_PCIE_IO_VIRT_BASE);
  17755. +}
  17756. +
  17757. +#define __io(a) __io(a)
  17758. +#define __mem_pci(a) (a)
  17759. +
  17760. +
  17761. +#endif
  17762. --- /dev/null
  17763. +++ b/include/asm-arm/arch-kirkwood/irqs.h
  17764. @@ -0,0 +1,63 @@
  17765. +/*
  17766. + * include/asm-arm/arch-kirkwood/irqs.h
  17767. + *
  17768. + * IRQ definitions for Marvell Kirkwood SoCs
  17769. + *
  17770. + * This file is licensed under the terms of the GNU General Public
  17771. + * License version 2. This program is licensed "as is" without any
  17772. + * warranty of any kind, whether express or implied.
  17773. + */
  17774. +
  17775. +#ifndef __ASM_ARCH_IRQS_H
  17776. +#define __ASM_ARCH_IRQS_H
  17777. +
  17778. +#include "kirkwood.h" /* need GPIO_MAX */
  17779. +
  17780. +/*
  17781. + * Low Interrupt Controller
  17782. + */
  17783. +#define IRQ_KIRKWOOD_HIGH_SUM 0
  17784. +#define IRQ_KIRKWOOD_BRIDGE 1
  17785. +#define IRQ_KIRKWOOD_HOST2CPU 2
  17786. +#define IRQ_KIRKWOOD_CPU2HOST 3
  17787. +#define IRQ_KIRKWOOD_XOR_00 5
  17788. +#define IRQ_KIRKWOOD_XOR_01 6
  17789. +#define IRQ_KIRKWOOD_XOR_10 7
  17790. +#define IRQ_KIRKWOOD_XOR_11 8
  17791. +#define IRQ_KIRKWOOD_PCIE 9
  17792. +#define IRQ_KIRKWOOD_GE00_SUM 11
  17793. +#define IRQ_KIRKWOOD_GE01_SUM 15
  17794. +#define IRQ_KIRKWOOD_USB 19
  17795. +#define IRQ_KIRKWOOD_SATA 21
  17796. +#define IRQ_KIRKWOOD_CRYPTO 22
  17797. +#define IRQ_KIRKWOOD_SPI 23
  17798. +#define IRQ_KIRKWOOD_I2S 24
  17799. +#define IRQ_KIRKWOOD_TS_0 26
  17800. +#define IRQ_KIRKWOOD_SDIO 28
  17801. +#define IRQ_KIRKWOOD_TWSI 29
  17802. +#define IRQ_KIRKWOOD_AVB 30
  17803. +#define IRQ_KIRKWOOD_TDMI 31
  17804. +
  17805. +/*
  17806. + * High Interrupt Controller
  17807. + */
  17808. +#define IRQ_KIRKWOOD_UART_0 33
  17809. +#define IRQ_KIRKWOOD_UART_1 34
  17810. +#define IRQ_KIRKWOOD_GPIO_LOW_0_7 35
  17811. +#define IRQ_KIRKWOOD_GPIO_LOW_8_15 36
  17812. +#define IRQ_KIRKWOOD_GPIO_LOW_16_23 37
  17813. +#define IRQ_KIRKWOOD_GPIO_LOW_24_31 38
  17814. +#define IRQ_KIRKWOOD_GPIO_HIGH_0_7 39
  17815. +#define IRQ_KIRKWOOD_GPIO_HIGH_8_15 40
  17816. +#define IRQ_KIRKWOOD_GPIO_HIGH_16_23 41
  17817. +
  17818. +/*
  17819. + * KIRKWOOD General Purpose Pins
  17820. + */
  17821. +#define IRQ_KIRKWOOD_GPIO_START 64
  17822. +#define NR_GPIO_IRQS GPIO_MAX
  17823. +
  17824. +#define NR_IRQS (IRQ_KIRKWOOD_GPIO_START + NR_GPIO_IRQS)
  17825. +
  17826. +
  17827. +#endif
  17828. --- /dev/null
  17829. +++ b/include/asm-arm/arch-kirkwood/kirkwood.h
  17830. @@ -0,0 +1,99 @@
  17831. +/*
  17832. + * include/asm-arm/arch-kirkwood/kirkwood.h
  17833. + *
  17834. + * Generic definitions for Marvell Kirkwood SoC flavors:
  17835. + * 88F6180, 88F6192 and 88F6281.
  17836. + *
  17837. + * This file is licensed under the terms of the GNU General Public
  17838. + * License version 2. This program is licensed "as is" without any
  17839. + * warranty of any kind, whether express or implied.
  17840. + */
  17841. +
  17842. +#ifndef __ASM_ARCH_KIRKWOOD_H
  17843. +#define __ASM_ARCH_KIRKWOOD_H
  17844. +
  17845. +/*
  17846. + * Marvell Kirkwood address maps.
  17847. + *
  17848. + * phys
  17849. + * e0000000 PCIe Memory space
  17850. + * f1000000 on-chip peripheral registers
  17851. + * f2000000 PCIe I/O space
  17852. + * f3000000 NAND controller address window
  17853. + *
  17854. + * virt phys size
  17855. + * fee00000 f1000000 1M on-chip peripheral registers
  17856. + * fef00000 f2000000 1M PCIe I/O space
  17857. + */
  17858. +
  17859. +#define KIRKWOOD_NAND_MEM_PHYS_BASE 0xf3000000
  17860. +#define KIRKWOOD_NAND_MEM_SIZE SZ_64K /* 1K is sufficient, but 64K
  17861. + * is the minimal window size
  17862. + */
  17863. +
  17864. +#define KIRKWOOD_PCIE_IO_PHYS_BASE 0xf2000000
  17865. +#define KIRKWOOD_PCIE_IO_VIRT_BASE 0xfef00000
  17866. +#define KIRKWOOD_PCIE_IO_BUS_BASE 0x00000000
  17867. +#define KIRKWOOD_PCIE_IO_SIZE SZ_1M
  17868. +
  17869. +#define KIRKWOOD_REGS_PHYS_BASE 0xf1000000
  17870. +#define KIRKWOOD_REGS_VIRT_BASE 0xfee00000
  17871. +#define KIRKWOOD_REGS_SIZE SZ_1M
  17872. +
  17873. +#define KIRKWOOD_PCIE_MEM_PHYS_BASE 0xe0000000
  17874. +#define KIRKWOOD_PCIE_MEM_SIZE SZ_128M
  17875. +
  17876. +/*
  17877. + * MBUS bridge registers.
  17878. + */
  17879. +#define BRIDGE_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE | 0x20000)
  17880. +#define CPU_CONTROL (BRIDGE_VIRT_BASE | 0x0104)
  17881. +#define CPU_RESET 0x00000002
  17882. +//#define L2_WRITETHROUGH 0x00020000
  17883. +#define RSTOUTn_MASK (BRIDGE_VIRT_BASE | 0x0108)
  17884. +#define SOFT_RESET_OUT_EN 0x00000004
  17885. +#define SYSTEM_SOFT_RESET (BRIDGE_VIRT_BASE | 0x010c)
  17886. +#define SOFT_RESET 0x00000001
  17887. +#define BRIDGE_CAUSE (BRIDGE_VIRT_BASE | 0x0110)
  17888. +#define BRIDGE_MASK (BRIDGE_VIRT_BASE | 0x0114)
  17889. +#define BRIDGE_INT_TIMER0 0x0002
  17890. +#define BRIDGE_INT_TIMER1 0x0004
  17891. +#define BRIDGE_INT_TIMER1_CLR (~0x0004)
  17892. +#define IRQ_VIRT_BASE (BRIDGE_VIRT_BASE | 0x0200)
  17893. +#define IRQ_CAUSE_LOW_OFF 0x0000
  17894. +#define IRQ_MASK_LOW_OFF 0x0004
  17895. +#define IRQ_CAUSE_HIGH_OFF 0x0010
  17896. +#define IRQ_MASK_HIGH_OFF 0x0014
  17897. +#define TIMER_VIRT_BASE (BRIDGE_VIRT_BASE | 0x0300)
  17898. +
  17899. +/*
  17900. + * Register Map
  17901. + */
  17902. +#define DDR_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE | 0x00000)
  17903. +#define DDR_WINDOW_CPU_BASE (DDR_VIRT_BASE | 0x1500)
  17904. +
  17905. +#define DEV_BUS_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x10000)
  17906. +#define DEV_BUS_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE | 0x10000)
  17907. +#define SAMPLE_AT_RESET (DEV_BUS_VIRT_BASE | 0x0030)
  17908. +#define DEVICE_ID (DEV_BUS_VIRT_BASE | 0x0034)
  17909. +#define RTC_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x0300)
  17910. +#define SPI_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x0600)
  17911. +#define UART0_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x2000)
  17912. +#define UART0_VIRT_BASE (DEV_BUS_VIRT_BASE | 0x2000)
  17913. +#define UART1_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x2100)
  17914. +#define UART1_VIRT_BASE (DEV_BUS_VIRT_BASE | 0x2100)
  17915. +
  17916. +#define PCIE_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE | 0x40000)
  17917. +
  17918. +#define USB_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x50000)
  17919. +
  17920. +#define GE00_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x70000)
  17921. +#define GE01_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x74000)
  17922. +
  17923. +#define SATA_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x80000)
  17924. +
  17925. +
  17926. +#define GPIO_MAX 50
  17927. +
  17928. +
  17929. +#endif
  17930. --- /dev/null
  17931. +++ b/include/asm-arm/arch-kirkwood/memory.h
  17932. @@ -0,0 +1,14 @@
  17933. +/*
  17934. + * include/asm-arm/arch-kirkwood/memory.h
  17935. + */
  17936. +
  17937. +#ifndef __ASM_ARCH_MEMORY_H
  17938. +#define __ASM_ARCH_MEMORY_H
  17939. +
  17940. +#define PHYS_OFFSET UL(0x00000000)
  17941. +
  17942. +#define __virt_to_bus(x) __virt_to_phys(x)
  17943. +#define __bus_to_virt(x) __phys_to_virt(x)
  17944. +
  17945. +
  17946. +#endif
  17947. --- /dev/null
  17948. +++ b/include/asm-arm/arch-kirkwood/system.h
  17949. @@ -0,0 +1,37 @@
  17950. +/*
  17951. + * include/asm-arm/arch-kirkwood/system.h
  17952. + *
  17953. + * This file is licensed under the terms of the GNU General Public
  17954. + * License version 2. This program is licensed "as is" without any
  17955. + * warranty of any kind, whether express or implied.
  17956. + */
  17957. +
  17958. +#ifndef __ASM_ARCH_SYSTEM_H
  17959. +#define __ASM_ARCH_SYSTEM_H
  17960. +
  17961. +#include <asm/arch/hardware.h>
  17962. +#include <asm/arch/kirkwood.h>
  17963. +
  17964. +static inline void arch_idle(void)
  17965. +{
  17966. + cpu_do_idle();
  17967. +}
  17968. +
  17969. +static inline void arch_reset(char mode)
  17970. +{
  17971. + /*
  17972. + * Enable soft reset to assert RSTOUTn.
  17973. + */
  17974. + writel(SOFT_RESET_OUT_EN, RSTOUTn_MASK);
  17975. +
  17976. + /*
  17977. + * Assert soft reset.
  17978. + */
  17979. + writel(SOFT_RESET, SYSTEM_SOFT_RESET);
  17980. +
  17981. + while (1)
  17982. + ;
  17983. +}
  17984. +
  17985. +
  17986. +#endif
  17987. --- /dev/null
  17988. +++ b/include/asm-arm/arch-kirkwood/timex.h
  17989. @@ -0,0 +1,11 @@
  17990. +/*
  17991. + * include/asm-arm/arch-kirkwood/timex.h
  17992. + *
  17993. + * This file is licensed under the terms of the GNU General Public
  17994. + * License version 2. This program is licensed "as is" without any
  17995. + * warranty of any kind, whether express or implied.
  17996. + */
  17997. +
  17998. +#define CLOCK_TICK_RATE (100 * HZ)
  17999. +
  18000. +#define KIRKWOOD_TCLK 166666667
  18001. --- /dev/null
  18002. +++ b/include/asm-arm/arch-kirkwood/uncompress.h
  18003. @@ -0,0 +1,47 @@
  18004. +/*
  18005. + * include/asm-arm/arch-kirkwood/uncompress.h
  18006. + *
  18007. + * This file is licensed under the terms of the GNU General Public
  18008. + * License version 2. This program is licensed "as is" without any
  18009. + * warranty of any kind, whether express or implied.
  18010. + */
  18011. +
  18012. +#include <linux/serial_reg.h>
  18013. +#include <asm/arch/kirkwood.h>
  18014. +
  18015. +#define SERIAL_BASE ((unsigned char *)UART0_PHYS_BASE)
  18016. +
  18017. +static void putc(const char c)
  18018. +{
  18019. + unsigned char *base = SERIAL_BASE;
  18020. + int i;
  18021. +
  18022. + for (i = 0; i < 0x1000; i++) {
  18023. + if (base[UART_LSR << 2] & UART_LSR_THRE)
  18024. + break;
  18025. + barrier();
  18026. + }
  18027. +
  18028. + base[UART_TX << 2] = c;
  18029. +}
  18030. +
  18031. +static void flush(void)
  18032. +{
  18033. + unsigned char *base = SERIAL_BASE;
  18034. + unsigned char mask;
  18035. + int i;
  18036. +
  18037. + mask = UART_LSR_TEMT | UART_LSR_THRE;
  18038. +
  18039. + for (i = 0; i < 0x1000; i++) {
  18040. + if ((base[UART_LSR << 2] & mask) == mask)
  18041. + break;
  18042. + barrier();
  18043. + }
  18044. +}
  18045. +
  18046. +/*
  18047. + * nothing to do
  18048. + */
  18049. +#define arch_decomp_setup()
  18050. +#define arch_decomp_wdog()
  18051. --- /dev/null
  18052. +++ b/include/asm-arm/arch-kirkwood/vmalloc.h
  18053. @@ -0,0 +1,5 @@
  18054. +/*
  18055. + * include/asm-arm/arch-kirkwood/vmalloc.h
  18056. + */
  18057. +
  18058. +#define VMALLOC_END 0xfe800000
  18059. --- /dev/null
  18060. +++ b/include/asm-arm/arch-loki/debug-macro.S
  18061. @@ -0,0 +1,20 @@
  18062. +/*
  18063. + * include/asm-arm/arch-loki/debug-macro.S
  18064. + *
  18065. + * This program is free software; you can redistribute it and/or modify
  18066. + * it under the terms of the GNU General Public License version 2 as
  18067. + * published by the Free Software Foundation.
  18068. +*/
  18069. +
  18070. +#include <asm/arch/loki.h>
  18071. +
  18072. + .macro addruart,rx
  18073. + mrc p15, 0, \rx, c1, c0
  18074. + tst \rx, #1 @ MMU enabled?
  18075. + ldreq \rx, =LOKI_REGS_PHYS_BASE
  18076. + ldrne \rx, =LOKI_REGS_VIRT_BASE
  18077. + orr \rx, \rx, #0x00012000
  18078. + .endm
  18079. +
  18080. +#define UART_SHIFT 2
  18081. +#include <asm/hardware/debug-8250.S>
  18082. --- /dev/null
  18083. +++ b/include/asm-arm/arch-loki/dma.h
  18084. @@ -0,0 +1 @@
  18085. +/* empty */
  18086. --- /dev/null
  18087. +++ b/include/asm-arm/arch-loki/entry-macro.S
  18088. @@ -0,0 +1,30 @@
  18089. +/*
  18090. + * include/asm-arm/arch-loki/entry-macro.S
  18091. + *
  18092. + * Low-level IRQ helper macros for Marvell Loki (88RC8480) platforms
  18093. + *
  18094. + * This file is licensed under the terms of the GNU General Public
  18095. + * License version 2. This program is licensed "as is" without any
  18096. + * warranty of any kind, whether express or implied.
  18097. + */
  18098. +
  18099. +#include <asm/arch/loki.h>
  18100. +
  18101. + .macro disable_fiq
  18102. + .endm
  18103. +
  18104. + .macro arch_ret_to_user, tmp1, tmp2
  18105. + .endm
  18106. +
  18107. + .macro get_irqnr_preamble, base, tmp
  18108. + ldr \base, =IRQ_VIRT_BASE
  18109. + .endm
  18110. +
  18111. + .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
  18112. + ldr \irqstat, [\base, #IRQ_CAUSE_OFF]
  18113. + ldr \tmp, [\base, #IRQ_MASK_OFF]
  18114. + mov \irqnr, #0
  18115. + ands \irqstat, \irqstat, \tmp
  18116. + clzne \irqnr, \irqstat
  18117. + rsbne \irqnr, \irqnr, #31
  18118. + .endm
  18119. --- /dev/null
  18120. +++ b/include/asm-arm/arch-loki/hardware.h
  18121. @@ -0,0 +1,15 @@
  18122. +/*
  18123. + * include/asm-arm/arch-loki/hardware.h
  18124. + *
  18125. + * This program is free software; you can redistribute it and/or modify
  18126. + * it under the terms of the GNU General Public License version 2 as
  18127. + * published by the Free Software Foundation.
  18128. + */
  18129. +
  18130. +#ifndef __ASM_ARCH_HARDWARE_H
  18131. +#define __ASM_ARCH_HARDWARE_H
  18132. +
  18133. +#include "loki.h"
  18134. +
  18135. +
  18136. +#endif
  18137. --- /dev/null
  18138. +++ b/include/asm-arm/arch-loki/io.h
  18139. @@ -0,0 +1,26 @@
  18140. +/*
  18141. + * include/asm-arm/arch-loki/io.h
  18142. + *
  18143. + * This file is licensed under the terms of the GNU General Public
  18144. + * License version 2. This program is licensed "as is" without any
  18145. + * warranty of any kind, whether express or implied.
  18146. + */
  18147. +
  18148. +#ifndef __ASM_ARCH_IO_H
  18149. +#define __ASM_ARCH_IO_H
  18150. +
  18151. +#include "loki.h"
  18152. +
  18153. +#define IO_SPACE_LIMIT 0xffffffff
  18154. +
  18155. +static inline void __iomem *__io(unsigned long addr)
  18156. +{
  18157. + return (void __iomem *)((addr - LOKI_PCIE0_IO_PHYS_BASE)
  18158. + + LOKI_PCIE0_IO_VIRT_BASE);
  18159. +}
  18160. +
  18161. +#define __io(a) __io(a)
  18162. +#define __mem_pci(a) (a)
  18163. +
  18164. +
  18165. +#endif
  18166. --- /dev/null
  18167. +++ b/include/asm-arm/arch-loki/irqs.h
  18168. @@ -0,0 +1,58 @@
  18169. +/*
  18170. + * include/asm-arm/arch-loki/irqs.h
  18171. + *
  18172. + * IRQ definitions for Marvell Loki (88RC8480) SoCs
  18173. + *
  18174. + * This file is licensed under the terms of the GNU General Public
  18175. + * License version 2. This program is licensed "as is" without any
  18176. + * warranty of any kind, whether express or implied.
  18177. + */
  18178. +
  18179. +#ifndef __ASM_ARCH_IRQS_H
  18180. +#define __ASM_ARCH_IRQS_H
  18181. +
  18182. +#include "loki.h" /* need GPIO_MAX */
  18183. +
  18184. +/*
  18185. + * Interrupt Controller
  18186. + */
  18187. +#define IRQ_LOKI_PCIE_A_CPU_DRBL 0
  18188. +#define IRQ_LOKI_CPU_PCIE_A_DRBL 1
  18189. +#define IRQ_LOKI_PCIE_B_CPU_DRBL 2
  18190. +#define IRQ_LOKI_CPU_PCIE_B_DRBL 3
  18191. +#define IRQ_LOKI_COM_A_ERR 6
  18192. +#define IRQ_LOKI_COM_A_IN 7
  18193. +#define IRQ_LOKI_COM_A_OUT 8
  18194. +#define IRQ_LOKI_COM_B_ERR 9
  18195. +#define IRQ_LOKI_COM_B_IN 10
  18196. +#define IRQ_LOKI_COM_B_OUT 11
  18197. +#define IRQ_LOKI_DMA_A 12
  18198. +#define IRQ_LOKI_DMA_B 13
  18199. +#define IRQ_LOKI_SAS_A 14
  18200. +#define IRQ_LOKI_SAS_B 15
  18201. +#define IRQ_LOKI_DDR 16
  18202. +#define IRQ_LOKI_XOR 17
  18203. +#define IRQ_LOKI_BRIDGE 18
  18204. +#define IRQ_LOKI_PCIE_A_ERR 20
  18205. +#define IRQ_LOKI_PCIE_A_INT 21
  18206. +#define IRQ_LOKI_PCIE_B_ERR 22
  18207. +#define IRQ_LOKI_PCIE_B_INT 23
  18208. +#define IRQ_LOKI_GBE_A_INT 24
  18209. +#define IRQ_LOKI_GBE_B_INT 25
  18210. +#define IRQ_LOKI_DEV_ERR 26
  18211. +#define IRQ_LOKI_UART0 27
  18212. +#define IRQ_LOKI_UART1 28
  18213. +#define IRQ_LOKI_TWSI 29
  18214. +#define IRQ_LOKI_GPIO_23_0 30
  18215. +#define IRQ_LOKI_GPIO_25_24 31
  18216. +
  18217. +/*
  18218. + * Loki General Purpose Pins
  18219. + */
  18220. +#define IRQ_LOKI_GPIO_START 32
  18221. +#define NR_GPIO_IRQS GPIO_MAX
  18222. +
  18223. +#define NR_IRQS (IRQ_LOKI_GPIO_START + NR_GPIO_IRQS)
  18224. +
  18225. +
  18226. +#endif
  18227. --- /dev/null
  18228. +++ b/include/asm-arm/arch-loki/loki.h
  18229. @@ -0,0 +1,97 @@
  18230. +/*
  18231. + * include/asm-arm/arch-loki/loki.h
  18232. + *
  18233. + * Generic definitions for Marvell Loki (88RC8480) SoC flavors
  18234. + *
  18235. + * This file is licensed under the terms of the GNU General Public
  18236. + * License version 2. This program is licensed "as is" without any
  18237. + * warranty of any kind, whether express or implied.
  18238. + */
  18239. +
  18240. +#ifndef __ASM_ARCH_LOKI_H
  18241. +#define __ASM_ARCH_LOKI_H
  18242. +
  18243. +/*
  18244. + * Marvell Loki (88RC8480) address maps.
  18245. + *
  18246. + * phys
  18247. + * d0000000 on-chip peripheral registers
  18248. + * e0000000 PCIe 0 Memory space
  18249. + * e8000000 PCIe 1 Memory space
  18250. + * f0000000 PCIe 0 I/O space
  18251. + * f0100000 PCIe 1 I/O space
  18252. + *
  18253. + * virt phys size
  18254. + * fed00000 d0000000 1M on-chip peripheral registers
  18255. + * fee00000 f0000000 64K PCIe 0 I/O space
  18256. + * fef00000 f0100000 64K PCIe 1 I/O space
  18257. + */
  18258. +
  18259. +#define LOKI_REGS_PHYS_BASE 0xd0000000
  18260. +#define LOKI_REGS_VIRT_BASE 0xfed00000
  18261. +#define LOKI_REGS_SIZE SZ_1M
  18262. +
  18263. +#define LOKI_PCIE0_IO_PHYS_BASE 0xf0000000
  18264. +#define LOKI_PCIE0_IO_VIRT_BASE 0xfee00000
  18265. +#define LOKI_PCIE0_IO_BUS_BASE 0x00000000
  18266. +#define LOKI_PCIE0_IO_SIZE SZ_64K
  18267. +
  18268. +#define LOKI_PCIE1_IO_PHYS_BASE 0xf0100000
  18269. +#define LOKI_PCIE1_IO_VIRT_BASE 0xfef00000
  18270. +#define LOKI_PCIE1_IO_BUS_BASE 0x00000000
  18271. +#define LOKI_PCIE1_IO_SIZE SZ_64K
  18272. +
  18273. +#define LOKI_PCIE0_MEM_PHYS_BASE 0xe0000000
  18274. +#define LOKI_PCIE0_MEM_SIZE SZ_128M
  18275. +
  18276. +#define LOKI_PCIE1_MEM_PHYS_BASE 0xe8000000
  18277. +#define LOKI_PCIE1_MEM_SIZE SZ_128M
  18278. +
  18279. +/*
  18280. + * Register Map
  18281. + */
  18282. +#define DEV_BUS_PHYS_BASE (LOKI_REGS_PHYS_BASE | 0x10000)
  18283. +#define DEV_BUS_VIRT_BASE (LOKI_REGS_VIRT_BASE | 0x10000)
  18284. +#define UART0_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x2000)
  18285. +#define UART0_VIRT_BASE (DEV_BUS_VIRT_BASE | 0x2000)
  18286. +#define UART1_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x2100)
  18287. +#define UART1_VIRT_BASE (DEV_BUS_VIRT_BASE | 0x2100)
  18288. +
  18289. +#define BRIDGE_VIRT_BASE (LOKI_REGS_VIRT_BASE | 0x20000)
  18290. +#define BRIDGE_REG(x) (BRIDGE_VIRT_BASE | (x))
  18291. +#define RSTOUTn_MASK (BRIDGE_VIRT_BASE | 0x0108)
  18292. +#define SOFT_RESET_OUT_EN 0x00000004
  18293. +#define SYSTEM_SOFT_RESET (BRIDGE_VIRT_BASE | 0x010c)
  18294. +#define SOFT_RESET 0x00000001
  18295. +#define BRIDGE_CAUSE (BRIDGE_VIRT_BASE | 0x0110)
  18296. +#define BRIDGE_MASK (BRIDGE_VIRT_BASE | 0x0114)
  18297. +#define BRIDGE_INT_TIMER0 0x0002
  18298. +#define BRIDGE_INT_TIMER1 0x0004
  18299. +#define BRIDGE_INT_TIMER1_CLR 0x0004
  18300. +#define IRQ_VIRT_BASE (BRIDGE_VIRT_BASE | 0x0200)
  18301. +#define IRQ_CAUSE_OFF 0x0000
  18302. +#define IRQ_MASK_OFF 0x0004
  18303. +#define TIMER_VIRT_BASE (BRIDGE_VIRT_BASE | 0x0300)
  18304. +
  18305. +#define PCIE0_VIRT_BASE (LOKI_REGS_VIRT_BASE | 0x30000)
  18306. +
  18307. +#define PCIE1_VIRT_BASE (LOKI_REGS_VIRT_BASE | 0x40000)
  18308. +
  18309. +#define SAS0_PHYS_BASE (LOKI_REGS_PHYS_BASE | 0x80000)
  18310. +
  18311. +#define SAS1_PHYS_BASE (LOKI_REGS_PHYS_BASE | 0x90000)
  18312. +
  18313. +#define GE0_PHYS_BASE (LOKI_REGS_PHYS_BASE | 0xa0000)
  18314. +#define GE0_VIRT_BASE (LOKI_REGS_VIRT_BASE | 0xa0000)
  18315. +
  18316. +#define GE1_PHYS_BASE (LOKI_REGS_PHYS_BASE | 0xb0000)
  18317. +#define GE1_VIRT_BASE (LOKI_REGS_VIRT_BASE | 0xb0000)
  18318. +
  18319. +#define DDR_VIRT_BASE (LOKI_REGS_VIRT_BASE | 0xf0000)
  18320. +#define DDR_REG(x) (DDR_VIRT_BASE | (x))
  18321. +
  18322. +
  18323. +#define GPIO_MAX 8
  18324. +
  18325. +
  18326. +#endif
  18327. --- /dev/null
  18328. +++ b/include/asm-arm/arch-loki/memory.h
  18329. @@ -0,0 +1,14 @@
  18330. +/*
  18331. + * include/asm-arm/arch-loki/memory.h
  18332. + */
  18333. +
  18334. +#ifndef __ASM_ARCH_MEMORY_H
  18335. +#define __ASM_ARCH_MEMORY_H
  18336. +
  18337. +#define PHYS_OFFSET UL(0x00000000)
  18338. +
  18339. +#define __virt_to_bus(x) __virt_to_phys(x)
  18340. +#define __bus_to_virt(x) __phys_to_virt(x)
  18341. +
  18342. +
  18343. +#endif
  18344. --- /dev/null
  18345. +++ b/include/asm-arm/arch-loki/system.h
  18346. @@ -0,0 +1,37 @@
  18347. +/*
  18348. + * include/asm-arm/arch-loki/system.h
  18349. + *
  18350. + * This file is licensed under the terms of the GNU General Public
  18351. + * License version 2. This program is licensed "as is" without any
  18352. + * warranty of any kind, whether express or implied.
  18353. + */
  18354. +
  18355. +#ifndef __ASM_ARCH_SYSTEM_H
  18356. +#define __ASM_ARCH_SYSTEM_H
  18357. +
  18358. +#include <asm/arch/hardware.h>
  18359. +#include <asm/arch/loki.h>
  18360. +
  18361. +static inline void arch_idle(void)
  18362. +{
  18363. + cpu_do_idle();
  18364. +}
  18365. +
  18366. +static inline void arch_reset(char mode)
  18367. +{
  18368. + /*
  18369. + * Enable soft reset to assert RSTOUTn.
  18370. + */
  18371. + writel(SOFT_RESET_OUT_EN, RSTOUTn_MASK);
  18372. +
  18373. + /*
  18374. + * Assert soft reset.
  18375. + */
  18376. + writel(SOFT_RESET, SYSTEM_SOFT_RESET);
  18377. +
  18378. + while (1)
  18379. + ;
  18380. +}
  18381. +
  18382. +
  18383. +#endif
  18384. --- /dev/null
  18385. +++ b/include/asm-arm/arch-loki/timex.h
  18386. @@ -0,0 +1,11 @@
  18387. +/*
  18388. + * include/asm-arm/arch-loki/timex.h
  18389. + *
  18390. + * This file is licensed under the terms of the GNU General Public
  18391. + * License version 2. This program is licensed "as is" without any
  18392. + * warranty of any kind, whether express or implied.
  18393. + */
  18394. +
  18395. +#define CLOCK_TICK_RATE (100 * HZ)
  18396. +
  18397. +#define LOKI_TCLK 180000000
  18398. --- /dev/null
  18399. +++ b/include/asm-arm/arch-loki/uncompress.h
  18400. @@ -0,0 +1,47 @@
  18401. +/*
  18402. + * include/asm-arm/arch-loki/uncompress.h
  18403. + *
  18404. + * This file is licensed under the terms of the GNU General Public
  18405. + * License version 2. This program is licensed "as is" without any
  18406. + * warranty of any kind, whether express or implied.
  18407. + */
  18408. +
  18409. +#include <linux/serial_reg.h>
  18410. +#include <asm/arch/loki.h>
  18411. +
  18412. +#define SERIAL_BASE ((unsigned char *)UART0_PHYS_BASE)
  18413. +
  18414. +static void putc(const char c)
  18415. +{
  18416. + unsigned char *base = SERIAL_BASE;
  18417. + int i;
  18418. +
  18419. + for (i = 0; i < 0x1000; i++) {
  18420. + if (base[UART_LSR << 2] & UART_LSR_THRE)
  18421. + break;
  18422. + barrier();
  18423. + }
  18424. +
  18425. + base[UART_TX << 2] = c;
  18426. +}
  18427. +
  18428. +static void flush(void)
  18429. +{
  18430. + unsigned char *base = SERIAL_BASE;
  18431. + unsigned char mask;
  18432. + int i;
  18433. +
  18434. + mask = UART_LSR_TEMT | UART_LSR_THRE;
  18435. +
  18436. + for (i = 0; i < 0x1000; i++) {
  18437. + if ((base[UART_LSR << 2] & mask) == mask)
  18438. + break;
  18439. + barrier();
  18440. + }
  18441. +}
  18442. +
  18443. +/*
  18444. + * nothing to do
  18445. + */
  18446. +#define arch_decomp_setup()
  18447. +#define arch_decomp_wdog()
  18448. --- /dev/null
  18449. +++ b/include/asm-arm/arch-loki/vmalloc.h
  18450. @@ -0,0 +1,5 @@
  18451. +/*
  18452. + * include/asm-arm/arch-loki/vmalloc.h
  18453. + */
  18454. +
  18455. +#define VMALLOC_END 0xfe800000
  18456. --- /dev/null
  18457. +++ b/include/asm-arm/arch-mv78xx0/debug-macro.S
  18458. @@ -0,0 +1,20 @@
  18459. +/*
  18460. + * include/asm-arm/arch-mv78xx0/debug-macro.S
  18461. + *
  18462. + * This program is free software; you can redistribute it and/or modify
  18463. + * it under the terms of the GNU General Public License version 2 as
  18464. + * published by the Free Software Foundation.
  18465. +*/
  18466. +
  18467. +#include <asm/arch/mv78xx0.h>
  18468. +
  18469. + .macro addruart,rx
  18470. + mrc p15, 0, \rx, c1, c0
  18471. + tst \rx, #1 @ MMU enabled?
  18472. + ldreq \rx, =MV78XX0_REGS_PHYS_BASE
  18473. + ldrne \rx, =MV78XX0_REGS_VIRT_BASE
  18474. + orr \rx, \rx, #0x00012000
  18475. + .endm
  18476. +
  18477. +#define UART_SHIFT 2
  18478. +#include <asm/hardware/debug-8250.S>
  18479. --- /dev/null
  18480. +++ b/include/asm-arm/arch-mv78xx0/dma.h
  18481. @@ -0,0 +1 @@
  18482. +/* empty */
  18483. --- /dev/null
  18484. +++ b/include/asm-arm/arch-mv78xx0/entry-macro.S
  18485. @@ -0,0 +1,39 @@
  18486. +/*
  18487. + * include/asm-arm/arch-mv78xx0/entry-macro.S
  18488. + *
  18489. + * Low-level IRQ helper macros for Marvell MV78xx0 platforms
  18490. + *
  18491. + * This file is licensed under the terms of the GNU General Public
  18492. + * License version 2. This program is licensed "as is" without any
  18493. + * warranty of any kind, whether express or implied.
  18494. + */
  18495. +
  18496. +#include <asm/arch/mv78xx0.h>
  18497. +
  18498. + .macro disable_fiq
  18499. + .endm
  18500. +
  18501. + .macro arch_ret_to_user, tmp1, tmp2
  18502. + .endm
  18503. +
  18504. + .macro get_irqnr_preamble, base, tmp
  18505. + ldr \base, =IRQ_VIRT_BASE
  18506. + .endm
  18507. +
  18508. + .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
  18509. + @ check low interrupts
  18510. + ldr \irqstat, [\base, #IRQ_CAUSE_LOW_OFF]
  18511. + ldr \tmp, [\base, #IRQ_MASK_LOW_OFF]
  18512. + mov \irqnr, #31
  18513. + ands \irqstat, \irqstat, \tmp
  18514. +
  18515. + @ if no low interrupts set, check high interrupts
  18516. + ldreq \irqstat, [\base, #IRQ_CAUSE_HIGH_OFF]
  18517. + ldreq \tmp, [\base, #IRQ_MASK_HIGH_OFF]
  18518. + moveq \irqnr, #63
  18519. + andeqs \irqstat, \irqstat, \tmp
  18520. +
  18521. + @ find first active interrupt source
  18522. + clzne \irqstat, \irqstat
  18523. + subne \irqnr, \irqnr, \irqstat
  18524. + .endm
  18525. --- /dev/null
  18526. +++ b/include/asm-arm/arch-mv78xx0/hardware.h
  18527. @@ -0,0 +1,21 @@
  18528. +/*
  18529. + * include/asm-arm/arch-mv78xx0/hardware.h
  18530. + *
  18531. + * This file is licensed under the terms of the GNU General Public
  18532. + * License version 2. This program is licensed "as is" without any
  18533. + * warranty of any kind, whether express or implied.
  18534. + */
  18535. +
  18536. +#ifndef __ASM_ARCH_HARDWARE_H
  18537. +#define __ASM_ARCH_HARDWARE_H
  18538. +
  18539. +#include "mv78xx0.h"
  18540. +
  18541. +#define pcibios_assign_all_busses() 1
  18542. +
  18543. +#define PCIBIOS_MIN_IO 0x00001000
  18544. +#define PCIBIOS_MIN_MEM 0x01000000
  18545. +#define PCIMEM_BASE MV78XX0_PCIE_MEM_PHYS_BASE /* mem base for VGA */
  18546. +
  18547. +
  18548. +#endif
  18549. --- /dev/null
  18550. +++ b/include/asm-arm/arch-mv78xx0/io.h
  18551. @@ -0,0 +1,26 @@
  18552. +/*
  18553. + * include/asm-arm/arch-mv78xx0/io.h
  18554. + *
  18555. + * This file is licensed under the terms of the GNU General Public
  18556. + * License version 2. This program is licensed "as is" without any
  18557. + * warranty of any kind, whether express or implied.
  18558. + */
  18559. +
  18560. +#ifndef __ASM_ARCH_IO_H
  18561. +#define __ASM_ARCH_IO_H
  18562. +
  18563. +#include "mv78xx0.h"
  18564. +
  18565. +#define IO_SPACE_LIMIT 0xffffffff
  18566. +
  18567. +static inline void __iomem *__io(unsigned long addr)
  18568. +{
  18569. + return (void __iomem *)((addr - MV78XX0_PCIE_IO_PHYS_BASE(0))
  18570. + + MV78XX0_PCIE_IO_VIRT_BASE(0));
  18571. +}
  18572. +
  18573. +#define __io(a) __io(a)
  18574. +#define __mem_pci(a) (a)
  18575. +
  18576. +
  18577. +#endif
  18578. --- /dev/null
  18579. +++ b/include/asm-arm/arch-mv78xx0/irqs.h
  18580. @@ -0,0 +1,91 @@
  18581. +/*
  18582. + * include/asm-arm/arch-mv78xx0/irqs.h
  18583. + *
  18584. + * IRQ definitions for Marvell MV78xx0 SoCs
  18585. + *
  18586. + * This file is licensed under the terms of the GNU General Public
  18587. + * License version 2. This program is licensed "as is" without any
  18588. + * warranty of any kind, whether express or implied.
  18589. + */
  18590. +
  18591. +#ifndef __ASM_ARCH_IRQS_H
  18592. +#define __ASM_ARCH_IRQS_H
  18593. +
  18594. +#include "mv78xx0.h" /* need GPIO_MAX */
  18595. +
  18596. +/*
  18597. + * MV78xx0 Low Interrupt Controller
  18598. + */
  18599. +#define IRQ_MV78XX0_ERR 0
  18600. +#define IRQ_MV78XX0_SPI 1
  18601. +#define IRQ_MV78XX0_I2C_0 2
  18602. +#define IRQ_MV78XX0_I2C_1 3
  18603. +#define IRQ_MV78XX0_IDMA_0 4
  18604. +#define IRQ_MV78XX0_IDMA_1 5
  18605. +#define IRQ_MV78XX0_IDMA_2 6
  18606. +#define IRQ_MV78XX0_IDMA_3 7
  18607. +#define IRQ_MV78XX0_TIMER_0 8
  18608. +#define IRQ_MV78XX0_TIMER_1 9
  18609. +#define IRQ_MV78XX0_TIMER_2 10
  18610. +#define IRQ_MV78XX0_TIMER_3 11
  18611. +#define IRQ_MV78XX0_UART_0 12
  18612. +#define IRQ_MV78XX0_UART_1 13
  18613. +#define IRQ_MV78XX0_UART_2 14
  18614. +#define IRQ_MV78XX0_UART_3 15
  18615. +#define IRQ_MV78XX0_USB_0 16
  18616. +#define IRQ_MV78XX0_USB_1 17
  18617. +#define IRQ_MV78XX0_USB_2 18
  18618. +#define IRQ_MV78XX0_CRYPTO 19
  18619. +#define IRQ_MV78XX0_SDIO_0 20
  18620. +#define IRQ_MV78XX0_SDIO_1 21
  18621. +#define IRQ_MV78XX0_XOR_0 22
  18622. +#define IRQ_MV78XX0_XOR_1 23
  18623. +#define IRQ_MV78XX0_I2S_0 24
  18624. +#define IRQ_MV78XX0_I2S_1 25
  18625. +#define IRQ_MV78XX0_SATA 26
  18626. +#define IRQ_MV78XX0_TDMI 27
  18627. +
  18628. +/*
  18629. + * MV78xx0 High Interrupt Controller
  18630. + */
  18631. +#define IRQ_MV78XX0_PCIE_00 32
  18632. +#define IRQ_MV78XX0_PCIE_01 33
  18633. +#define IRQ_MV78XX0_PCIE_02 34
  18634. +#define IRQ_MV78XX0_PCIE_03 35
  18635. +#define IRQ_MV78XX0_PCIE_10 36
  18636. +#define IRQ_MV78XX0_PCIE_11 37
  18637. +#define IRQ_MV78XX0_PCIE_12 38
  18638. +#define IRQ_MV78XX0_PCIE_13 39
  18639. +#define IRQ_MV78XX0_GE00_SUM 40
  18640. +#define IRQ_MV78XX0_GE00_RX 41
  18641. +#define IRQ_MV78XX0_GE00_TX 42
  18642. +#define IRQ_MV78XX0_GE00_MISC 43
  18643. +#define IRQ_MV78XX0_GE01_SUM 44
  18644. +#define IRQ_MV78XX0_GE01_RX 45
  18645. +#define IRQ_MV78XX0_GE01_TX 46
  18646. +#define IRQ_MV78XX0_GE01_MISC 47
  18647. +#define IRQ_MV78XX0_GE10_SUM 48
  18648. +#define IRQ_MV78XX0_GE10_RX 49
  18649. +#define IRQ_MV78XX0_GE10_TX 50
  18650. +#define IRQ_MV78XX0_GE10_MISC 51
  18651. +#define IRQ_MV78XX0_GE11_SUM 52
  18652. +#define IRQ_MV78XX0_GE11_RX 53
  18653. +#define IRQ_MV78XX0_GE11_TX 54
  18654. +#define IRQ_MV78XX0_GE11_MISC 55
  18655. +#define IRQ_MV78XX0_GPIO_0_7 56
  18656. +#define IRQ_MV78XX0_GPIO_8_15 57
  18657. +#define IRQ_MV78XX0_GPIO_16_23 58
  18658. +#define IRQ_MV78XX0_GPIO_24_31 59
  18659. +#define IRQ_MV78XX0_DB_IN 60
  18660. +#define IRQ_MV78XX0_DB_OUT 61
  18661. +
  18662. +/*
  18663. + * MV78XX0 General Purpose Pins
  18664. + */
  18665. +#define IRQ_MV78XX0_GPIO_START 64
  18666. +#define NR_GPIO_IRQS GPIO_MAX
  18667. +
  18668. +#define NR_IRQS (IRQ_MV78XX0_GPIO_START + NR_GPIO_IRQS)
  18669. +
  18670. +
  18671. +#endif
  18672. --- /dev/null
  18673. +++ b/include/asm-arm/arch-mv78xx0/memory.h
  18674. @@ -0,0 +1,14 @@
  18675. +/*
  18676. + * include/asm-arm/arch-mv78xx0/memory.h
  18677. + */
  18678. +
  18679. +#ifndef __ASM_ARCH_MEMORY_H
  18680. +#define __ASM_ARCH_MEMORY_H
  18681. +
  18682. +#define PHYS_OFFSET UL(0x00000000)
  18683. +
  18684. +#define __virt_to_bus(x) __virt_to_phys(x)
  18685. +#define __bus_to_virt(x) __phys_to_virt(x)
  18686. +
  18687. +
  18688. +#endif
  18689. --- /dev/null
  18690. +++ b/include/asm-arm/arch-mv78xx0/mv78xx0.h
  18691. @@ -0,0 +1,126 @@
  18692. +/*
  18693. + * include/asm-arm/arch-mv78xx0/mv78xx0.h
  18694. + *
  18695. + * Generic definitions for Marvell MV78xx0 SoC flavors:
  18696. + * MV781x0 and MV782x0.
  18697. + *
  18698. + * This file is licensed under the terms of the GNU General Public
  18699. + * License version 2. This program is licensed "as is" without any
  18700. + * warranty of any kind, whether express or implied.
  18701. + */
  18702. +
  18703. +#ifndef __ASM_ARCH_MV78XX0_H
  18704. +#define __ASM_ARCH_MV78XX0_H
  18705. +
  18706. +/*
  18707. + * Marvell MV78xx0 address maps.
  18708. + *
  18709. + * phys
  18710. + * c0000000 PCIe Memory space
  18711. + * f0800000 PCIe #0 I/O space
  18712. + * f0900000 PCIe #1 I/O space
  18713. + * f0a00000 PCIe #2 I/O space
  18714. + * f0b00000 PCIe #3 I/O space
  18715. + * f0c00000 PCIe #4 I/O space
  18716. + * f0d00000 PCIe #5 I/O space
  18717. + * f0e00000 PCIe #6 I/O space
  18718. + * f0f00000 PCIe #7 I/O space
  18719. + * f1000000 on-chip peripheral registers
  18720. + *
  18721. + * virt phys size
  18722. + * fe400000 f102x000 16K core-specific peripheral registers
  18723. + * fe700000 f0800000 1M PCIe #0 I/O space
  18724. + * fe800000 f0900000 1M PCIe #1 I/O space
  18725. + * fe900000 f0a00000 1M PCIe #2 I/O space
  18726. + * fea00000 f0b00000 1M PCIe #3 I/O space
  18727. + * feb00000 f0c00000 1M PCIe #4 I/O space
  18728. + * fec00000 f0d00000 1M PCIe #5 I/O space
  18729. + * fed00000 f0e00000 1M PCIe #6 I/O space
  18730. + * fee00000 f0f00000 1M PCIe #7 I/O space
  18731. + * fef00000 f1000000 1M on-chip peripheral registers
  18732. + */
  18733. +#define MV78XX0_CORE0_REGS_PHYS_BASE 0xf1020000
  18734. +#define MV78XX0_CORE1_REGS_PHYS_BASE 0xf1024000
  18735. +#define MV78XX0_CORE_REGS_VIRT_BASE 0xfe400000
  18736. +#define MV78XX0_CORE_REGS_SIZE SZ_16K
  18737. +
  18738. +#define MV78XX0_PCIE_IO_PHYS_BASE(i) (0xf0800000 + ((i) << 20))
  18739. +#define MV78XX0_PCIE_IO_VIRT_BASE(i) (0xfe700000 + ((i) << 20))
  18740. +#define MV78XX0_PCIE_IO_SIZE SZ_1M
  18741. +
  18742. +#define MV78XX0_REGS_PHYS_BASE 0xf1000000
  18743. +#define MV78XX0_REGS_VIRT_BASE 0xfef00000
  18744. +#define MV78XX0_REGS_SIZE SZ_1M
  18745. +
  18746. +#define MV78XX0_PCIE_MEM_PHYS_BASE 0xc0000000
  18747. +#define MV78XX0_PCIE_MEM_SIZE 0x30000000
  18748. +
  18749. +/*
  18750. + * Core-specific peripheral registers.
  18751. + */
  18752. +#define BRIDGE_VIRT_BASE (MV78XX0_CORE_REGS_VIRT_BASE)
  18753. +#define CPU_CONTROL (BRIDGE_VIRT_BASE | 0x0104)
  18754. +#define L2_WRITETHROUGH 0x00020000
  18755. +#define RSTOUTn_MASK (BRIDGE_VIRT_BASE | 0x0108)
  18756. +#define SOFT_RESET_OUT_EN 0x00000004
  18757. +#define SYSTEM_SOFT_RESET (BRIDGE_VIRT_BASE | 0x010c)
  18758. +#define SOFT_RESET 0x00000001
  18759. +#define BRIDGE_CAUSE (BRIDGE_VIRT_BASE | 0x0110)
  18760. +#define BRIDGE_MASK (BRIDGE_VIRT_BASE | 0x0114)
  18761. +#define BRIDGE_INT_TIMER0 0x0002
  18762. +#define BRIDGE_INT_TIMER1 0x0004
  18763. +#define BRIDGE_INT_TIMER1_CLR (~0x0004)
  18764. +#define IRQ_VIRT_BASE (BRIDGE_VIRT_BASE | 0x0200)
  18765. +#define IRQ_CAUSE_LOW_OFF 0x0004
  18766. +#define IRQ_CAUSE_HIGH_OFF 0x0008
  18767. +#define IRQ_MASK_LOW_OFF 0x0010
  18768. +#define IRQ_MASK_HIGH_OFF 0x0014
  18769. +#define TIMER_VIRT_BASE (BRIDGE_VIRT_BASE | 0x0300)
  18770. +
  18771. +/*
  18772. + * Register Map
  18773. + */
  18774. +#define DDR_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x00000)
  18775. +#define DDR_WINDOW_CPU0_BASE (DDR_VIRT_BASE | 0x1500)
  18776. +#define DDR_WINDOW_CPU1_BASE (DDR_VIRT_BASE | 0x1700)
  18777. +
  18778. +#define DEV_BUS_PHYS_BASE (MV78XX0_REGS_PHYS_BASE | 0x10000)
  18779. +#define DEV_BUS_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x10000)
  18780. +#define SAMPLE_AT_RESET_LOW (DEV_BUS_VIRT_BASE | 0x0030)
  18781. +#define SAMPLE_AT_RESET_HIGH (DEV_BUS_VIRT_BASE | 0x0034)
  18782. +#define UART0_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x2000)
  18783. +#define UART0_VIRT_BASE (DEV_BUS_VIRT_BASE | 0x2000)
  18784. +#define UART1_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x2100)
  18785. +#define UART1_VIRT_BASE (DEV_BUS_VIRT_BASE | 0x2100)
  18786. +#define UART2_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x2200)
  18787. +#define UART2_VIRT_BASE (DEV_BUS_VIRT_BASE | 0x2200)
  18788. +#define UART3_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x2300)
  18789. +#define UART3_VIRT_BASE (DEV_BUS_VIRT_BASE | 0x2300)
  18790. +
  18791. +#define GE10_PHYS_BASE (MV78XX0_REGS_PHYS_BASE | 0x30000)
  18792. +#define GE11_PHYS_BASE (MV78XX0_REGS_PHYS_BASE | 0x34000)
  18793. +
  18794. +#define PCIE00_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x40000)
  18795. +#define PCIE01_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x44000)
  18796. +#define PCIE02_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x48000)
  18797. +#define PCIE03_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x4c000)
  18798. +
  18799. +#define USB0_PHYS_BASE (MV78XX0_REGS_PHYS_BASE | 0x50000)
  18800. +#define USB1_PHYS_BASE (MV78XX0_REGS_PHYS_BASE | 0x51000)
  18801. +#define USB2_PHYS_BASE (MV78XX0_REGS_PHYS_BASE | 0x52000)
  18802. +
  18803. +#define GE00_PHYS_BASE (MV78XX0_REGS_PHYS_BASE | 0x70000)
  18804. +#define GE01_PHYS_BASE (MV78XX0_REGS_PHYS_BASE | 0x74000)
  18805. +
  18806. +#define PCIE10_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x80000)
  18807. +#define PCIE11_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x84000)
  18808. +#define PCIE12_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x88000)
  18809. +#define PCIE13_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x8c000)
  18810. +
  18811. +#define SATA_PHYS_BASE (MV78XX0_REGS_PHYS_BASE | 0xa0000)
  18812. +
  18813. +
  18814. +#define GPIO_MAX 32
  18815. +
  18816. +
  18817. +#endif
  18818. --- /dev/null
  18819. +++ b/include/asm-arm/arch-mv78xx0/system.h
  18820. @@ -0,0 +1,37 @@
  18821. +/*
  18822. + * include/asm-arm/arch-mv78xx0/system.h
  18823. + *
  18824. + * This file is licensed under the terms of the GNU General Public
  18825. + * License version 2. This program is licensed "as is" without any
  18826. + * warranty of any kind, whether express or implied.
  18827. + */
  18828. +
  18829. +#ifndef __ASM_ARCH_SYSTEM_H
  18830. +#define __ASM_ARCH_SYSTEM_H
  18831. +
  18832. +#include <asm/arch/hardware.h>
  18833. +#include <asm/arch/mv78xx0.h>
  18834. +
  18835. +static inline void arch_idle(void)
  18836. +{
  18837. + cpu_do_idle();
  18838. +}
  18839. +
  18840. +static inline void arch_reset(char mode)
  18841. +{
  18842. + /*
  18843. + * Enable soft reset to assert RSTOUTn.
  18844. + */
  18845. + writel(SOFT_RESET_OUT_EN, RSTOUTn_MASK);
  18846. +
  18847. + /*
  18848. + * Assert soft reset.
  18849. + */
  18850. + writel(SOFT_RESET, SYSTEM_SOFT_RESET);
  18851. +
  18852. + while (1)
  18853. + ;
  18854. +}
  18855. +
  18856. +
  18857. +#endif
  18858. --- /dev/null
  18859. +++ b/include/asm-arm/arch-mv78xx0/timex.h
  18860. @@ -0,0 +1,9 @@
  18861. +/*
  18862. + * include/asm-arm/arch-mv78xx0/timex.h
  18863. + *
  18864. + * This file is licensed under the terms of the GNU General Public
  18865. + * License version 2. This program is licensed "as is" without any
  18866. + * warranty of any kind, whether express or implied.
  18867. + */
  18868. +
  18869. +#define CLOCK_TICK_RATE (100 * HZ)
  18870. --- /dev/null
  18871. +++ b/include/asm-arm/arch-mv78xx0/uncompress.h
  18872. @@ -0,0 +1,47 @@
  18873. +/*
  18874. + * include/asm-arm/arch-mv78xx0/uncompress.h
  18875. + *
  18876. + * This file is licensed under the terms of the GNU General Public
  18877. + * License version 2. This program is licensed "as is" without any
  18878. + * warranty of any kind, whether express or implied.
  18879. + */
  18880. +
  18881. +#include <linux/serial_reg.h>
  18882. +#include <asm/arch/mv78xx0.h>
  18883. +
  18884. +#define SERIAL_BASE ((unsigned char *)UART0_PHYS_BASE)
  18885. +
  18886. +static void putc(const char c)
  18887. +{
  18888. + unsigned char *base = SERIAL_BASE;
  18889. + int i;
  18890. +
  18891. + for (i = 0; i < 0x1000; i++) {
  18892. + if (base[UART_LSR << 2] & UART_LSR_THRE)
  18893. + break;
  18894. + barrier();
  18895. + }
  18896. +
  18897. + base[UART_TX << 2] = c;
  18898. +}
  18899. +
  18900. +static void flush(void)
  18901. +{
  18902. + unsigned char *base = SERIAL_BASE;
  18903. + unsigned char mask;
  18904. + int i;
  18905. +
  18906. + mask = UART_LSR_TEMT | UART_LSR_THRE;
  18907. +
  18908. + for (i = 0; i < 0x1000; i++) {
  18909. + if ((base[UART_LSR << 2] & mask) == mask)
  18910. + break;
  18911. + barrier();
  18912. + }
  18913. +}
  18914. +
  18915. +/*
  18916. + * nothing to do
  18917. + */
  18918. +#define arch_decomp_setup()
  18919. +#define arch_decomp_wdog()
  18920. --- /dev/null
  18921. +++ b/include/asm-arm/arch-mv78xx0/vmalloc.h
  18922. @@ -0,0 +1,5 @@
  18923. +/*
  18924. + * include/asm-arm/arch-mv78xx0/vmalloc.h
  18925. + */
  18926. +
  18927. +#define VMALLOC_END 0xfe000000
  18928. --- a/include/asm-arm/arch-orion5x/io.h
  18929. +++ b/include/asm-arm/arch-orion5x/io.h
  18930. @@ -14,7 +14,6 @@
  18931. #include "orion5x.h"
  18932. #define IO_SPACE_LIMIT 0xffffffff
  18933. -#define IO_SPACE_REMAP ORION5X_PCI_SYS_IO_BASE
  18934. static inline void __iomem *
  18935. __arch_ioremap(unsigned long paddr, size_t size, unsigned int mtype)
  18936. @@ -53,15 +52,12 @@
  18937. /*****************************************************************************
  18938. * Helpers to access Orion registers
  18939. ****************************************************************************/
  18940. -#define orion5x_read(r) __raw_readl(r)
  18941. -#define orion5x_write(r, val) __raw_writel(val, r)
  18942. -
  18943. /*
  18944. * These are not preempt-safe. Locks, if needed, must be taken
  18945. * care of by the caller.
  18946. */
  18947. -#define orion5x_setbits(r, mask) orion5x_write((r), orion5x_read(r) | (mask))
  18948. -#define orion5x_clrbits(r, mask) orion5x_write((r), orion5x_read(r) & ~(mask))
  18949. +#define orion5x_setbits(r, mask) writel(readl(r) | (mask), (r))
  18950. +#define orion5x_clrbits(r, mask) writel(readl(r) & ~(mask), (r))
  18951. #endif
  18952. --- a/include/asm-arm/arch-orion5x/orion5x.h
  18953. +++ b/include/asm-arm/arch-orion5x/orion5x.h
  18954. @@ -2,7 +2,7 @@
  18955. * include/asm-arm/arch-orion5x/orion5x.h
  18956. *
  18957. * Generic definitions of Orion SoC flavors:
  18958. - * Orion-1, Orion-NAS, Orion-VoIP, and Orion-2.
  18959. + * Orion-1, Orion-VoIP, Orion-NAS, and Orion-2.
  18960. *
  18961. * Maintainer: Tzachi Perelstein <[email protected]>
  18962. *
  18963. @@ -63,9 +63,11 @@
  18964. /*******************************************************************************
  18965. * Supported Devices & Revisions
  18966. ******************************************************************************/
  18967. -/* Orion-1 (88F5181) */
  18968. +/* Orion-1 (88F5181) and Orion-VoIP (88F5181L) */
  18969. #define MV88F5181_DEV_ID 0x5181
  18970. #define MV88F5181_REV_B1 3
  18971. +#define MV88F5181L_REV_A0 8
  18972. +#define MV88F5181L_REV_A1 9
  18973. /* Orion-NAS (88F5182) */
  18974. #define MV88F5182_DEV_ID 0x5182
  18975. #define MV88F5182_REV_A2 2
  18976. @@ -152,6 +154,7 @@
  18977. #define BRIDGE_MASK ORION5X_BRIDGE_REG(0x114)
  18978. #define BRIDGE_INT_TIMER0 0x0002
  18979. #define BRIDGE_INT_TIMER1 0x0004
  18980. +#define BRIDGE_INT_TIMER1_CLR (~0x0004)
  18981. #define MAIN_IRQ_CAUSE ORION5X_BRIDGE_REG(0x200)
  18982. #define MAIN_IRQ_MASK ORION5X_BRIDGE_REG(0x204)
  18983. --- a/include/asm-arm/arch-orion5x/uncompress.h
  18984. +++ b/include/asm-arm/arch-orion5x/uncompress.h
  18985. @@ -8,23 +8,38 @@
  18986. * warranty of any kind, whether express or implied.
  18987. */
  18988. +#include <linux/serial_reg.h>
  18989. #include <asm/arch/orion5x.h>
  18990. -#define MV_UART_THR ((volatile unsigned char *)(UART0_PHYS_BASE + 0x0))
  18991. -#define MV_UART_LSR ((volatile unsigned char *)(UART0_PHYS_BASE + 0x14))
  18992. -
  18993. -#define LSR_THRE 0x20
  18994. +#define SERIAL_BASE ((unsigned char *)UART0_PHYS_BASE)
  18995. static void putc(const char c)
  18996. {
  18997. - int j = 0x1000;
  18998. - while (--j && !(*MV_UART_LSR & LSR_THRE))
  18999. + unsigned char *base = SERIAL_BASE;
  19000. + int i;
  19001. +
  19002. + for (i = 0; i < 0x1000; i++) {
  19003. + if (base[UART_LSR << 2] & UART_LSR_THRE)
  19004. + break;
  19005. barrier();
  19006. - *MV_UART_THR = c;
  19007. + }
  19008. +
  19009. + base[UART_TX << 2] = c;
  19010. }
  19011. static void flush(void)
  19012. {
  19013. + unsigned char *base = SERIAL_BASE;
  19014. + unsigned char mask;
  19015. + int i;
  19016. +
  19017. + mask = UART_LSR_TEMT | UART_LSR_THRE;
  19018. +
  19019. + for (i = 0; i < 0x1000; i++) {
  19020. + if ((base[UART_LSR << 2] & mask) == mask)
  19021. + break;
  19022. + barrier();
  19023. + }
  19024. }
  19025. /*
  19026. --- a/include/asm-arm/assembler.h
  19027. +++ b/include/asm-arm/assembler.h
  19028. @@ -56,6 +56,21 @@
  19029. #endif
  19030. /*
  19031. + * This can be used to enable code to cacheline align the destination
  19032. + * pointer when bulk writing to memory. Experiments on StrongARM and
  19033. + * XScale didn't show this a worthwhile thing to do when the cache is not
  19034. + * set to write-allocate (this would need further testing on XScale when WA
  19035. + * is used).
  19036. + *
  19037. + * On Feroceon there is much to gain however, regardless of cache mode.
  19038. + */
  19039. +#ifdef CONFIG_CPU_FEROCEON
  19040. +#define CALGN(code...) code
  19041. +#else
  19042. +#define CALGN(code...)
  19043. +#endif
  19044. +
  19045. +/*
  19046. * Enable and disable interrupts
  19047. */
  19048. #if __LINUX_ARM_ARCH__ >= 6
  19049. --- a/include/asm-arm/cacheflush.h
  19050. +++ b/include/asm-arm/cacheflush.h
  19051. @@ -95,11 +95,7 @@
  19052. #endif
  19053. #if defined(CONFIG_CPU_FEROCEON)
  19054. -# ifdef _CACHE
  19055. -# define MULTI_CACHE 1
  19056. -# else
  19057. -# define _CACHE feroceon
  19058. -# endif
  19059. +# define MULTI_CACHE 1
  19060. #endif
  19061. #if defined(CONFIG_CPU_V6)
  19062. --- /dev/null
  19063. +++ b/include/asm-arm/plat-orion/cache-feroceon-l2.h
  19064. @@ -0,0 +1,11 @@
  19065. +/*
  19066. + * include/asm-arm/plat-orion/cache-feroceon-l2.h
  19067. + *
  19068. + * Copyright (C) 2008 Marvell Semiconductor
  19069. + *
  19070. + * This file is licensed under the terms of the GNU General Public
  19071. + * License version 2. This program is licensed "as is" without any
  19072. + * warranty of any kind, whether express or implied.
  19073. + */
  19074. +
  19075. +extern void __init feroceon_l2_init(int l2_wt_override);
  19076. --- a/include/asm-arm/plat-orion/pcie.h
  19077. +++ b/include/asm-arm/plat-orion/pcie.h
  19078. @@ -14,6 +14,7 @@
  19079. u32 orion_pcie_dev_id(void __iomem *base);
  19080. u32 orion_pcie_rev(void __iomem *base);
  19081. int orion_pcie_link_up(void __iomem *base);
  19082. +int orion_pcie_x4_mode(void __iomem *base);
  19083. int orion_pcie_get_local_bus_nr(void __iomem *base);
  19084. void orion_pcie_set_local_bus_nr(void __iomem *base, int nr);
  19085. void orion_pcie_setup(void __iomem *base,
  19086. --- a/include/asm-arm/tlbflush.h
  19087. +++ b/include/asm-arm/tlbflush.h
  19088. @@ -39,6 +39,7 @@
  19089. #define TLB_V6_D_ASID (1 << 17)
  19090. #define TLB_V6_I_ASID (1 << 18)
  19091. +#define TLB_L2CLEAN_FR (1 << 29) /* Feroceon */
  19092. #define TLB_DCLEAN (1 << 30)
  19093. #define TLB_WB (1 << 31)
  19094. @@ -51,6 +52,7 @@
  19095. * v4 - ARMv4 without write buffer
  19096. * v4wb - ARMv4 with write buffer without I TLB flush entry instruction
  19097. * v4wbi - ARMv4 with write buffer with I TLB flush entry instruction
  19098. + * fr - Feroceon (v4wbi with non-outer-cacheable page table walks)
  19099. * v6wbi - ARMv6 with write buffer with I TLB flush entry instruction
  19100. */
  19101. #undef _TLB
  19102. @@ -103,6 +105,23 @@
  19103. # define v4wbi_always_flags (-1UL)
  19104. #endif
  19105. +#define fr_tlb_flags (TLB_WB | TLB_DCLEAN | TLB_L2CLEAN_FR | \
  19106. + TLB_V4_I_FULL | TLB_V4_D_FULL | \
  19107. + TLB_V4_I_PAGE | TLB_V4_D_PAGE)
  19108. +
  19109. +#ifdef CONFIG_CPU_TLB_FEROCEON
  19110. +# define fr_possible_flags fr_tlb_flags
  19111. +# define fr_always_flags fr_tlb_flags
  19112. +# ifdef _TLB
  19113. +# define MULTI_TLB 1
  19114. +# else
  19115. +# define _TLB v4wbi
  19116. +# endif
  19117. +#else
  19118. +# define fr_possible_flags 0
  19119. +# define fr_always_flags (-1UL)
  19120. +#endif
  19121. +
  19122. #define v4wb_tlb_flags (TLB_WB | TLB_DCLEAN | \
  19123. TLB_V4_I_FULL | TLB_V4_D_FULL | \
  19124. TLB_V4_D_PAGE)
  19125. @@ -245,12 +264,14 @@
  19126. #define possible_tlb_flags (v3_possible_flags | \
  19127. v4_possible_flags | \
  19128. v4wbi_possible_flags | \
  19129. + fr_possible_flags | \
  19130. v4wb_possible_flags | \
  19131. v6wbi_possible_flags)
  19132. #define always_tlb_flags (v3_always_flags & \
  19133. v4_always_flags & \
  19134. v4wbi_always_flags & \
  19135. + fr_always_flags & \
  19136. v4wb_always_flags & \
  19137. v6wbi_always_flags)
  19138. @@ -417,6 +438,11 @@
  19139. if (tlb_flag(TLB_DCLEAN))
  19140. asm("mcr p15, 0, %0, c7, c10, 1 @ flush_pmd"
  19141. : : "r" (pmd) : "cc");
  19142. +
  19143. + if (tlb_flag(TLB_L2CLEAN_FR))
  19144. + asm("mcr p15, 1, %0, c15, c9, 1 @ L2 flush_pmd"
  19145. + : : "r" (pmd) : "cc");
  19146. +
  19147. if (tlb_flag(TLB_WB))
  19148. dsb();
  19149. }
  19150. @@ -428,6 +454,10 @@
  19151. if (tlb_flag(TLB_DCLEAN))
  19152. asm("mcr p15, 0, %0, c7, c10, 1 @ flush_pmd"
  19153. : : "r" (pmd) : "cc");
  19154. +
  19155. + if (tlb_flag(TLB_L2CLEAN_FR))
  19156. + asm("mcr p15, 1, %0, c15, c9, 1 @ L2 flush_pmd"
  19157. + : : "r" (pmd) : "cc");
  19158. }
  19159. #undef tlb_flag
  19160. --- a/include/linux/mv643xx_eth.h
  19161. +++ b/include/linux/mv643xx_eth.h
  19162. @@ -17,30 +17,59 @@
  19163. struct mv643xx_eth_shared_platform_data {
  19164. struct mbus_dram_target_info *dram;
  19165. - unsigned int t_clk;
  19166. + unsigned int t_clk;
  19167. };
  19168. struct mv643xx_eth_platform_data {
  19169. + /*
  19170. + * Pointer back to our parent instance, and our port number.
  19171. + */
  19172. struct platform_device *shared;
  19173. - int port_number;
  19174. + int port_number;
  19175. + /*
  19176. + * Whether a PHY is present, and if yes, at which address.
  19177. + */
  19178. struct platform_device *shared_smi;
  19179. + int force_phy_addr;
  19180. + int phy_addr;
  19181. - u16 force_phy_addr; /* force override if phy_addr == 0 */
  19182. - u16 phy_addr;
  19183. -
  19184. - /* If speed is 0, then speed and duplex are autonegotiated. */
  19185. - int speed; /* 0, SPEED_10, SPEED_100, SPEED_1000 */
  19186. - int duplex; /* DUPLEX_HALF or DUPLEX_FULL */
  19187. -
  19188. - /* non-zero values of the following fields override defaults */
  19189. - u32 tx_queue_size;
  19190. - u32 rx_queue_size;
  19191. - u32 tx_sram_addr;
  19192. - u32 tx_sram_size;
  19193. - u32 rx_sram_addr;
  19194. - u32 rx_sram_size;
  19195. - u8 mac_addr[6]; /* mac address if non-zero*/
  19196. + /*
  19197. + * Use this MAC address if it is valid, overriding the
  19198. + * address that is already in the hardware.
  19199. + */
  19200. + u8 mac_addr[6];
  19201. +
  19202. + /*
  19203. + * If speed is 0, autonegotiation is enabled.
  19204. + * Valid values for speed: 0, SPEED_10, SPEED_100, SPEED_1000.
  19205. + * Valid values for duplex: DUPLEX_HALF, DUPLEX_FULL.
  19206. + */
  19207. + int speed;
  19208. + int duplex;
  19209. +
  19210. + /*
  19211. + * Which RX/TX queues to use.
  19212. + */
  19213. + int rx_queue_mask;
  19214. + int tx_queue_mask;
  19215. +
  19216. + /*
  19217. + * Override default RX/TX queue sizes if nonzero.
  19218. + */
  19219. + int rx_queue_size;
  19220. + int tx_queue_size;
  19221. +
  19222. + /*
  19223. + * Use on-chip SRAM for RX/TX descriptors if size is nonzero
  19224. + * and sufficient to contain all descriptors for the requested
  19225. + * ring sizes.
  19226. + */
  19227. + unsigned long rx_sram_addr;
  19228. + int rx_sram_size;
  19229. + unsigned long tx_sram_addr;
  19230. + int tx_sram_size;
  19231. };
  19232. -#endif /* __LINUX_MV643XX_ETH_H */
  19233. +
  19234. +#endif