Changeset 39a9f8e in rtems


Ignore:
Timestamp:
Dec 17, 2009, 8:42:17 AM (12 years ago)
Author:
Thomas Doerfler <Thomas.Doerfler@…>
Branches:
4.10, 4.11, 5, master
Children:
93d2801b
Parents:
dddcb78e
Message:

adapted to new prototype for *_write function

Location:
c/src/lib
Files:
54 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/m68k/av5282/ChangeLog

    rdddcb78e r39a9f8e  
     12009-12-16      Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
     2
     3        * console/console.c: adapted to new prototype for *_write
     4        function
     5
    162009-10-21      Ralf Corsépius <ralf.corsepius@rtems.org>
    27
  • c/src/lib/libbsp/m68k/av5282/console/console.c

    rdddcb78e r39a9f8e  
    2323                                 MCF5282_UART_USR_OE )
    2424
    25 static int IntUartPollWrite(int minor, const char *buf, int len);
    26 static int IntUartInterruptWrite (int minor, const char *buf, int len);
     25static ssize_t IntUartPollWrite(int minor, const char *buf, size_t len);
     26static ssize_t IntUartInterruptWrite (int minor, const char *buf, size_t len);
    2727
    2828static void
     
    391391   interrupts.
    392392 ***************************************************************************/
    393 static int
    394 IntUartInterruptWrite (int minor, const char *buf, int len)
     393static ssize_t
     394IntUartInterruptWrite (int minor, const char *buf, size_t len)
    395395{
    396396        int level;
     
    542542   transmitted.
    543543 ***************************************************************************/
    544 static int
    545 IntUartPollWrite (int minor, const char *buf, int len)
    546 {
     544static ssize_t
     545IntUartPollWrite (int minor, const char *buf, size_t len)
     546{
     547        size_t retval = len;
    547548        /* loop over buffer */
    548549        while ( len-- )
     
    554555                MCF5282_UART_UTB(minor) = *buf++;
    555556        }
    556         return(0);
     557        return retval;
    557558}
    558559
  • c/src/lib/libbsp/m68k/gen68340/ChangeLog

    rdddcb78e r39a9f8e  
     12009-12-16      Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
     2
     3        * console/console.c, console/m340uart.c, include/m340uart.h,
     4        timer/timer.c:
     5        adapted to new prototype for *_write function
     6
    172009-10-21      Ralf Corsépius <ralf.corsepius@rtems.org>
    28
  • c/src/lib/libbsp/m68k/gen68340/console/console.c

    rdddcb78e r39a9f8e  
    172172               or rtems_termios_enqueue_raw_characters
    173173 *****************************************************/
    174 static int
    175 InterruptWrite (int minor, const char *buf, int len)
     174static ssize_t
     175InterruptWrite (int minor, const char *buf, size_t len)
    176176{
    177177 if (minor==UART_CHANNEL_A) {
     
    297297           rtems_status_code sc;
    298298
    299            extern void _Debug_ISR_Handler_Console(void);
    300 
    301299           sc = rtems_interrupt_catch (InterruptHandler,
    302300                                       CONSOLE_VECTOR,
     
    382380           rtems_isr_entry old_handler;
    383381           rtems_status_code sc;
    384 
    385            extern void _Debug_ISR_Handler_Console(void);
    386382
    387383           sc = rtems_interrupt_catch (InterruptHandler,
  • c/src/lib/libbsp/m68k/gen68340/console/m340uart.c

    rdddcb78e r39a9f8e  
    267267  Description: polled write
    268268 *****************************************************/
    269 int dbugWrite (int minor, const char *buf, int len)
     269ssize_t dbugWrite (int minor, const char *buf, size_t len)
    270270{
    271271        static char txBuf;
     272        size_t retval = len;
    272273
    273274        while (len--) {
     
    275276                dbug_out_char( minor, (int)txBuf );
    276277        }
    277         return 0;
     278        return retval;
    278279}
    279280
  • c/src/lib/libbsp/m68k/gen68340/include/m340uart.h

    rdddcb78e r39a9f8e  
    8282
    8383extern int dbugRead (int minor);
    84 extern int dbugWrite (int minor, const char *buf, int len);
     84extern ssize_t dbugWrite (int minor, const char *buf, size_t len);
    8585
    8686extern float m340_Baud_Rates_Table[16][2];
  • c/src/lib/libbsp/m68k/gen68340/timer/timer.c

    rdddcb78e r39a9f8e  
    189189         rtems_status_code sc;
    190190
    191          extern void _Debug_ISR_Handler_Console(void);
    192 
    193191         sc = rtems_interrupt_catch (InterruptHandler,
    194192                                     TIMER1_VECTOR,
  • c/src/lib/libbsp/m68k/gen68360/ChangeLog

    rdddcb78e r39a9f8e  
     12009-12-16      Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
     2
     3        * console/console.c: adapted to new prototype for *_write
     4        function
     5
    162009-10-21      Ralf Corsépius <ralf.corsepius@rtems.org>
    27
     
    45502008-10-21      Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
    4651
    47                 * spi/mc68360_spidrv.h:
    48                 removed orphaned file
     52        * spi/mc68360_spidrv.h:
     53        removed orphaned file
    4954
    50552008-10-02      Ralf Corsépius <ralf.corsepius@rtems.org>
  • c/src/lib/libbsp/m68k/gen68360/console/console.c

    rdddcb78e r39a9f8e  
    232232 *      Transmit all characters.
    233233 */
    234 static int
    235 smc1InterruptWrite (int minor, const char *buf, int len)
     234static ssize_t
     235smc1InterruptWrite (int minor, const char *buf, size_t len)
    236236{
    237237        smcTxBd->buffer = (char *)buf;
     
    241241}
    242242
    243 static int
    244 smc1PollWrite (int minor, const char *buf, int len)
    245 {
     243static ssize_t
     244smc1PollWrite (int minor, const char *buf, size_t len)
     245{
     246        size_t retval = len;
    246247        while (len--) {
    247248                static char txBuf;
     
    253254                smcTxBd->status = M360_BD_READY | M360_BD_WRAP;
    254255        }
    255         return 0;
     256        return retval;
    256257}
    257258
  • c/src/lib/libbsp/m68k/genmcf548x/ChangeLog

    rdddcb78e r39a9f8e  
     12009-12-16      Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
     2
     3        * console/console.c: adapted to new prototype for *_write
     4        function
     5
    162009-12-14      Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
    27
  • c/src/lib/libbsp/m68k/genmcf548x/console/console.c

    rdddcb78e r39a9f8e  
    6969                           MCF548X_PSC_SR_OE )
    7070
    71 static int IntUartPollWrite(int minor, const char *buf, int len);
     71static ssize_t IntUartPollWrite(int minor, const char *buf, size_t len);
    7272static int IntUartPollRead (int minor);
    7373
     
    526526   interrupts.
    527527 ***************************************************************************/
    528 static int
    529 IntUartInterruptWrite (int minor, const char *buf, int len)
     528static ssize_t
     529IntUartInterruptWrite (int minor, const char *buf, size_t len)
    530530{
    531531        int level;
     
    675675   transmitted.
    676676 ***************************************************************************/
    677 static int
    678 IntUartPollWrite (int minor, const char *buf, int len)
    679 {
     677static ssize_t
     678IntUartPollWrite (int minor, const char *buf, size_t len)
     679{
     680        size_t retval = len;
    680681/* loop over buffer */
    681682        while ( len-- )
     
    687688                *((uint8_t *)&MCF548X_PSC_TB(minor)) = *buf++;
    688689        }
    689         return 0;
     690        return retval;
    690691}
    691692
  • c/src/lib/libbsp/m68k/idp/ChangeLog

    rdddcb78e r39a9f8e  
     12009-12-16      Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
     2
     3        * console/console.c: adapted to new prototype for *_write
     4        function
     5
    162009-10-21      Ralf Corsépius <ralf.corsepius@rtems.org>
    27
  • c/src/lib/libbsp/m68k/idp/console/console.c

    rdddcb78e r39a9f8e  
    136136)
    137137{
    138   unsigned char tmp_char;
     138  char tmp_char;
    139139
    140140  /* If you come into this routine without checking is_character_ready() first
  • c/src/lib/libbsp/m68k/mcf5206elite/ChangeLog

    rdddcb78e r39a9f8e  
     12009-12-16      Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
     2
     3        * console/console.c: adapted to new prototype for *_write
     4        function
     5
    162009-12-08      Ralf Corsépius <ralf.corsepius@rtems.org>
    27
  • c/src/lib/libbsp/m68k/mcf5206elite/console/console.c

    rdddcb78e r39a9f8e  
    6464 *     result code
    6565 */
    66 static int
    67 console_interrupt_write(int minor, const char *buf, int len)
     66static ssize_t
     67console_interrupt_write(int minor, const char *buf, size_t len)
    6868{
    6969    return mcfuart_interrupt_write(&uart[minor], buf, len);
     
    8181 *     result code
    8282 */
    83 static int
    84 console_poll_write(int minor, const char *buf, int len)
     83static ssize_t
     84console_poll_write(int minor, const char *buf, size_t len)
    8585{
    8686    return mcfuart_poll_write(&uart[minor], buf, len);
  • c/src/lib/libbsp/m68k/mcf52235/ChangeLog

    rdddcb78e r39a9f8e  
     12009-12-16      Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
     2
     3        * console/console.c: adapted to new prototype for *_write
     4        function
     5
    162009-10-21      Ralf Corsépius <ralf.corsepius@rtems.org>
    27
  • c/src/lib/libbsp/m68k/mcf52235/console/console.c

    rdddcb78e r39a9f8e  
    2323                             MCF_UART_USR_OE )
    2424
    25 static int IntUartPollWrite(int minor, const char *buf, int len);
    26 static int IntUartInterruptWrite(int minor, const char *buf, int len);
     25static ssize_t IntUartPollWrite(int minor, const char *buf, size_t len);
     26static ssize_t IntUartInterruptWrite(int minor, const char *buf, size_t len);
    2727
    2828#define MAX_UART_INFO     3
     
    340340   interrupts.
    341341 ***************************************************************************/
    342 static int IntUartInterruptWrite(int minor, const char *buf, int len)
     342static ssize_t IntUartInterruptWrite(int minor, const char *buf, size_t len)
    343343{
    344344  int level;
     
    473473   transmitted.
    474474 ***************************************************************************/
    475 static int IntUartPollWrite(int minor, const char *buf, int len)
    476 {
     475static ssize_t IntUartPollWrite(int minor, const char *buf, size_t len)
     476{
     477  size_t retval = len;
    477478  /* loop over buffer */
    478479  while (len--) {
     
    483484    MCF_UART_UTB(minor) = *buf++;
    484485  }
    485   return (0);
     486  return retval;
    486487}
    487488
  • c/src/lib/libbsp/m68k/mcf5235/ChangeLog

    rdddcb78e r39a9f8e  
     12009-12-16      Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
     2
     3        * console/console.c: adapted to new prototype for *_write
     4        function
     5
    162009-11-16      Alan Cudmore <alan.p.cudmore@nasa.gov>
    27
  • c/src/lib/libbsp/m68k/mcf5235/console/console.c

    rdddcb78e r39a9f8e  
    2323                                 MCF5235_UART_USR_OE )
    2424
    25 static int IntUartPollWrite(int minor, const char *buf, int len);
    26 static int IntUartInterruptWrite (int minor, const char *buf, int len);
     25static ssize_t IntUartPollWrite(int minor, const char *buf, size_t len);
     26static ssize_t IntUartInterruptWrite (int minor, const char *buf, size_t len);
    2727
    2828static void
     
    391391   interrupts.
    392392 ***************************************************************************/
    393 static int
    394 IntUartInterruptWrite (int minor, const char *buf, int len)
     393static ssize_t
     394IntUartInterruptWrite (int minor, const char *buf, size_t len)
    395395{
    396396        int level;
     
    542542   transmitted.
    543543 ***************************************************************************/
    544 static int
    545 IntUartPollWrite (int minor, const char *buf, int len)
    546 {
     544static ssize_t
     545IntUartPollWrite (int minor, const char *buf, size_t len)
     546{
     547        size_t retval = len;
    547548        /* loop over buffer */
    548549        while ( len-- )
     
    554555                MCF5235_UART_UTB(minor) = *buf++;
    555556        }
    556         return(0);
     557        return retval;
    557558}
    558559
  • c/src/lib/libbsp/m68k/mcf5329/ChangeLog

    rdddcb78e r39a9f8e  
     12009-12-16      Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
     2
     3        * console/console.c: adapted to new prototype for *_write
     4        function
     5
    162009-11-03      Ralf Corsépius <ralf.corsepius@rtems.org>
    27
  • c/src/lib/libbsp/m68k/mcf5329/console/console.c

    rdddcb78e r39a9f8e  
    2323                             MCF_UART_USR_OE )
    2424
    25 static int IntUartPollWrite(int minor, const char *buf, int len);
    26 static int IntUartInterruptWrite(int minor, const char *buf, int len);
     25static ssize_t IntUartPollWrite(int minor, const char *buf, size_t len);
     26static ssize_t IntUartInterruptWrite(int minor, const char *buf, size_t len);
    2727
    2828static void _BSP_null_char(char c)
     
    354354   interrupts.
    355355 ***************************************************************************/
    356 static int IntUartInterruptWrite(int minor, const char *buf, int len)
     356static ssize_t IntUartInterruptWrite(int minor, const char *buf, size_t len)
    357357{
    358358  int level;
     
    487487   transmitted.
    488488 ***************************************************************************/
    489 static int IntUartPollWrite(int minor, const char *buf, int len)
    490 {
     489static ssize_t IntUartPollWrite(int minor, const char *buf, size_t len)
     490{
     491  size_t retval = len;
    491492  /* loop over buffer */
    492493  while (len--) {
     
    497498    MCF_UART_UTB(minor) = *buf++;
    498499  }
    499   return (0);
     500  return retval;
    500501}
    501502
  • c/src/lib/libbsp/m68k/mrm332/ChangeLog

    rdddcb78e r39a9f8e  
     12009-12-16      Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
     2
     3        * console/sci.c: adapted to new prototype for *_write
     4        function
     5
    162009-10-21      Ralf Corsépius <ralf.corsepius@rtems.org>
    27
  • c/src/lib/libbsp/m68k/mrm332/console/sci.c

    rdddcb78e r39a9f8e  
    155155    rtems_device_major_number, rtems_device_minor_number, void *);
    156156
    157 int   SciInterruptOpen(int, int, void *);               /* termios api */
    158 int   SciInterruptClose(int, int, void *);              /* termios api */
    159 int   SciInterruptWrite(int, const char *, int);        /* termios api */
    160 
    161 int   SciSetAttributes(int, const struct termios*);     /* termios api */
    162 int   SciPolledOpen(int, int, void *);                  /* termios api */
    163 int   SciPolledClose(int, int, void *);                 /* termios api */
    164 int   SciPolledRead(int);                               /* termios api */
    165 int   SciPolledWrite(int, const char *, int);           /* termios api */
     157int     SciInterruptOpen(int, int, void *);               /* termios api */
     158int     SciInterruptClose(int, int, void *);              /* termios api */
     159ssize_t SciInterruptWrite(int, const char *, size_t);     /* termios api */
     160
     161int     SciSetAttributes(int, const struct termios*);     /* termios api */
     162int     SciPolledOpen(int, int, void *);                  /* termios api */
     163int     SciPolledClose(int, int, void *);                 /* termios api */
     164int     SciPolledRead(int);                               /* termios api */
     165ssize_t SciPolledWrite(int, const char *, size_t);        /* termios api */
    166166
    167167static void SciSetBaud(uint32_t   rate);                /* hardware routine */
     
    616616****************************************************************************/
    617617
    618 int   SciInterruptWrite(
     618ssize_t   SciInterruptWrite(
    619619    int         minor,
    620620    const char *buf,
    621     int         len
     621    size_t      len
    622622)
    623623{
     
    627627    if ( !len )                                 /* no data? */
    628628    {
    629         return 0;                               /* return error */
     629        return -1;                              /* return error */
    630630    }
    631631
    632632    if ( minor != SCI_MINOR )                   /* check the minor dev num */
    633633    {
    634         return 0;                               /* return error */
     634        return -1;                              /* return error */
    635635    }
    636636
    637637    if ( SciOpened == DRIVER_OPENED )           /* is the driver api open? */
    638638    {
    639         return 1;                               /* yep, throw this away */
     639        return -1;                              /* yep, throw this away */
    640640    }
    641641
     
    646646    SciEnableTransmitInterrupts();              /* enable the tx interrupt */
    647647
    648     return 1;                                   /* return success */
     648    return 0;                                   /* return success */
    649649}
    650650
     
    861861****************************************************************************/
    862862
    863 int  SciPolledWrite(
     863ssize_t SciPolledWrite(
    864864    int         minor,
    865865    const char *buf,
    866     int         len
     866    size_t      len
    867867)
    868868{
    869     int32_t  written = 0;
     869    ssize_t written = 0;
    870870
    871871    if ( minor != SCI_MINOR )                   /* check minor device num */
  • c/src/lib/libbsp/m68k/mvme162/console/console.c

    rdddcb78e r39a9f8e  
    127127char inbyte(int port)
    128128{
    129   unsigned char tmp_char;
     129  char tmp_char;
    130130
    131131  while ( !char_ready(port, &tmp_char) );
  • c/src/lib/libbsp/m68k/mvme167/ChangeLog

    rdddcb78e r39a9f8e  
     12009-12-16      Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
     2
     3        * console/console.c: adapted to new prototype for *_write
     4        function
     5
    162009-12-08      Eric Norum <wenorum@lbl.gov>
    27
  • c/src/lib/libbsp/m68k/mvme167/console/console.c

    rdddcb78e r39a9f8e  
    154154int cd2401_startRemoteTx( int minor );
    155155int cd2401_stopRemoteTx( int minor );
    156 int cd2401_write( int minor, const char *buf, int len );
     156ssize_t cd2401_write( int minor, const char *buf, size_t len );
    157157int cd2401_drainOutput( int minor );
    158158int _167Bug_pollRead( int minor );
    159 int _167Bug_pollWrite( int minor, const char *buf, int len );
     159ssize_t _167Bug_pollWrite( int minor, const char *buf, size_t len );
    160160
    161161/* Printk function */
     
    11351135 *  cd2401_tx_isr().
    11361136 */
    1137 int cd2401_write(
     1137ssize_t cd2401_write(
    11381138  int minor,
    11391139  const char *buf,
    1140   int len
     1140  size_t len
    11411141)
    11421142{
     
    11741174
    11751175  /* Return something */
    1176   return RTEMS_SUCCESSFUL;
     1176  return len;
    11771177}
    11781178
     
    12881288 *  CANNOT BE COMBINED WITH INTERRUPT DRIVEN I/O!
    12891289 */
    1290 int _167Bug_pollWrite(
     1290ssize_t _167Bug_pollWrite(
    12911291  int minor,
    12921292  const char *buf,
    1293   int len
     1293  size_t len
    12941294)
    12951295{
     
    13051305
    13061306  /* Return something */
    1307   return RTEMS_SUCCESSFUL;
     1307  return len;
    13081308}
    13091309
  • c/src/lib/libbsp/m68k/uC5282/ChangeLog

    rdddcb78e r39a9f8e  
     12009-12-16      Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
     2
     3        * console/console.c: adapted to new prototype for *_write
     4        function
     5
    162009-11-03      Ralf Corsépius <ralf.corsepius@rtems.org>
    27
  • c/src/lib/libbsp/m68k/uC5282/console/console.c

    rdddcb78e r39a9f8e  
    3333                                 MCF5282_UART_USR_OE )
    3434
    35 static int IntUartPollWrite(int minor, const char *buf, int len);
    36 static int IntUartInterruptWrite (int minor, const char *buf, int len);
     35static ssize_t IntUartPollWrite(int minor, const char *buf, size_t len);
     36static ssize_t IntUartInterruptWrite (int minor, const char *buf, size_t len);
    3737
    3838static void
     
    407407   interrupts.
    408408 ***************************************************************************/
    409 static int
    410 IntUartInterruptWrite (int minor, const char *buf, int len)
     409static ssize_t
     410IntUartInterruptWrite (int minor, const char *buf, size_t len)
    411411{
    412412        int level;
     
    422422
    423423        rtems_interrupt_enable(level);
    424         return( 0 );
     424        return 0;
    425425}
    426426
     
    448448                break;
    449449        case 2:
    450                 MCF5282_GPIO_PASPAR = MCF5282_GPIO_PASPAR
    451              & ~(MCF5282_GPIO_PASPAR_PASPA3(3)|MCF5282_GPIO_PASPAR_PASPA2(3))
    452              |  (MCF5282_GPIO_PASPAR_PASPA3(2)|MCF5282_GPIO_PASPAR_PASPA2(2));
     450                MCF5282_GPIO_PASPAR =
     451                  (MCF5282_GPIO_PASPAR
     452                   & ~(MCF5282_GPIO_PASPAR_PASPA3(3)|MCF5282_GPIO_PASPAR_PASPA2(3)))
     453                  |  (MCF5282_GPIO_PASPAR_PASPA3(2)|MCF5282_GPIO_PASPAR_PASPA2(2));
    453454                break;
    454455        }
     
    577578   transmitted.
    578579 ***************************************************************************/
    579 static int
    580 IntUartPollWrite (int minor, const char *buf, int len)
    581 {
     580static ssize_t
     581IntUartPollWrite (int minor, const char *buf, size_t len)
     582{
     583        size_t retval = len;
    582584        /* loop over buffer */
    583585        while ( len-- )
     
    589591                MCF5282_UART_UTB(minor) = *buf++;
    590592        }
    591         return(0);
     593        return retval;
    592594}
    593595
  • c/src/lib/libbsp/powerpc/ChangeLog

    rdddcb78e r39a9f8e  
     12009-12-16      Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
     2
     3        * shared/console/uart.c, shared/console/uart.h: adapted to new
     4        prototype for *_write function
     5
    162009-12-11      Ralf Corsépius <ralf.corsepius@rtems.org>
    27
  • c/src/lib/libbsp/powerpc/ep1a/ChangeLog

    rdddcb78e r39a9f8e  
     12009-12-16      Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
     2
     3        * console/console.c: adapted to new prototype for *_write
     4        function
     5
    162009-10-22      Sebastian Huber <sebastian.huber@embedded-brains.de>
    27
  • c/src/lib/libbsp/powerpc/ep1a/console/mc68360_scc.c

    rdddcb78e r39a9f8e  
    860860 */
    861861
    862 int mc68360_scc_write_support_polled(
     862ssize_t mc68360_scc_write_support_polled(
    863863  int         minor,
    864864  const char *buf,
    865   int         len
     865  size_t      len
    866866)
    867867{
    868868  printk("mc68360_scc_write_support_polled: minor %d char %c len %d\n",
    869869         minor, buf, len );
    870   return 0;
     870  return len;
    871871}
    872872
  • c/src/lib/libbsp/powerpc/gen5200/ChangeLog

    rdddcb78e r39a9f8e  
     12009-12-16      Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
     2
     3        * console/console.c: adapted to new prototype for *_write
     4        function
     5
    162009-11-04      Ralf Corsépius <ralf.corsepius@rtems.org>
    27
  • c/src/lib/libbsp/powerpc/gen5200/console/console.c

    rdddcb78e r39a9f8e  
    552552
    553553
    554 int mpc5200_uart_pollWrite(
     554ssize_t mpc5200_uart_pollWrite(
    555555  int minor,
    556556  const char *buf,
    557   int len
    558 )
    559 {
     557  size_t len
     558)
     559{
     560  size_t retval = len;
    560561  const char *tmp_buf = buf;
    561562  struct mpc5200_psc *psc =
     
    573574
    574575  }
    575   return 0;
    576 
    577 }
    578 
    579 
    580 int mpc5200_uart_write(
     576  return retval;
     577
     578}
     579
     580ssize_t mpc5200_uart_write(
    581581  int         minor,
    582582  const char *buf,
    583   int len
     583  size_t len
    584584)
    585585{
     
    649649  #if !defined(HAS_UBOOT)
    650650    if (console_initialized == false)
    651      return;
     651     return -1;
    652652  #endif
    653653
  • c/src/lib/libbsp/powerpc/haleakala/ChangeLog

    rdddcb78e r39a9f8e  
     12009-12-16      Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
     2
     3        * startup/bspstart.c: warning removal
     4
    152009-11-12      Ralf Corsépius <ralf.corsepius@rtems.org>
    26
  • c/src/lib/libbsp/powerpc/haleakala/startup/bspstart.c

    rdddcb78e r39a9f8e  
    7272#include <stdio.h>
    7373
     74LINKER_SYMBOL(intrStack_start);
     75LINKER_SYMBOL(intrStack_size);
    7476/*
    7577 *  Driver configuration parameters
     
    171173{
    172174  rtems_status_code sc = RTEMS_SUCCESSFUL;
    173   LINKER_SYMBOL(intrStack_start);
    174   LINKER_SYMBOL(intrStack_size);
    175175  ppc_cpu_id_t myCpu;
    176176  ppc_cpu_revision_t myCpuRevision;
  • c/src/lib/libbsp/powerpc/mbx8xx/ChangeLog

    rdddcb78e r39a9f8e  
     12009-12-16      Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
     2
     3        * console/console.c: adapted to new prototype for *_write
     4        function
     5
    162009-10-23      Sebastian Huber <sebastian.huber@embedded-brains.de>
    27
  • c/src/lib/libbsp/powerpc/mbx8xx/console/console.c

    rdddcb78e r39a9f8e  
    8484
    8585static int _EPPCBug_pollRead( int minor );
    86 static int _EPPCBug_pollWrite( int minor, const char *buf, int len );
     86static ssize_t _EPPCBug_pollWrite( int minor, const char *buf, size_t len );
    8787static void _BSP_output_char( char c );
    8888static rtems_status_code do_poll_read( rtems_device_major_number major, rtems_device_minor_number minor, void * arg);
     
    215215 *  Return value: IGNORED
    216216 */
    217 static int _EPPCBug_pollWrite(
     217static ssize_t _EPPCBug_pollWrite(
    218218  int minor,
    219219  const char *buf,
    220   int len
     220  size_t len
    221221)
    222222{
     
    224224
    225225  volatile int simask;
    226   int i, retval;
     226  int i;
    227227  ISR_Level level;
    228228
     
    249249    } u;
    250250  } volatile output_params;
    251 
    252   retval = -1;
    253251
    254252  input_params.clun = 0;
     
    316314  m8xx.simask = simask;
    317315  _ISR_Enable( level );
    318   return RTEMS_SUCCESSFUL;
     316  return len;
    319317
    320318error:
     
    423421#if NVRAM_CONFIGURE == 1
    424422
    425   int (*pollWrite)(int minor, const char *buf, int len);
     423  ssize_t (*pollWrite)(int minor, const char *buf, size_t len);
    426424
    427425  if ( (nvram->console_mode & 0x06) == 0x04 )
  • c/src/lib/libbsp/powerpc/score603e/ChangeLog

    rdddcb78e r39a9f8e  
     12009-12-16      Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
     2
     3        * console/console.c: adapted to new prototype for *_write
     4        function
     5
    162009-10-22      Sebastian Huber <sebastian.huber@embedded-brains.de>
    27
  • c/src/lib/libbsp/powerpc/score603e/console/console.c

    rdddcb78e r39a9f8e  
    255255 *
    256256 */
    257 int console_write_support(
     257ssize_t console_write_support(
    258258  int   minor,
    259259  const char *buf,
    260   int   len)
     260  size_t   len)
    261261{
    262262  int nwrite = 0;
  • c/src/lib/libbsp/powerpc/shared/console/uart.c

    rdddcb78e r39a9f8e  
    555555}
    556556
    557 int
    558 BSP_uart_termios_write_polled(int minor, const char *buf, int len)
     557ssize_t
     558BSP_uart_termios_write_polled(int minor, const char *buf, size_t len)
    559559{
    560560  int uart=minor;       /* could differ, theoretically */
     
    570570}
    571571
    572 int
    573 BSP_uart_termios_write_com(int minor, const char *buf, int len)
     572ssize_t
     573BSP_uart_termios_write_com(int minor, const char *buf, size_t len)
    574574{
    575575  int uart=minor;       /* could differ, theoretically */
  • c/src/lib/libbsp/powerpc/shared/console/uart.h

    rdddcb78e r39a9f8e  
    1616#include <rtems/libio.h>
    1717
    18 void BSP_uart_init(int uart, int baud, int hwFlow);
    19 void BSP_uart_set_baud(int uart, int baud);
    20 void BSP_uart_intr_ctrl(int uart, int cmd);
    21 void BSP_uart_throttle(int uart);
    22 void BSP_uart_unthrottle(int uart);
    23 int  BSP_uart_polled_status(int uart);
    24 void BSP_uart_polled_write(int uart, int val);
    25 int  BSP_uart_polled_read(int uart);
    26 void BSP_uart_termios_set(int uart, void *ttyp);
    27 int  BSP_uart_termios_write_com(int minor, const char *buf, int len);
    28 int  BSP_uart_termios_read_com (int minor);
    29 void BSP_uart_termios_isr_com1(void *unused);
    30 void BSP_uart_termios_isr_com2(void *unused);
    31 void BSP_uart_dbgisr_com1(void);
    32 void BSP_uart_dbgisr_com2(void);
    33 int  BSP_uart_install_isr(int uart, rtems_irq_hdl handler);
    34 int  BSP_uart_remove_isr(int uart, rtems_irq_hdl handler);
    35 int  BSP_uart_termios_write_polled(int minor, const char *buf, int len);
    36 int  BSP_uart_get_break_cb(int uart, rtems_libio_ioctl_args_t *arg);
    37 int  BSP_uart_set_break_cb(int uart, rtems_libio_ioctl_args_t *arg);
     18void     BSP_uart_init(int uart, int baud, int hwFlow);
     19void     BSP_uart_set_baud(int uart, int baud);
     20void     BSP_uart_intr_ctrl(int uart, int cmd);
     21void     BSP_uart_throttle(int uart);
     22void     BSP_uart_unthrottle(int uart);
     23int      BSP_uart_polled_status(int uart);
     24void     BSP_uart_polled_write(int uart, int val);
     25int      BSP_uart_polled_read(int uart);
     26void     BSP_uart_termios_set(int uart, void *ttyp);
     27ssize_t  BSP_uart_termios_write_com(int minor, const char *buf, size_t len);
     28int      BSP_uart_termios_read_com (int minor);
     29void     BSP_uart_termios_isr_com1(void *unused);
     30void     BSP_uart_termios_isr_com2(void *unused);
     31void     BSP_uart_dbgisr_com1(void);
     32void     BSP_uart_dbgisr_com2(void);
     33int      BSP_uart_install_isr(int uart, rtems_irq_hdl handler);
     34int      BSP_uart_remove_isr(int uart, rtems_irq_hdl handler);
     35ssize_t BSP_uart_termios_write_polled(int minor, const char *buf, size_t len);
     36int      BSP_uart_get_break_cb(int uart, rtems_libio_ioctl_args_t *arg);
     37int      BSP_uart_set_break_cb(int uart, rtems_libio_ioctl_args_t *arg);
    3838
    3939extern unsigned BSP_poll_char_via_serial(void);
  • c/src/lib/libbsp/powerpc/tqm8xx/ChangeLog

    rdddcb78e r39a9f8e  
     12009-12-16      Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
     2
     3        * console/console.c: adapted to new prototype for *_write
     4        function
     5
    162009-11-06      Ralf Corsépius <ralf.corsepius@rtems.org>
    27
  • c/src/lib/libbsp/powerpc/tqm8xx/console/console.c

    rdddcb78e r39a9f8e  
    777777 *      Transmit all characters.
    778778 */
    779 static int
    780 sccInterruptWrite (int minor, const char *buf, int len)
     779static ssize_t
     780sccInterruptWrite (int minor, const char *buf, size_t len)
    781781{
    782782  int chan = minor;
     
    803803}
    804804
    805 static int
    806 sccPollWrite (int minor, const char *buf, int len)
     805static ssize_t
     806sccPollWrite (int minor, const char *buf, size_t len)
    807807{
    808808  static char txBuf[CONS_CHN_CNT][SCC_TXBD_CNT];
    809809  int chan = minor;
    810810  int bd_used;
     811  size_t retval = len;
    811812
    812813  while (len--) {
     
    830831    }
    831832  }
    832   return 0;
     833  return retval;
    833834}
    834835
  • c/src/lib/libcpu/m68k/ChangeLog

    rdddcb78e r39a9f8e  
     12009-12-16      Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
     2
     3        * mcf5206/include/mcfuart.h, mcf5206/include/mcfuart.c: adapted to
     4        new prototype for *_write function
     5
    162009-10-15      Thomas Doefler <thomas.doerfler@embedded-brains.de>
    27
     
    1015
    1116        * mcf5282/include/mcf5282.h: add missing (x) params to four
    12         macros, added paranthesis around usage of x in some macros     
     17        macros, added paranthesis around usage of x in some macros
    1318
    14192009-09-10      Till Straumann <strauman@slac.stanford.edu>
  • c/src/lib/libcpu/m68k/mcf5206/console/mcfuart.c

    rdddcb78e r39a9f8e  
    396396 *     0
    397397 */
    398 int
    399 mcfuart_poll_write(mcfuart *uart, const char *buf, int len)
    400 {
     398ssize_t
     399mcfuart_poll_write(mcfuart *uart, const char *buf, size_t len)
     400{
     401  size_t retval = len;
     402
    401403    while (len--)
    402404    {
     
    404406        *MCF5206E_UTB(MBAR, uart->chn) = *buf++;
    405407    }
    406     return 0;
     408    return retval;
    407409}
    408410
     
    518520 *     0
    519521 */
    520 int
    521 mcfuart_interrupt_write(mcfuart *uart, const char *buf, int len)
     522ssize_t
     523mcfuart_interrupt_write(mcfuart *uart, const char *buf, size_t len)
    522524{
    523525    int level;
  • c/src/lib/libcpu/m68k/mcf5206/include/mcfuart.h

    rdddcb78e r39a9f8e  
    9090 *     This function initiate transmitting of the buffer in interrupt mode.
    9191 */
    92 int
    93 mcfuart_interrupt_write(mcfuart *uart, const char *buf, int len);
     92ssize_t
     93mcfuart_interrupt_write(mcfuart *uart, const char *buf, size_t len);
    9494
    9595/* mcfuart_poll_write --
    9696 *     This function transmit buffer byte-by-byte in polling mode.
    9797 */
    98 int
    99 mcfuart_poll_write(mcfuart *uart, const char *buf, int len);
     98ssize_t
     99mcfuart_poll_write(mcfuart *uart, const char *buf, size_t len);
    100100
    101101/* mcfuart_stop_remote_tx --
  • c/src/lib/libcpu/powerpc/ChangeLog

    rdddcb78e r39a9f8e  
     12009-12-17      Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
     2
     3        * mpc5xx/irq/irq.c: removed warning
     4
     52009-12-16      Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
     6
     7        * mpc5xx/include/console.h,
     8        mpc5xx/console-generic/console-generic.c,
     9        mpc8xx/include/console.h,
     10        mpc8xx/console-generic/console-generic.c,
     11        mpc8260/include/console.h,
     12        mpc8260/console-generic/console-generic.c: adapted to new prototype
     13        for *_write function
     14
    1152009-12-04      Sebastian Huber <sebastian.huber@embedded-brains.de>
    216
     
    1327        Added AltiVec support (save/restore volatile vregs
    1428        across exceptions).
    15        
     29
    16302009-12-01      Till Straumann <strauman@slac.stanford.edu>
    1731
     
    3246
    3347        Added entries for AltiVec on PSIM.
    34        
     48
    35492009-11-15      Till Straumann <strauman@slac.stanford.edu>
    3650
    3751        * shared/include/cpuIdent.c: Set 604 features + altivec if
    3852        running on PSIM.
    39        
     53
    40542009-11-03  Thomas Doerfler  <Thomas.Doerfler@imd-systems.de>
    4155
    4256        * shared/include/powerpc-utility.h, shared/include/byteorder.h,
    43         shared/include/cpuIdent.h: 
     57        shared/include/cpuIdent.h:
    4458        add c++ declaration brackets
    4559        * Makefile.am, mpc8260/clock: removed mpc8260 specific clock
  • c/src/lib/libcpu/powerpc/mpc5xx/console-generic/console-generic.c

    rdddcb78e r39a9f8e  
    140140}
    141141
    142 int
    143 m5xx_uart_write(
     142ssize_t m5xx_uart_write(
    144143  int minor,
    145144  const char *buf,
    146   int len
     145  size_t len
    147146)
    148147{
     
    154153}
    155154
    156 int
    157 m5xx_uart_pollWrite(
     155ssize_t m5xx_uart_pollWrite(
    158156  int minor,
    159157  const char *buf,
    160   int len
     158  size_t len
    161159)
    162160{
    163161  volatile m5xxSCIRegisters_t *regs = sci_descs[minor].regs;
     162  size_t retval = len;
    164163
    165164  while ( len-- ) {
     
    168167    regs->scdr = *buf++;
    169168  }
    170   return 0;
     169
     170  return retval;
    171171}
    172172
  • c/src/lib/libcpu/powerpc/mpc5xx/include/console.h

    rdddcb78e r39a9f8e  
    2525int m5xx_uart_lastClose(int maj, int min, void *arg);
    2626int m5xx_uart_pollRead(int minor);
    27 int m5xx_uart_pollWrite(int minor, const char* buf, int len);
    28 int m5xx_uart_write(int minor, const char *buf, int len);
     27ssize_t m5xx_uart_pollWrite(int minor, const char* buf, size_t len);
     28ssize_t m5xx_uart_write    (int minor, const char *buf, size_t len);
    2929int m5xx_uart_setAttributes(int, const struct termios* t);
    3030
  • c/src/lib/libcpu/powerpc/mpc5xx/irq/irq.c

    rdddcb78e r39a9f8e  
    120120 * and accessible.
    121121 */
    122 static void compute_USIU_IvectMask_from_prio ()
     122static void compute_USIU_IvectMask_from_prio (void)
    123123{
    124124  /*
  • c/src/lib/libcpu/powerpc/mpc8260/console-generic/console-generic.c

    rdddcb78e r39a9f8e  
    10991099 *  TODO: Get a free buffer and set it up.
    11001100 */
    1101 int
     1101ssize_t
    11021102m8xx_uart_write(
    11031103  int minor,
    11041104  const char *buf,
    1105   int len
     1105  size_t len
    11061106)
    11071107{
     
    11161116
    11171117
    1118 int
     1118ssize_t
    11191119m8xx_uart_pollWrite(
    11201120  int minor,
    11211121  const char *buf,
    1122   int len
     1122  size_t len
    11231123)
    11241124{
     1125  size_t retval = len;
    11251126
    11261127  while (len--) {
     
    11341135  }
    11351136
    1136   return 0;
    1137 }
     1137  return retval;
     1138}
  • c/src/lib/libcpu/powerpc/mpc8260/include/console.h

    rdddcb78e r39a9f8e  
    1515/* Termios callbacks */
    1616int m8xx_uart_pollRead(int minor);
    17 int m8xx_uart_pollWrite(int minor, const char* buf, int len);
    18 int m8xx_uart_write(int minor, const char *buf, int len);
     17ssize_t m8xx_uart_pollWrite(int minor, const char* buf, size_t len);
     18ssize_t m8xx_uart_write(int minor, const char *buf, size_t len);
    1919int m8xx_uart_setAttributes(int, const struct termios* t);
    2020
  • c/src/lib/libcpu/powerpc/mpc8xx/console-generic/console-generic.c

    rdddcb78e r39a9f8e  
    10581058 *  TODO: Get a free buffer and set it up.
    10591059 */
    1060 int
     1060ssize_t
    10611061m8xx_uart_write(
    10621062  int minor,
    10631063  const char *buf,
    1064   int len
     1064  size_t len
    10651065)
    10661066{
     
    10731073
    10741074
    1075 int
     1075ssize_t
    10761076m8xx_uart_pollWrite(
    10771077  int minor,
    10781078  const char *buf,
    1079   int len
     1079  size_t len
    10801080)
    10811081{
     
    10891089    TxBd[minor]->status = M8xx_BD_READY | M8xx_BD_WRAP;
    10901090  }
    1091   return 0;
    1092 }
     1091  return len;
     1092}
  • c/src/lib/libcpu/powerpc/mpc8xx/include/console.h

    rdddcb78e r39a9f8e  
    1515/* Termios callbacks */
    1616int m8xx_uart_pollRead(int minor);
    17 int m8xx_uart_pollWrite(int minor, const char* buf, int len);
    18 int m8xx_uart_write(int minor, const char *buf, int len);
     17ssize_t m8xx_uart_pollWrite(int minor, const char* buf, size_t len);
     18ssize_t m8xx_uart_write(int minor, const char *buf, size_t len);
    1919int m8xx_uart_setAttributes(int, const struct termios* t);
    2020
Note: See TracChangeset for help on using the changeset viewer.