source: rtems/c/src/lib/libbsp/powerpc/ep1a/console/printk_support.c @ f68401e

4.115
Last change on this file since f68401e was 9b4422a2, checked in by Joel Sherrill <joel.sherrill@…>, on 05/03/12 at 15:09:24

Remove All CVS Id Strings Possible Using a Script

Script does what is expected and tries to do it as
smartly as possible.

+ remove occurrences of two blank comment lines

next to each other after Id string line removed.

+ remove entire comment blocks which only exited to

contain CVS Ids

+ If the processing left a blank line at the top of

a file, it was removed.

  • Property mode set to 100644
File size: 1.2 KB
Line 
1/*
2 *  This file contains the ep1a printk support routines
3 *
4 *  COPYRIGHT (c) 2011.
5 *  On-Line Applications Research Corporation (OAR).
6 *
7 *  The license and distribution terms for this file may be
8 *  found in the file LICENSE in this distribution or at
9 *  http://www.rtems.com/license/LICENSE.
10 */
11
12#include <bsp.h>
13#include <rtems/libio.h>
14#include <stdlib.h>
15#include <assert.h>
16#include <termios.h>
17#include <rtems/bspIo.h>
18
19rtems_device_minor_number         BSPPrintkPort = 0;
20
21/* const char arg to be compatible with BSP_output_char decl. */
22void
23debug_putc_onlcr(const char c)
24{
25  volatile int i;
26
27  /*
28   * Note:  Hack to get printk to work.  Depends upon bit
29   *        and silverchip to initialize the port and just
30   *        forces a character to be polled out of com1
31   *        regardless of where the console is.
32   */
33
34  volatile unsigned char *ptr = (void *)0xff800000;
35
36  if ('\n'==c){
37     *ptr = '\r';
38     __asm__ volatile("sync");
39     for (i=0;i<0x0fff;i++);
40  }
41
42  *ptr = c;
43  __asm__ volatile("sync");
44  for (i=0;i<0x0fff;i++);
45}
46
47BSP_output_char_function_type     BSP_output_char = debug_putc_onlcr;
48BSP_polling_getchar_function_type BSP_poll_char = NULL;
49
Note: See TracBrowser for help on using the repository browser.