<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>change log for rtems (2011-03-15)</title>
</head>
<body text='#000000' bgcolor='#ffffff'>
<a name='cs1'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
 <font color='#bb2222'><strong>joel</strong></font>
 <font color='#225522'><em>(on branch rtems-4-10-branch)</em></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2011-03-15 Till Straumann <strauman@slac.stanford.edu>

        * startup/bspstart.c: Fix clock code on qemu. Also ensure UART is
        initialized early for printk.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/m68k/uC5282/ChangeLog.diff?r1=text&tr1=1.120&r2=text&tr2=1.121&diff_format=h">M</a></td><td width='1%'>1.121</td><td width='100%'>c/src/lib/libbsp/m68k/uC5282/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/m68k/uC5282/ChangeLog.diff?r1=text&tr1=1.115.2.3&r2=text&tr2=1.115.2.4&diff_format=h">M</a></td><td width='1%'>1.115.2.4</td><td width='100%'>c/src/lib/libbsp/m68k/uC5282/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/m68k/uC5282/startup/bspstart.c.diff?r1=text&tr1=1.61&r2=text&tr2=1.62&diff_format=h">M</a></td><td width='1%'>1.62</td><td width='100%'>c/src/lib/libbsp/m68k/uC5282/startup/bspstart.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/m68k/uC5282/startup/bspstart.c.diff?r1=text&tr1=1.59.2.1&r2=text&tr2=1.59.2.2&diff_format=h">M</a></td><td width='1%'>1.59.2.2</td><td width='100%'>c/src/lib/libbsp/m68k/uC5282/startup/bspstart.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/c/src/lib/libbsp/m68k/uC5282/ChangeLog:1.120 rtems/c/src/lib/libbsp/m68k/uC5282/ChangeLog:1.121
--- rtems/c/src/lib/libbsp/m68k/uC5282/ChangeLog:1.120  Fri Mar  4 10:03:46 2011
+++ rtems/c/src/lib/libbsp/m68k/uC5282/ChangeLog        Tue Mar 15 16:34:44 2011
</font><font color='#997700'>@@ -1,3 +1,8 @@
</font><font color='#000088'>+2011-03-15    Till Straumann <strauman@slac.stanford.edu>
+
+       * startup/bspstart.c: Fix clock code on qemu. Also ensure UART is
+       initialized early for printk.
+
</font> 2011-03-04        Till Straumann <strauman@slac.stanford.edu>
 
        PR 1738/bsps

<font color='#006600'>diff -u rtems/c/src/lib/libbsp/m68k/uC5282/ChangeLog:1.115.2.3 rtems/c/src/lib/libbsp/m68k/uC5282/ChangeLog:1.115.2.4
--- rtems/c/src/lib/libbsp/m68k/uC5282/ChangeLog:1.115.2.3      Fri Mar  4 10:03:53 2011
+++ rtems/c/src/lib/libbsp/m68k/uC5282/ChangeLog        Tue Mar 15 16:34:55 2011
</font><font color='#997700'>@@ -1,3 +1,8 @@
</font><font color='#000088'>+2011-03-15    Till Straumann <strauman@slac.stanford.edu>
+
+       * startup/bspstart.c: Fix clock code on qemu. Also ensure UART is
+       initialized early for printk.
+
</font> 2011-03-04        Till Straumann <strauman@slac.stanford.edu>
 
        PR 1738/bsps

<font color='#006600'>diff -u rtems/c/src/lib/libbsp/m68k/uC5282/startup/bspstart.c:1.61 rtems/c/src/lib/libbsp/m68k/uC5282/startup/bspstart.c:1.62
--- rtems/c/src/lib/libbsp/m68k/uC5282/startup/bspstart.c:1.61  Thu Feb 17 07:25:10 2011
+++ rtems/c/src/lib/libbsp/m68k/uC5282/startup/bspstart.c       Tue Mar 15 16:34:44 2011
</font><font color='#997700'>@@ -244,6 +244,14 @@
</font>   int   i;
   const char *clk_speed_str;
   uint32_t clk_speed, mfd, rfd;
