S3C6410时钟初始化
voidsystemclockinit(void){intcount1000;((volatileunsignedint)S3C6410OTHERSADDR)(16);sysclockselectincmuwhile(count);nop((volatileunsignedint)S3C6410OTHERSADDR)((17)(16));syncmodereqtoarm,0:asynchronousmode1:synchronousmodewhile(((((volatileunsignedint)S3C6410OTHERSADDR)0xF00)!0xF00));synchronousacknowledgewritel(0xffff,S3C6410APLLLOCK);controlplllockingperiodforapllwritel(0xffff,S3C6410MPLLLOCK);controlplllockingperiodformpllwritel(0xffff,S3C6410EPLLLOCK);controlplllockingperiodforepll((volatileunsignedint)S3C6410CLOCKDIV2)0xFFF0FFFF;((volatileunsignedint)S3C6410CLOCKDIV2)(0x316);uartclockpiderratio,clkuartclkuartin(uartratio1)0:3parmclockpiderratio4pmpllclockpiderratio8hclkclockpiderratio9:11hclkx2clockpiderratio12:15pclkclockpiderratio,whichmustbeoddvalue。inotherwords,s3c6410supportsonlyevenpiderratio((volatileunsignedint)S3C6410CLOCKDIV0)0xFFFC0000;((volatileunsignedint)S3C6410CLOCKDIV0)((0x312)(19)(18)(14)0);0:2sp,pllspidevalue8:13pp,pllppidevalue16:25pp,pllmpidevalue31:pllenablecontrol,0:disable1:enablefoutmpfin(12MHZ)(pp(1sp))writel(((131)(26616)(38)(10)),S3C6410APLLCON);writel(((131)(26616)(38)(10)),S3C6410MPLLCON);0:2sp,pllspidevalue0x38:13pp,pllppidevalue0x216:23mp,pllmpidevalue0x2031:pllenablecontrol,0:disable1:enablewritel(0x80200203,S3C6410EPLLCON0);0:15kp,pllkpidevaluefout(mpkp216)fin(pp2sp)24MHZwritel(0,S3C6410EPLLCON1);0controlmuxapll,0:finapll1:foutapll1controlmuxmpll,0:finmpll1:foutmpll2controlmuxepll,0:finepll1:foutepll13controluart0,whichisthesourceclockofuart,0:moutepll1:doutmpll((volatileunsignedint)(S3C6410CLOCKSRC))(0x2007);count0x10000;while(count);nop((volatileunsignedint)S3C6410OTHERSADDR)0xFFFFFFDF;}