Changeset 0d6849e7 in rtems


Ignore:
Timestamp:
Apr 10, 2003, 4:35:33 PM (17 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
2f73363
Parents:
48cdb95a
Message:

2003-04-10 Till Straumann <strauman@…>

PR 379/bsps

  • console/polled_io.c: libcpu provides 'printk' already. Therefore, the implementation in this file was removed (still used for the bootloader, though). It now provides BSP_output_char() for libcpu's printk().
  • console/uart.c, console/uart.h: BSP_output_char_via_serial() prototype changed to match the BSP_output_char_function_type. Note that the motorola BSPs use polled-io for the output_char routine, not the uart.c version. The latter can be used be other BSPs however (e.g. SVGM).
  • console/console.c, console/consoleIo.h, console/polled_io.c, irq/irq_init.c, openpic/openpic.c, pci/detect_raven_bridge.c: Unfortunately, the supported 'printk' format string subset of the polled-io and libcpu implementations are different - hence, a few format strings in the ppc/shared BSP were changed.
Location:
c/src/lib/libbsp/powerpc/shared
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/powerpc/shared/ChangeLog

    r48cdb95a r0d6849e7  
     12003-04-10  Till Straumann <strauman@slac.stanford.edu>
     2
     3        PR 379/bsps
     4        * console/polled_io.c: libcpu provides 'printk' already.
     5        Therefore, the implementation in this file was removed (still
     6        used for the bootloader, though).  It now provides BSP_output_char()
     7        for libcpu's printk().
     8        * console/uart.c, console/uart.h: BSP_output_char_via_serial()
     9        prototype changed to match the BSP_output_char_function_type.  Note
     10        that the motorola BSPs use polled-io for the output_char routine, not
     11        the uart.c version. The latter can be used be other BSPs however
     12        (e.g. SVGM).
     13        * console/console.c, console/consoleIo.h, console/polled_io.c,
     14        irq/irq_init.c, openpic/openpic.c, pci/detect_raven_bridge.c:
     15        Unfortunately, the supported 'printk' format string subset of the
     16        polled-io and libcpu implementations are different - hence, a few
     17        format strings in the ppc/shared BSP were changed.
     18
    1192003-04-10      Joel Sherrill <joel@OARcorp.com>
    220
  • c/src/lib/libbsp/powerpc/shared/console/console.c

    r48cdb95a r0d6849e7  
    3535#include <termios.h>
    3636#include <bsp/uart.h>
    37 #include <bsp/consoleIo.h>
    3837#include <rtems/bspIo.h>        /* printk */
    3938
     
    121120          if ( RTEMS_SUCCESSFUL==status && BSPConsolePort == minor)
    122121                {
    123                   printk("Registering /dev/console as minor %i (==%s)\n",
     122                  printk("Registering /dev/console as minor %d (==%s)\n",
    124123                                                        minor,
    125124                                                        ttyS[minor].name);
  • c/src/lib/libbsp/powerpc/shared/console/consoleIo.h

    r48cdb95a r0d6849e7  
    3434/* extern int printk(const char *, ...) __attribute__((format(printf, 1, 2))); */
    3535extern void debug_putc(const unsigned char c);
     36extern void debug_putc_onlcr(const char c);
    3637extern int debug_getc(void);
    3738extern int debug_tstc(void);
  • c/src/lib/libbsp/powerpc/shared/console/polled_io.c

    r48cdb95a r0d6849e7  
    4444void * __palloc(u_long);
    4545void  pfree(void *);
    46 
     46#else
     47#include <rtems/bspIo.h>
    4748#endif
    4849
     
    5051typedef long long s64;
    5152typedef unsigned int u32;
     53
     54#ifndef __BOOT__
     55BSP_output_char_function_type   BSP_output_char = debug_putc_onlcr;
     56#endif
    5257
    5358#ifdef USE_KBD_SUPPORT
     
    431436}
    432437
     438/* const char arg to be compatible with BSP_output_char decl. */
     439void
     440debug_putc_onlcr(const char c)
     441{
     442        if ('\n'==c)
     443                debug_putc('\r');
     444        debug_putc(c);
     445}
     446
    433447int debug_getc(void)
    434448{
     
    440454  return curIo->tstc();
    441455}
    442 
    443 
    444456
    445457#define vidmem ((__io_ptr)(ptr_mem_map->isa_mem_base+0xb8000))
     
    529541
    530542        while ( ( c = *s++ ) != '\0' ) {
    531                 debug_putc(c);
    532                 if ( c == '\n' )
    533                         debug_putc('\r');
     543                                debug_putc_onlcr((const char)c);
    534544        }
    535545}
     
    876886
    877887
     888/* provide this for the bootloader only; otherwise
     889 * use libcpu implementation
     890 */
     891#if defined(__BOOT__)
    878892static int skip_atoi(const char **s)
    879893{
     
    903917        return  i;
    904918}
     919
     920#endif
    905921
    906922/* Necessary to avoid including a library, and GCC won't do this inline. */
     
    943959#define LLONG   128             /* 64 bit argument */
    944960
     961#if defined(__BOOT__)
    945962static char * number(char * str, int size, int type, u64 num)
    946963{
     
    11081125        return str-buf;
    11091126}
     1127#endif
  • c/src/lib/libbsp/powerpc/shared/console/uart.c

    r48cdb95a r0d6849e7  
    412412
    413413void
    414 BSP_output_char_via_serial(int val)
     414BSP_output_char_via_serial(const char val)
    415415{
    416416  BSP_uart_polled_write(BSPConsolePort, val);
  • c/src/lib/libbsp/powerpc/shared/console/uart.h

    r48cdb95a r0d6849e7  
    3636
    3737extern unsigned BSP_poll_char_via_serial(void);
    38 extern void BSP_output_char_via_serial(int val);
     38extern void BSP_output_char_via_serial(const char val);
    3939extern int BSPConsolePort;
    4040extern int BSPBaseBaud;
  • c/src/lib/libbsp/powerpc/shared/irq/irq_init.c

    r48cdb95a r0d6849e7  
    1919 */
    2020
    21 #include <bsp/consoleIo.h>
    2221#include <libcpu/io.h>
    2322#include <libcpu/spr.h>
  • c/src/lib/libbsp/powerpc/shared/openpic/openpic.c

    r48cdb95a r0d6849e7  
    2424#include <bsp/openpic.h>
    2525#include <bsp/pci.h>
    26 #include <bsp/consoleIo.h>
    2726#include <libcpu/io.h>
    2827#include <libcpu/byteorder.h>
     
    7069#define check_arg_irq(irq) \
    7170    if (irq < 0 || irq >= NumSources) \
    72         printk("openpic.c:%d: illegal irq %d from %p,[%p],[[%p]]\n", \
     71        printk("openpic.c:%d: illegal irq %d from 0x%08x,[0x%08x],[[0x%08x]]\n", \
    7372               __LINE__, irq, __builtin_return_address(0), \
    7473               __builtin_return_address(1), __builtin_return_address(2) \
     
    223222        }
    224223    }
    225     printk("OpenPIC Version %s (%d CPUs and %d IRQ sources) at %p\n", version,
     224    printk("OpenPIC Version %s (%d CPUs and %d IRQ sources) at 0x%08x\n", version,
    226225           NumProcessors, NumSources, OpenPIC);
    227226
  • c/src/lib/libbsp/powerpc/shared/pci/detect_raven_bridge.c

    r48cdb95a r0d6849e7  
    103103#endif   
    104104      OpenPIC=(volatile struct OpenPIC *) (tmp + PREP_ISA_MEM_BASE);
    105       printk("OpenPIC found at %p.\n",
     105      printk("OpenPIC found at %x.\n",
    106106             OpenPIC);
    107107    }
Note: See TracChangeset for help on using the changeset viewer.