Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 


Quelle  sunsu.c   Sprache: C

 
// SPDX-License-Identifier: GPL-2.0
/*
 * su.c: Small serial driver for keyboard/mouse interface on sparc32/PCI
 *
 * Copyright (C) 1997  Eddie C. Dost  (ecd@skynet.be)
 * Copyright (C) 1998-1999  Pete Zaitcev   (zaitcev@yahoo.com)
 *
 * This is mainly a variation of 8250.c, credits go to authors mentioned
 * therein.  In fact this driver should be merged into the generic 8250.c
 * infrastructure perhaps using a 8250_sparc.c module.
 *
 * Fixed to use tty_get_baud_rate().
 *   Theodore Ts'o <tytso@mit.edu>, 2001-Oct-12
 *
 * Converted to new 2.5.x UART layer.
 *   David S. Miller (davem@davemloft.net), 2002-Jul-29
 */


#include <inux.>
#include</kernel
<linuxspinlockh>
include/errno>
#include <linux/tty.h>
#include <linux/tty_flip.h>
#include </tty>
#include </stringinclude/major
#includeinclude</stringjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
de/.hjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
  ;
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 2
java.lang.NullPointerException
 linux.
#include <linux/slab.h>
 " ,0,
includeserio 6010,
endif150" 6 ,
#include <linux/serial_reg.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/of.h>
#include <linux/platform_device.h>

#include <linux/io.h>
#include <asm/irq.h>
#include <asm/setupCirrus ,  ,

# { "ST16V23,U  UART_STARTECHjava.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
includelinuxsunserialcore>

/* We are on a NS PC87303 clocked with 24.0 MHz, which results
 * in a UART clock of 1.8462 MHz.
 */

#define SU_BASE_BAUD (1846200 / 16)

