<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Ok .<br>=============================================<br><span style="font-weight: bold;">Case arch = powerpc</span><br><br>I saw that <span style="font-weight: bold;">cdm</span> is modified in two fields.<br><br><span style="font-style: italic;">arch/powerpc/platforms/mpc52xx_common.c</span> file, in function: <span style="font-weight: bold;">mpc52xx_setup_cpu(void)</span><br>.....<br> /* Use internal 48 Mhz */<br> out_8(&cdm->ext_48mhz_en, 0x00);<br> out_8(&cdm->fd_enable, 0x01);<br> if (in_be32(&cdm->rstcfg) & 0x40) /* Assumes 33Mhz clock */<br> out_be16(&cdm->fd_counters, 0x0001);<br> else<br> out_be16(&cdm->fd_counters,
0x5555);<br>.....<br><br>and in file <span style="font-style: italic;">arch/powerpc/platforms/52xx/lite5200.c</span> , function:<br>void __init <span style="font-weight: bold;">lite5200_calibrate_decr(void)</span><br>{<br> ppc_tb_freq = 0x1F78A40; /* hardcoded default */<br> /* CPU FREQUENCY FORCED TO 396 MHz VALUE */<br> ppc_proc_freq = 0x179A7B00; /* hardcoded default */<br>..........<br><br>=============================================<br><span style="font-weight: bold;">Case arch = ppc</span><br><br>The code is equal but obviously the path change (<span style="font-style: italic;">arch/ppc/syslib/mpc52xx_setup.c</span>). Funtion: <span style="font-weight: bold;">mpc52xx_setup_cpu(void)</span><br>.....<br> /* Use internal 48 Mhz */<br> out_8(&cdm->ext_48mhz_en, 0x00);<br>
out_8(&cdm->fd_enable, 0x01);<br> if (in_be32(&cdm->rstcfg) & 0x40) /* Assumes 33Mhz clock */<br> out_be16(&cdm->fd_counters, 0x0001);<br> else<br> out_be16(&cdm->fd_counters, 0x5555);<br>.....<br>And in function: <span style="font-weight: bold;">mpc52xx_calibrate_decr(void)</span><br><br>.....<br> xlbfreq = __res.bi_busfreq;<br> /* if bootloader didn't pass bus frequencies, calculate them */<br> if (xlbfreq == 0) {<br> ...........<br> /* Compute all frequency from that & CDM settings */<br> xlbfreq = (tbl_end - tbl_start) << 8;<br> cpufreq = (xlbfreq *
core_mult[in_be32(&cdm->rstcfg)&0x1f])/10;<br> ipbfreq = (in_8(&cdm->ipb_clk_sel) & 1) ?<br> xlbfreq / 2 : xlbfreq;<br> switch (in_8(&cdm->pci_clk_sel) & 3) {<br> case 0:<br> pcifreq = ipbfreq;<br> break;<br> case 1:<br> pcifreq = ipbfreq / 2;<br> break;<br> default:<br> pcifreq = xlbfreq / 4;<br>
break;<br> }<br> .....<br>=============================================<br><br>What do you think about this?<br><br>Thanks in advance,<br>@ngel<br>--- <b>Ven 5/12/08, Jon Smirl <i><jonsmirl@gmail.com></i></b> ha scritto:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;">Da: Jon Smirl <jonsmirl@gmail.com><br>Oggetto: Re: R: Installation on a MPC5200 based custom board<br>A: "Juergen Beisert" <jbe@pengutronix.de><br>Cc: linuxppc-dev@ozlabs.org, s104259@yahoo.it, "Gary Thomas" <gary@mlbassoc.com>, gianfranco.casanova@alice.it<br>Data: Venerdì 5 dicembre 2008, 20:33<br><br><pre>The attachment is from Freescale and shows how the divider works.<br><br>-- <br>Jon Smirl<br>jonsmirl@gmail.com<br></pre></blockquote></td></tr></table><br>