<font color='#000088'>+  uint8_t  byte;
+
+  /*
+   * Make sure UART TX is running - necessary for
+   * early printk to work. The firmware monitor
+   * usually enables this anyways but qemu doesn't!
+   */
+  MCF5282_UART_UCR(CONSOLE_PORT) = MCF5282_UART_UCR_TX_ENABLED;
</font> 
   /*
    * Set up default exception handler
<font color='#997700'>@@ -334,12 +342,19 @@
</font> 
   if ( 0 == clk_speed ) {
        printk("Using some heuristics to determine clock speed...\n");
<font color='#880000'>-   printk("Assuming %uHz PLL ref. clock\n", BSP_pll_ref_clock);
-       if ( 0xf8 != MCF5282_CLOCK_SYNSR ) {
-         printk("FATAL ERROR: Unexpected SYNSR contents, can't proceed\n");
-         bsp_sysReset(0);
</font><font color='#000088'>+      byte = MCF5282_CLOCK_SYNSR;
+       if ( 0 == byte ) {
+               printk("SYNSR == 0; assuming QEMU at 66MHz\n");
+               BSP_pll_ref_clock = 8250000;
+               mfd = ( 0 << 8 ) | ( 2 << 12 );
+       } else {
+               if ( 0xf8 != byte ) {
+                       printk("FATAL ERROR: Unexpected SYNSR contents (0x%02x), can't proceed\n", byte);
+                       bsp_sysReset(0);
+               }
+               mfd = MCF5282_CLOCK_SYNCR;
</font>   }
<font color='#880000'>-   mfd = MCF5282_CLOCK_SYNCR;
</font><font color='#000088'>+      printk("Assuming %uHz PLL ref. clock\n", BSP_pll_ref_clock);
</font>   rfd = (mfd >>  8) & 7;
        mfd = (mfd >> 12) & 7;
        /* Check against 'known' cases */

<font color='#006600'>diff -u rtems/c/src/lib/libbsp/m68k/uC5282/startup/bspstart.c:1.59.2.1 rtems/c/src/lib/libbsp/m68k/uC5282/startup/bspstart.c:1.59.2.2
--- rtems/c/src/lib/libbsp/m68k/uC5282/startup/bspstart.c:1.59.2.1      Thu Feb 17 07:25:24 2011
+++ rtems/c/src/lib/libbsp/m68k/uC5282/startup/bspstart.c       Tue Mar 15 16:34:56 2011
</font><font color='#997700'>@@ -244,6 +244,14 @@
</font>   int   i;
   const char *clk_speed_str;
   uint32_t clk_speed, mfd, rfd;
<font color='#000088'>+  uint8_t  byte;
+
+  /*
+   * Make sure UART TX is running - necessary for
+   * early printk to work. The firmware monitor
+   * usually enables this anyways but qemu doesn't!
+   */
+  MCF5282_UART_UCR(CONSOLE_PORT) = MCF5282_UART_UCR_TX_ENABLED;
</font> 
   /*
    * Set up default exception handler
<font color='#997700'>@@ -334,12 +342,19 @@
</font> 
   if ( 0 == clk_speed ) {
        printk("Using some heuristics to determine clock speed...\n");
<font color='#880000'>-   printk("Assuming %uHz PLL ref. clock\n", BSP_pll_ref_clock);
-       if ( 0xf8 != MCF5282_CLOCK_SYNSR ) {
-         printk("FATAL ERROR: Unexpected SYNSR contents, can't proceed\n");
-         bsp_sysReset(0);
</font><font color='#000088'>+      byte = MCF5282_CLOCK_SYNSR;
+       if ( 0 == byte ) {
+               printk("SYNSR == 0; assuming QEMU at 66MHz\n");
+               BSP_pll_ref_clock = 8250000;
+               mfd = ( 0 << 8 ) | ( 2 << 12 );
+       } else {
+               if ( 0xf8 != byte ) {
+                       printk("FATAL ERROR: Unexpected SYNSR contents (0x%02x), can't proceed\n", byte);
+                       bsp_sysReset(0);
+               }
+               mfd = MCF5282_CLOCK_SYNCR;
</font>   }
<font color='#880000'>-   mfd = MCF5282_CLOCK_SYNCR;
</font><font color='#000088'>+      printk("Assuming %uHz PLL ref. clock\n", BSP_pll_ref_clock);
</font>   rfd = (mfd >>  8) & 7;
        mfd = (mfd >> 12) & 7;
        /* Check against 'known' cases */
</pre>
<p> </p>

<p>--<br />
<small>Generated by <a href="http://www.codewiz.org/projects/index.html#loginfo">Deluxe Loginfo</a> 2.122 by Bernardo Innocenti <bernie@develer.com></small></p>
</body>
</html>