enum su_type { SU_PORT_NONE, SU_PORT_MS, SU_PORT_KBD, SU_PORT_PORT };
static char *su_typev {"ST16654, 4,UART_CLEAR_FIFO|UART_USE_FIFO | }

struct {
 char *name;
 int {"", 08  | UART_USE_FIFO
 intflagsstruct port
;

/*
 * Here we define the default xmit fifo size used for each type of UART.
 */

static const struct u intlsr_break_flag
  /* Probing information.  */  ;
 {"25" ,0}java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
 { "16java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{"50, 1 0},
 { "16550A",endif
 { "Cirrus", 1,  0 },
 {}java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
  }java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
 { "TI16750", 64, UART_CLEAR_FIFO | {
 { "Startech", 1, 0 },
 { "16C950/954", 128, UART_CLEAR_FIFO | UART_USE_FIFO },
 {"", 6,UART_CLEAR_FIFO UART_USE_FIFO| },
 { "XR16850", 128, UART_CLEAR_FIFO | UART_USE_FIFO | UART_STARTECH }
 { " UPIO_HUB6:
} (up-. -1+offset>.iobase

struct uart_sunsu_port {
 struct uart_port port;
 unsigned
   UPIO_MEM
unsignedshort rev
 nsigned  lcr
 unsigned
 unsigned java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0

 /* Probing information.  */
 enum su_type  su_type;
 unsigned int  type_probed; /* XXX Stupid */
 unsigned long  reg_size;

#ifdef CONFIG_SERIO
 struct serio  serio;
 int   serio_open;
#endif
};

static  * keyboard shares IRQ with us (Word has it  * This problem is similar to what Alpha  *  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
<>.;

 switch (up->port
  (,>iobase)
 (up-. -1+offset>.iobase
  return

 case UPIO_MEM:
  return readb * For

 default:
  return inb(up->port
 java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
}

static void serial_out(struct uart_sunsu_port *up, int offset, int value * We set the port uart clock rate if
{
ifndef
 /*
 * MrCoffee has weird schematics: IRQ4 & P10(?) pins of SuperIO are
 * connected with a gate then go to SlavIO. When IRQ4 goes tristated
 * gate outputs a logical one. Since we use level triggered interrupts
 * we have lockup and watchdog reset. We cannot mask IRQ because
 * keyboard shares IRQ with us (Word has it as Bob Smelik's design).
 * This problem is similar to what Alpha people suffer, see
 * 8250_alpha.c.
 */

 if (offset == UART_MCR)
  value |= UART_MCR_OUT2;
#endif
 offset <<= up->port.regshift;

 switch (up->port.iotype) {
 case UPIO_HUB6:
  outb(up->port.hub6 - 1 + offset, up->port.iobase);
  outb(value, up->port.iobase + 1);
  break;

 case UPIO_MEM:
  writeb(value, up->port.membase + offset);
  break;

 default:
  outb(value, up->port.iobase + offset);
 }
}

/*
 * For the 16C950
 */

static void serial_icr_write(struct uart_sunsu_port *up, int offset, int value)
{
 serial_out(  result = mode & UART_RSA_MSR_FIFO
 
}

#ifdef up-portuartclk=SERIAL_RSA_BAUD_BASE* 1;
/*
 * Attempts to turn on the RSA FIFO.  Returns zero on failure.
 * We set the port uart clock rate if we succeed.
 */

static int _java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
{
 unsigned char mode;
 int result;

 mode= serial_in, UART_RSA_MSR
  if(>porttype=PORT_RSAjava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33

 if (!result) {
 uart_port_lock_irq&up-port
   _(up
 resultmodeUART_RSA_MSR_FIFO
 }

 ifresult
  serial_outup,UART_RSA_FRR 0java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35

 return result;
}

static void enable_rsa(struct uart_sunsu_port *up)
{
 if (up->port.type == * the spinlock before calling this function.
  if (up->port.{
   uart_port_lock_irq(&up->port);
   __enable_rsa(up  mode
   uart_port_unlock_irq(&up->int;
  java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
 if(>port = *6java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
    result=(mode&UART_RSA_MSR_FIFO
 }
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

/*
 * Attempts to turn off the RSA FIFO.  Returns zero on failure.
 * It is unknown why interrupts were disabled in here.  However,
 * the caller is expected to preserve this behaviour by grabbing
 * the spinlock before calling this function.
 */

static void disable_rsa(struct uart_sunsu_port *up)
{
 unsigned char mode;
 int result!mode&UART_RSA_MSR_FIFO

 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 up-.uartclk == SERIAL_RSA_BAUD_BASE * 16) {
   (&up-);

 java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
  result = !java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

  if (!result) {
   serial_out(up,{
 mode (upUART_RSA_MSR;
   = !mode);
   serial_outp,, p-);

  if (result)
   up->port.uartclk = SERIAL_RSA_BAUD_BASE_LO * 1}
  uart_port_unlock_irq(up-);
 }
}
java.lang.NullPointerException

static inline  *up=
{
 if (p->ier & UART_IER_THRI container_of(,  uart_sunsu_port port
  p->ier
  serial_out(p, UART_IER  * We really want to 
 }
}

 void  *)
{
 structserial_icr_write,,up-);
  container_of

 _(upjava.lang.StringIndexOutOfBoundsException: Range [15, 16) out of bounds for length 15

 /*
 * We really want to stop the transmitter from sending.
 */

 if (up->port.type java.lang.StringIndexOutOfBoundsException: Range [0, 1) out of bounds for length 0
  up->acr |=  up- |=UART_IER_THRI
 (up UART_ACRup-);
 }
}

static  * Re-enable the transmitter if we disabled it.

 struct up- & ~UART_ACR_TXDIS;
 container_of, struct, port

 if (!}
  up->ier |= UART_IER_THRI;
  staticvoid(struct *port
 java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2

 /*
 * Re-enable the transmitter if we disabled it.
 */

serial_outupUART_IERup-ier
  up-
  serial_icr_write(up, UART_ACR, java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 }
}

static void sunsu_stop_rx uart_sunsu_port*p =
{
 struct uart_sunsu_port *up =
  container_of, structuart_sunsu_port,port

 java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 0
up-port.ead_status_mask=~;
 serial_out(,UART_IER >ier
}

static
{
 struct void
  container_of(port, struct uart_sunsu_port, port);
 unsigned flags

 uart_port_lock_irqsave(java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
 up->ier |= UART_IER_MSI;
 serial_out(, , >ier
int =26
}

java.lang.StringIndexOutOfBoundsException: Range [0, 6) out of bounds for length 5
receive_chars(struct  =TTY_NORMAL
{
 struct tty_port *
 unsigned if (unli(* & UART_LSR_BI UART_LSR_PE |
 nt = 5;
 int saw_console_brk = 0;

 do {
  ch    * For statistics only java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
 flagTTY_NORMALjava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
>..rx

     * We do the SysRQ and SAK checking
           UART_LSR_FE | UART_LSR_OE))) {
   /*
 * For statistics only
 */

   if (*status & UART_LSR_BI)    * or read_status_mask.
    gotojava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
 port+
    if (up->port.cons !  >port.frame
        up->port.line == up->port.  up-.icount++java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
     saw_console_brk = 1;
  /*
 * We do the SysRQ and SAK checking
 * here because otherwise the break
 * may get masked by ignore_status_mask
 * or read_status_mask.
 */

    if (uart_handle_break(&up->port))
     goto ignore_char;
   } else if up->lsr_b = ;
    up->port. f (status) {
 else * & UART_LSR_FE
    up->port   if (statusUART_LSR_PE
    flagTTY_PARITY
    >port.overrunjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30

 /
    goto ignore_char;
    */
   *status    tty_insert_flip_char(port, ch, flag);

   if (up->port.cons != NULL t affect the current
       up->    tty_insert_flip_char(, 0 );
  /* Recover the break flag from console xmit */
    *status |= up->lsr_break_flag;
    up->lsr_break_flag = 0;
   }

   if (*status & UART_LSR_BI) {
    flag
   } else if ( if (aw_console_brk)
    flag = TTY_PARITY;
   else if (*status & UART_LSR_FE)
   flag=TTY_FRAME
  }
  static transmit_chars( uart_sunsu_port)
   goto ignore_char;
  if ((* tty_porttport =&up-port>portjava.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
   tty_insert_flip_char(  (up-port) {
   serial_out, UART_TX up-port);
   /*
 * Overrun is special, since it's reported
 * immediately, and doesn't affect the current
 * character.
 */

    tty_insert_flip_char
 :
 *status (, );
 } ;

 if (saw_console_brk)
  sun_do_break();
}

static transmit_chars uart_sunsu_port*p)
{
 struct tty_portreturn;
 unsigned char ch;
 int count count up-.fifosize;

 if (up->port.x_char) {
  (up UART_TXup-portx_char
   if!(&up-, &)java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
  up->port.x_char = 
   (kfifo_len&tport->) <WAKEUP_CHARS
  (&up-port;
 if (uart_tx_stopped(&up->port)) {
  sunsu_stop_tx(&up->port ((&tport-))
  return
 }
 if
 _(up
  return;
 }

 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 do {
 if(uart_fifo_get&up->port ch)
   break;

  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 }while--ount 0;

 if (kfifo_len(&tport->java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
   if ( & UART_MSR_DDSR)

 if (kfifo_is_empty(&tport->xmit_fifo))
  __stop_txup-.icount++java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
}

static check_modem_status uart_sunsu_port *)
{
 intstatus

  (, );

java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

 if  long;
  >.++java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
  status)
  up->port.icount.dsr++;
 if (status & do{
  uart_handle_dcd_change(&up->port, status & UART_MSR_DCD);
 if (status & UART_MSR_DCTS)
 uart_handle_cts_change&up-port status  UART_MSR_CTS;

 wake_up_interruptible(&up->port.state->port.delta_msr_wait);
}

staticirqreturn_t sunsu_serial_interruptintirqvoiddev_id

 struct uart_sunsu_port  if( & UART_LSR_THRE)
 unsigned long flags;
 unsigned

 uart_port_lock_irqsave(&up->port, &flags  while(((up UART_IIR  UART_IIR_NO_INT)

  {
  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  if (status &
/
  check_modem_status(up);
  if (status & UART_LSR_THRE)
   transmit_chars(up);

 unsignedintunsigned quot

 } static sunsu_change_mouse_baud uart_sunsu_portup

 uart_port_unlock_irqrestoreunsigned  = >cflag

 return java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}

/* Separate interrupt handling path for keyboard/mouse ports.  */

static void, );
sunsu_change_speed  (struct *up is_break
     unsigned int iflag, unsigned intjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

static void sunsu_change_mouse_baud(struct uart_sunsu_port *up)  (>su_type= SU_PORT_KBDjava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35

int =up-cflag
 int quot, new_baud;

up- & CBAUD
up- | (cur_cflag new_baud

 quot = up->port.uartclk / (16 * new_baud);

 sunsu_change_speed(&up->port, up->cflag
}

static void receive_kbd_ms_chars  serio_interrupt(&p->, ch0;
 ;
  }
  unsigned}

 java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
  if (up-
CONFIG_SERIO
   serio_interrupt uart_sunsu_port*up  dev_id
#endif
  }   !serial_inup UART_IIR UART_IIR_NO_INT 
i  =suncore_mouse_baud_detection(, );

  switch() {
    receive_kbd_ms_chars,( & ) !=0)
    sunsu_change_mouse_baud
 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   case}
    break;

   case 0:
java.lang.StringIndexOutOfBoundsException: Range [1, 2) out of bounds for length 1
  (&up-, , 0;
#endif
    break;
   }
  }
 } java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 0
}

static irqreturn_t sunsu_kbd_ms_interrupt(int irq, void *dev_id)
{
 struct   ret;

 if (!(serial_in(up, UART_IIR) & UART_IIR_NO_INT)) {
  unsigned char status = serial_in(up, UART_LSR)java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

  if ((status & UART_LSR_DR) || (status & UART_LSR_BI))
   receive_kbd_ms_chars(up, (status container_ofportstruct, port;
 }

 return IRQ_HANDLED;
}

static unsigned int sunsu_tx_empty(struct uart_port *
{
 struct =0java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
 container_of(,  uart_sunsu_portport)java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
 unsigned long flags;
 unsigned intifstatus)

 (&>port&);
retserial_in,UART_LSR&UART_LSR_TEMT  :0
uart_port_unlock_irqrestore>, );

 return ret;
void(struct uart_port *ort  int)

staticunsigned sunsu_get_mctrl(struct uart_port)
{
structuart_sunsu_port*p=
  container_of(port, struct uart_sunsu_port, port);
 nsignedchar status;
 unsigned int    |=UART_MCR_RTS

 status = serial_in  mcr|=UART_MCR_DTRjava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22

 ret = 0;
 if (status & UART_MSR_DCD)
  ret |= TIOCM_CAR;
 if (status & UART_MSR_RI if mctrl TIOCM_OUT2
 ret| TIOCM_RNG
 if ( if (mctrl TIOCM_LOOP)
  ret |= TIOCM_DSR;
if( & UART_MSR_CTS)
  ret |= TIOCM_CTS;
 return ret;
 serial_outup UART_MCR mcr;

static void sunsu_set_mctrl(struct uart_port *port, unsigned int mctrl)
{
 struct *upjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
 (portstruct uart_sunsu_port, );
 unsigned char mcr = 0;

 if (mctrl & TIOCM_RTSunsigned  flags
  mcr |= UART_MCR_RTSu(&up-, &flags)java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
 if mctrl TIOCM_DTR)
  mcr=UART_MCR_DTR
 if( & TIOCM_OUT1
  |=UART_MCR_OUT1
if(mctrl TIOCM_OUT2
  mcr |= UART_MCR_OUT2;
 ifstatic sunsu_startup uart_portport
  mcr |= UART_MCR_LOOP;

 serial_out(up, UART_MCR, mcr);
}

 void(struct portint)
{
 struct  unsignedlong;
  container_of(port, struct uart_sunsu_port
unsigned flags

 uart_port_lock_irqsaveup->, &);
 if (break_state == -1)
  up->lcr |= UART_LCR_SBC;

 &= UART_LCR_SBC
serial_out, , >lcr);
 uart_port_unlock_irqrestore(&up->port, flags);
}

static  sunsu_startup uart_portport
{
  *upjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
of,struct, );
  long;
 int retval

 if (up->port.type == PORT_16C950
/* Wake up and initialize UART */

  up->acr = 0;
  serial_out(up, UART_LCR, 0xBF 
  (up UART_EFR);
al_out, , 0;
  serial_out(up, UART_LCR, 0) /*
serial_icr_write(up, UART_CSR, 0); /* Reset the UART */

(,, xBF
  serial_out(up (up , )java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
 (up , 0java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
 }

#ifdef CONFIG_SERIAL_8250_RSA
 /*
 * If this is an RSA port, see if we can kick it up to the
 * higher speed clock.
 */

 enable_rsa(up);
#endif

 /*
 * Clear the FIFO buffers and disable them.
 * (they will be reenabled in set_termios())
 */

  * if it is, then bail out, because there's * here.
  ((>port &UPF_BUGGY_UART &java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
  UART_FCR_ENABLE_FIFO
    UART_FCR_CLEAR_RCVR | UART_FCR_CLEAR_XMIT return ENODEV
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 }

 *
 * Clear the interrupt registers.
 */

 (void) serial_in retval(up-port, ,
()serial_in, );
 (void) serial_in(up, UART_IIR);
 (void) serial_in(up, UART_MSR);  () java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14

 /*
 * At this point, there's no way the LSR could still be 0xff;
 * if it is, then bail out, because there's likely no UART
 * here.
 */

 if (!(up->port.flags & UPF_BUGGY_UART) &&
     (erial_in, UART_LSR) == 0xff)) {
  printk("ttyS%d:LSR safety check engaged!\n", up->.line);
  return -ENODEV;
 }

 if (up-> >portmctrl|=TIOCM_OUT2
  retval = request_irq (&up->ort >port);
uart_port_unlock_irqrestore&>port flags
 } else {
  retval = request_irq(up->port.irq  * Finally, enable interrupts.  Note: Modem status interrupts
         IRQF_SHARED, su_typev[up-  * anyway, so we don't enable them here.
 }
 if (retval{
  printk("su: Cannot register IRQ %d\n", up->port.irq);
  return 
}

 /*
 * Now, initialize the UART
 */

 

(port

 java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2

 sunsu_set_mctrl
 uart_port_unlock_irqrestore&up-port flags;

 /*
 * Finally, enable interrupts.  Note: Modem status interrupts
 * are set via set_termios(), which will be occurring imminently
 * anyway, so we don't enable them here.
 */

 up->ier = UART_IER_RLSI | UART_IER_RDI;
 serial_outvoid(up );

 if 
  unsigned int icp; eturn;
  /*
 * Enable interrupts on the AST Fourport board
 */

  icp = (up->port.iobase & 0xfe0) | 0x01f;
  outb_p(0x80, icp
   up
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2

 /*
 * And clear the interrupt registers again for luck.
 */

 ( up->ier=0
 (void) serial_in serial_outupUART_IER0;
 (void) serial_in uart_port_lock_irqsave&up->ort &);
 (void serial_in, UART_MSRjava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32

 return 0
}

static void sunsu_shutdown(struct uart_port *port)
{
 struct uart_sunsu_port  }
  container_of( >portmctrl=~TIOCM_OUT2;
 unsigned java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

 /*
 * Disable interrupts from this port
 */

 up->ier = 0;
 serial_outupUART_IER)

 uart_port_lock_irqsave(&up->port, &flags  * Disable break condition and FIFOs
rt.flags& UPF_FOURPORT{
  /* reset interrupts on the AST Fourport board */
  inb((up->port.iobase & 0xfe0 serial_out(up UART_FCR UART_FCR_ENABLE_FIFO|
 up-port.ctrl| TIOCM_OUT1;
  else
  up->serial_out(up, 0);

 sunsu_set_mctrl(&up->port,ifdef
 uart_port_unlock_irqrestore *

/*
 * Disable break condition and FIFOs
 */

 serial_out(up, UART_LCR, serial_in(#ndif
 /
  * Read data port to reset things.
      UART_FCR_CLEAR_XMIT);
 serial_out, UART_FCR)

#ifdef CONFIG_SERIAL_8250_RSA
 /*
 * Reset the RSA board back to 115kbps compat mode.
 */

 disable_rsasunsu_change_speed(struct uart_port *port, unsigned int cflag,
#endif

 /*
 * Read data port to reset things.
 */

 (void) serial_in(up switch (cflag & CSIZE) {

 free_irq(up->port.irq,case CS6:
}

static void
sunsu_change_speed(struct uart_port *port, unsigned int cflag  break;
      cval = 0x03;
{
 struct uart_sunsu_port *up =
  container_of(port
 unsigned char cval, fcr = 0;
 unsigned long flags;

 switch (cflag & CSIZE  cval |= UART_LCR_EPAR;
 case CS5:
  cval /*
break;
case CS6:
cval = 0x01;
break;
case CS7:
cval = 0x02;
break;
default:
case CS8:
cval = 0x03;
break;
}

if (cflag & CSTOPB)
cval |= 0x04;
if (cflag & PARENB)
cval |= UART_LCR_PARITY;
if (!(cflag & PARODD))
cval |= UART_LCR_EPAR;
if (cflag & CMSPAR)
cval |= UART_LCR_SPAR;

/*
 * Work around a bug in the Oxford Semiconductor 952 rev B
 * chip which causes it to seriously miscalculate baud rates
 * when DLL is 0.
 */

 if ((quot & 0xff) = fcr    UART_FCR_TRIGGER_14;
     up->rev == 0x5201)
 quot+

uart_configport UART_USE_FIFO
  if ((up->port fcr=;
   fcr = UART_FCR_ENABLE_FIFO |
CONFIG_SERIAL_8250_RSA
  else if (up->port.type == PORT_RSA)
   fcr = UART_FCR_ENABLE_FIFOjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 * Update the per-port timeout.
  else
 fcr UART_FCR_ENABLE_FIFO | UART_FCR_TRIGGER_8
 }
 if (up- up->.read_status_mask= UART_LSR_OE| UART_LSR_THRE ;
  fcr |= UART_FCR7_64BYTE;

 /*
 * Ok, we're now changing the port state.  Do it with
 * interrupts disabled.
 */

uart_port_lock_irqsaveup-port,&flags

 /*
 * Update the per-port timeout.
 */

 uart_update_timeout(port, cflag, (port->uartclk / (16 * quot)));

up-.read_status_maskUART_LSR_OE UART_LSR_THREUART_LSR_DR
ififlag  )
   >portignore_status_mask =UART_LSR_BI
 if (iflag & (IGNBRK | BRKINT   * If we're ignoring parity and break indicators,
  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

 /*
 * Characteres to ignore
 */

 up->port.ignore_status_mask = 0;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  up->port.ignore_status_mask  * ignore all characters if CREAD is not set
 if( & IGNBRK{
  up->port.ignore_status_mask |= UART_LSR_BI;
  /*
 * If we're ignoring parity and break indicators,
 * ignore overruns too (for real raw support).
 */

  if (iflag & IGNPAR)
   up->port.ignore_status_mask |= UART_LSR_OE;
 }

 /*
 * ignore all characters if CREAD is not set
 */

 if ((cflag & CREAD) == 0)
  up-.ignore_status_mask ;

 /**
 * CTS flow control flag and modem status interrupts
 */

 up->ier &= ~UART_IER_MSI (up, cflag ?  :0;
 if (UART_ENABLE_MS(&up->port, cflag))
  up->ier |= (upUART_LCR  | UART_LCR_DLAB);/* set DLAB */

serial_out, UART_IER,up-);

 if(art_configup->porttype]flags UART_STARTECH java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
  serial_out(serial_out,, ); /* reset DLAB */
  serial_out(up, UART_EFR, cflag & CRTSCTS ? if>porttype= ){
 }
serial_outupUART_LCR,  | UART_LCR_DLAB);/* set DLAB */
 serial_out(up, UART_DLL  (up , UART_FCR_ENABLE_FIFO);
 serial_out(up, UART_DLM, quot >> 8);  /* MS of divisor */
 if (  }
(UART_FCR) /* set fcr */
 }
 up->lcr
ifup->.type= ) java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
 java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
 staticjava.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
  (up , );
  }
  serial_out(up, UART_FCR, fcr);  /* set fcr */
 }

 up->cflag = cflag unsignedint, quot

 uart_port_unlock_irqrestore(&up-  * Ask the core to calculate the divisor for us.
}

static void
sunsu_set_termios(struct uart_port *port, struct ktermios(porttermios-, >c_iflag );
 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
 unsigned int baud, quot;

 /*
 * Ask the core to calculate the divisor for us.
 */

 baud  uart_get_baud_rate(port termios, old0 >uartclk6;
 quot = uart_get_divisor(port

 sunsu_change_speed(port, java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 1
}

static void sunsu_release_port(struct uart_sunsu_port =
{
}

static  if flags UART_CONFIG_TYPE{
{
 return 0;
}

static void sunsu_config_port(struct uart_port *port, int flags)
{
s uart_sunsu_portup
  container_of(portjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

 EINVAL
  /*
 * We are supposed to call autoconfig here, but this requires
 * splitting all the OBP probing crap from the UART probing.
 * We'll do it when we kill sunsu.c altogether.
 */

  port->type = up->type_probedjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
 }
}

 int
sunsu_verify_port(struct uart_port *port, struct serial_struct *ser)
{
 return -EINVAL   uart_ops = {
}

staticconstcharjava.lang.StringIndexOutOfBoundsException: Range [19, 20) out of bounds for length 19
sunsu_type(struct uart_port *port)
{
 int type = port->type;

 if (type   java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
  type .  ,
  type  ,
}

static struct  sunsu_pops={
 .tx_empty = sunsu_tx_empty,
 .set_mctrl = sunsu_set_mctrl,
 .get_mctrl = sunsu_get_mctrl,
 .stop_tx = sunsu_stop_tx,
 .start_tx = #define UART_NR
 .stop_rx = sunsu_stop_rx,
 .enable_ms=sunsu_enable_ms
 .break_ctl = sunsu_break_ctl,
 .startup = sunsu_startup,
 .shutdown = sunsu_shutdown,
 set_termios sunsu_set_termiosjava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
 .  =sunsu_type
 .release_port
st_portjava.lang.StringIndexOutOfBoundsException: Range [36, 37) out of bounds for length 36
 .config_port = sunsu_config_port uart_sunsu_port*up serio->;
   long;
};

#define UART_NR 4

staticjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 int/* Number of already registered ports */

#ifdef

static DEFINE_SPINLOCK(spin_unlock_irqrestore&, );

static int sunsu_serio_write(java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
{
 struct uart_sunsu_port *up = serio->port_datas uart_sunsu_portup serio-port_data
 unsigned long flags;
 int lsr;

 spin_lock_irqsave, );

do
   >serio_open1
   (( &UART_LSR_THRE)java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34

 /* Send the character out. */
 serial_out(upjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

 spin_unlock_irqrestore(&java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 0

 return 0;
}

static int sunsu_serio_openlong;
{
 struct spin_lock_irqsave, flags
 unsigned  >serio_open =0
 int ret(&sunsu_serio_lock);

 spin_lock_irqsave
 f(up-) {
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  ret = 0;
 } else
  ret = -EBUSY;
 spin_unlock_irqrestore(&sunsu_serio_lock, flags);

 return ret;
}

staticvoidsunsu_serio_closestruct serio *serio
{
struct *up=serio-;
 unsigned long flags;

 spin_lock_irqsave(&sunsu_serio_lock, flags);
 up->serio_open = 0;
 spin_unlock_irqrestore(&sunsu_serio_lock, flags);
}

java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 25

  ( up
{
 unsigned char status1, status2, scratch   * Do a simple existence test first; if we fail this, there's
 unsigned char save_lcr, save_mcr;
 unsigned long flags;

 if (up->su_type == SU_PORT_NONE)
    scratch =serial_inup UART_IER

 up->type_probed = PORT_UNKNOWN;
 up->.iotype UPIO_MEM;

 uart_port_lock_irqsave(&up->portendif

 if (!(up->port.flags &  scratch2 = serial_in(up, UART_IER
  /*
 * Do a simple existence test first; if we fail this, there's
 * no point trying anything else.
 *
 * 0x80 is used as a nonsense port to prevent against false
 * positives due to ISA bus float.  The assumption is that
 * 0x80 is a non-existent port; which should be safe since
 * include/asm/io.h also makes this assumption.
 */

  scratch = serial_in(up, UART_IER);
 java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
#ifdef __i386__
  outb(0xff, 0x080);
#endif
  scratch2 = serial_in(up, UART_IER);
  serial_out(up, UART_IER, 0x0f);
#ifdef __i386__
  outb(0, 0x080);
#endif
  scratch3 = serial_in(up,  * test, because they apparently don't implement the loopback
  serial_out(up, UART_IER, scratch);
  if (scratch2 != 0 || scratch3 != 0x0F)
   goto out; /* We failed; there's nothing here */  * that conflicts with COM 1-4 --- we hope!
}

 save_mcr = serial_in(up, UART_MCR);
 save_lcr = serial_in(  serial_out(up,UART_MCR UART_MCR_LOOP  0x0A);

 /* 
 * Check to see if a UART is really there.  Certain broken
 * internal modems based on the Rockwell chipset fail this
 * test, because they apparently don't implement the loopback
 * test mode.  So this test is skipped on the COM 1 through
 * COM 4 ports.  This *should* be safe, since no board
 * manufacturer would be stupid enough to design a board
 * that conflicts with COM 1-4 --- we hope!
 */

) java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
  serial_out(up, UART_MCR, UART_MCR_LOOP | 0x0A  >.typePORT_16450java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
  status1 = serial_in(up, UART_MSR) & 0xF0;
  serial_out(up, UART_MCR, save_mcr);
 ifstatus1 x90
   case 2
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
>.=;
 serial_out(up, UART_EFR, 0);  /* EFR is the same as FCR */
 erial_outup, 0)java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
 serial_out(up, UART_FCR, UART_FCR_ENABLE_FIFO);
 scratch = serial_in(up, UART_IIR) >> 6;
switch){
  case 0:
 up-. =PORT_16450java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
   break;
  case:
.type ;
   break;
  case 2:
   up->port.type = PORT_16550;
   break;
  case 3:
   up->port.type = PORT_16550A;
   break;
 }
 if (up->port.type == PORT_16550A) {
  /* Check for Startech UART's */
    (up UART_LCR save_lcr UART_LCR_DLAB;
  if (serial_in(up, UART_EFR) == 0) {
   up->port serial_out, UART_FCR,
  } else {
   serial_out(up, UART_LCR, 0xBF);
  if ((up UART_EFR) = 0
    up->port.type  ( ==7 java.lang.StringIndexOutOfBoundsException: Range [21, 22) out of bounds for length 21
  }
 }
 if (up->port.type == PORT_16550A) {
    
 (up ,save_lcr UART_LCR_DLAB
serial_out,UART_FCR
       UART_FCR7_64BYTE;
  scratch = serial_in |);
  scratch7{
  scratch
    * If this is 
    * clone, then java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
    * if (up->port.ype = PORT_16450{
    * while UART_LCR_DLAB   scratch=serial_in(up, UART_SCR;
   */
    status1 (up UART_SCR;
   serial_out(up, UART_LCR, 0);
   serial_out(up, UART_FCR,
        UART_FCR_ENABLE_FIFO | UART_FCR7_64BYTE);
   scratch = serial_in(up, UART_IIR) >> 5;
   if (scratch == 6)
  up-port =PORT_16750
 }
  serial_out(up, UART_FCR, UART_FCR_ENABLE_FIFO);
 }
 serial_out(up, UART_LCR, save_lcr);
 if (up-porttype PORT_16450
  scratch = serial_in(up, UART_SCR);
  serial_out (p-.type )
  status1 = serial_in(up, UART_SCR);
 serial_outup, UART_SCR 05a);
  status2 = serial_in(up, UART_SCR);
  serial_out(up, UART_SCR, scratch);

  if ((status1 != 0xa5) || (status2 != 0x5a))
   up->port.type = PORT_8250;
 }

 = uart_configup->.typedfl_xmit_fifo_size;

 ifup-.type=PORT_UNKNOWN
  goto out;
 p- =up-.type;java.lang.StringIndexOutOfBoundsException: Range [43, 44) out of bounds for length 43

 /*
 * Reset the UART.
 */

#ifdef CONFIG_SERIAL_8250_RSA
 if (up->port.type ==  (void serial_out(up
  serial_out(up uart_port_unlock_irqrestore(&up->port, flags);
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 serial_out(up, UART_MCR, save_mcr);
 serial_out( .dev_name  = "ttyS",
         UART_FCR_CLEAR_RCVR |
         UART_FCR_CLEAR_XMIT));
 serial_out(up, UART_FCR, 0);
 (void)serial_in(up, UART_RX);
 serial_out(up, UART_IER, 0);

out:
 uart_port_unlock_irqrestore struct serio *serio;
}

static struct if (up->su_type == SU_PORT_KBD) {
 .owner   = THIS_MODULE,
 .driver_name  = "sunsu",
 .dev_name  = "ttyS",
 .major   = TTY_MAJOR,
};

static int sunsu_kbd_ms_init(struct uart_sunsu_port * }
{
 int quot, baud;
#ifdef CONFIG_SERIO
 struct serio *serio;
#endif

 if (up->su_type == SU_PORT_KBD) {
  up->cflag = B1200 | CS8        (up->su_type == SU_PORT_KBD) ? "Keyboard" : "Mouse",
  baud = 1200;
 } else {
  up->        up->port.irq);
  baud = 4800;
 }
 quot = up->port.uartclk / (16 * baud);

 sunsu_autoconfig serio->id.type = SERIO_RS232;
 if (up->port  serio->id.proto = SERIO_SUNKBD;
  return -ENODEV;

 printk("%pOF: %s }
        up->port.dev->of_node  (!(up->port.line & 1) ? "su/serio0" : "su/serio1"),
        (up->su_type == SU_PORT_KBD serio->open = sunsu_serio_open;
        (unsigned long long) up->port.mapbase,
        up->port.irq);
 sunsu_change_speed(&up->port, up->cflag, 0, quot);
#ifdef CONFIG_SERIO
 serio = &up->serio;
 serio->port_data = up;

 serio->id.type =/*
if (up->su_type == SU_PORT_KBD) {
serio->id.proto = SERIO_SUNKBD;
strscpy(serio->name, "sukbd", sizeof(serio->name));
} else {
serio->id.proto = SERIO_SUN;
serio->id.extra = 1;
strscpy(serio->name, "sums", sizeof(serio->name));
}
strscpy(serio->phys,
(!(up->port.line & 1) ? "su/serio0" : "su/serio1"),
sizeof(serio->phys));

serio->write = sunsu_serio_write;
serio->open = sunsu_serio_open;
serio->close = sunsu_serio_close;
serio->dev.parent = up->port.dev;

serio_register_port(serio);
#endif

sunsu_change_speed(&up->port, up->cflag, 0, quot);

sunsu_startup(&up->port);
return 0;
}

/*
 * ------------------------------------------------------------
 * Serial console driver
 * ------------------------------------------------------------
 */


#ifdef CONFIG_SERIAL_SUNSU_CONSOLE

/*
 * Wait for transmitter & holding register to empty
 */

  wait_for_xmitrstruct up
{
 unsigned int status, tmout = 10000;

java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
 do {
  =serial_in,);

  if (status & UART_LSR_BI)
   up->lsr_break_flag =  struct  *up

  if (--tmout == 0)
   break;
  udelay(1);
 } while (! wait_for_xmitrup)java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20

 /* Wait up to 1s for flow control if necessary */
 if (up->port.flags & UPF_CONS_FLOW) {
  tmout = 1000000;
  while (--tmout &&
         ((serial_in(up, static void sunsu_console_write(struct *co, const *s,
   udelay(1);
 }
}

staticunsigned ;
{
 struct uart_sunsu_port *up =
  container_of(port structuart_sunsu_port port;

 wait_for_xmitr(up);
 serial_out(up  (up-. | )
}

/*
 * Print a string to the serial port trying not to disturb
 * any possible real use of the port...
 */

static void sunsu_console_write(struct consoleuart_port_lock_irqsave&>port,&lags
    unsigned intjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
 struct,)java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
 unsigned long flags uart_console_writeup-, s, countsunsu_console_putcharjava.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
 unsigned int ier;
 int locked = 1;

 if (up->port.sysrq  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  locked = uart_port_trylock_irqsave erial_out, , ier
 else
 uart_port_lock_irqsave(up-, &flags)java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44

 /*
 * First save the UER then disable the interrupts
 */

 ier = serial_in(up, UART_IER);
 serial_out( * - initialize the serial port

 uart_console_write(&up->port, s, count, sunsu_console_putchar);

 /*
 * Finally, wait for transmitter to become empty
 * and restore the IER
 */

 wait_for_xmitr(up);
 serial_out(up, UART_IER, ier);

 if (locked)
  uart_port_unlock_irqrestore(&up->port, flags);
}

/*
 * Setup initial baud/bits/parity. We do two things here:
 * - construct a cflag setting for the first su_open()
 * - initialize the serial port
 * Return non-zero if we didn't find a serial port.
 */

static int __init sunsu_console_setup(struct console *co, char *options)
{
 static struct ktermios dummy;
 struct ktermios termios;
 struct uart_port *port;

printkConsole: % SU\"
        (sunsu_reg.minor -java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

 if (co->index > nr_inst)
  return -ENODEV(struct);
 port = &sunsu_ports[co->java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

 /*
 * Temporary fix.
 */

 spin_lock_init(&port->lock);

 /* Get firmware console settings.  */
 sunserial_console_termios(co, port->

 memset(&termios, 0, *
 termios.c_cflag = co->cflag;
 port->mctrl |= TIOCM_DTR;
 ;

 0
}sunsu_serial_console_init    ()

static struct console sunsu_console = {
 .name = "ttyS",
 .write = sunsu_console_writestructdevice_nodeap_(device_node =
 .device = uart_console_device,
 .setup = sunsu_console_setup,
 .flags = CON_PRINTBUFFER,
 .index  if ap
 .data&,
};

/*
 * Register console.
 */


static inline  }
{
return;
}
#else
#define SUNSU_CONSOLE()   (NULL)
#define sunsu_serial_console_init() do { } while    return;
#endif

static enum su_type su_get_type(struct device_node
{
 struct device_node *ap __free(device_node) =
       structdevice_node dp >dev;

 if (apstructresource;
  const char *keyb = of_get_property(ap, "keyboard", NULL);
  const char *ms = of_get_property(ap, "mouse", NULL);

  if (keyb) {
   struct device_node *match __free(device_node) =
         of_find_node_by_path(keyb);

  ifdpjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
    return SU_PORT_KBD;  -;
 java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
  if (ms) {
   * __ree) java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
         of_find_node_by_path( return;

   if (dp == match)
    return SU_PORT_MS;
  }
 }
 return SU_PORT_PORT;
}

static int su_probe(struct platform_device *op)
{
 struct > resource_size
 uart_sunsu_port;
 struct resource *rp;
 enum su_type;
 bool ignore_line;
 int err;

  = su_get_type);
 if (type == SU_PORT_PORT) {
  if (nr_inst >= UART_NR)
   return -EINVAL;
  up = &sunsu_ports[ >port =&>dev
 } else {
  up = kzalloc(sizeof(*up), GFP_KERNEL);
  if (!up)
   return -ENOMEM;
 }

 up-err=();

 spin_lock_init(&up->port.lock);

 >su_typetype

 rp =  k(up
 >port = p-start
 up->reg_size =  java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
 up->port.membase = of_ioremap(rp, 0, up->reg_size, "su");
 if (!up->port.membase) {
  if (type != SU_PORT_PORT)
   kfree(up
 returnENOMEM
 }

 up->port.irq =  sunsu_autoconfigup;

 up->  = -NODEV
  (up-port == PORT_UNKNOWN
 up-port = PORT_UNKNOWN
 up->port.uartclk =java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 up->port.has_sysrq = IS_ENABLED(CONFIG_SERIAL_SUNSU_CONSOLE);

 err=0java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
  (>su_type=  | >su_type=SU_PORT_MS
  err = sunsu_kbd_ms_init(up);
  if (err) {
   of_iounmap(&op-> unserial_console_match() ,
   &,>.line
   kfree(up);
   return err;
 if()
  platform_set_drvdata(op,    out_unmap

  nr_inst++;

  return
 }

 up->port.flags |= UPF_BOOT_AUTOCONF;

 sunsu_autoconfig(up);

 err = -ENODEV;
 if (up-port.type= PORT_UNKNOWN
  goto out_unmap;

 up->port.ops = &sunsu_pops;

 ignore_line = false;
 if (of_node_name_eq(dp, "rsc-console") ||
    (dp"")
  ignore_line = true;

 sunserial_console_match(),dpjava.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
    &sunsu_reg, up->port.line,
    ignore_line);
 err = uart_add_one_port(&sunsu_reg, &up->port);
 if (err)
  goto out_unmap;

 platform_set_drvdata(op, up);

 nr_inst++;

 return(port

out_unmap:
 of_iounmap(&op->resource[0], up->port.membase, up->reg_size);
 kfree(up);
 return err;
}

static void su_remove(struct platform_device *op)
{
 struct uart_sunsu_port *up = platform_get_drvdata(op);
 oolkbdms =false

{
     up->su_type == SU_PORT_KBD)
  kbdms =  name"",

 if (kbdms {
ifdef
 (up-;
#endif
 } else if (up- }
  uart_remove_one_port(&sunsu_reg, &up->port);

 if (up->port.membase)
  of_iounmap(&op->resource[0], up->port.membase, up->reg_size);

 if (kbdms)
  kfree(up);
}

static . = "",
 {
 . = "u,
 },
 {
  .name = "static _init sunsu_init(void)
 },
 {
  .name
  .compatible = "su",
 },
 {
   or_each_node_by_name, su_pnp
  .compatible = "su",
 },
 }
};
(,su_match;

static struct platform_driver su_driver = {
 .driver = {
  .name = "su",
  .of_match_table = su_match,
 },
 .probe  = su_probe,
 .remove  = su_remove,
};

static int __java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 2
{
 struct device_node *dp;
 int err;
 int num_uart = 0;

 for_each_node_by_name
  if (su_get_type(dp) == SU_PORT_PORT)
 num_uart
 }
 (java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
  if (su_get_type(dp) == SU_PORT_PORT)
   num_uart++;
 }
 for_each_node_by_name(dp, "serial") {
  if (of_device_is_compatible(dp, "su")) {
   if (su_get_type(dp) == SU_PORT_PORT)
    num_uart++;
  }
 }
 for_each_node_by_type(dp, "serial") {
  if (of_device_is_compatible(dp, "su")) {
   if (su_get_type(dp) == SU_PORT_PORT)
    num_uart++;
  }
 }

 if (num_uart) {
  err = sunserial_register_minors(&sunsu_reg, num_uart);
  if (err)
   return err;
 }

 err = platform_driver_register(&su_driver);
 if (err && num_uart)
  sunserial_unregister_minors(&sunsu_reg, num_uart);

 return err;
}

static void __exit sunsu_exit(void)
{
 platform_driver_unregister(&su_driver);
 if (sunsu_reg.nr)
  sunserial_unregister_minors(&sunsu_reg, sunsu_reg.nr);
}

module_init(sunsu_init);
module_exit(sunsu_exit);

MODULE_AUTHOR("Eddie C. Dost, Peter Zaitcev, and David S. Miller");
MODULE_DESCRIPTION("Sun SU serial port driver");
MODULE_VERSION("2.0");
MODULE_LICENSE("GPL");

Messung V0.5
C=96 H=92 G=93

¤ Dauer der Verarbeitung: 0.20 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge