16 Nov, 2011

1 commit

  • The crisv10.c and the atmel_serial.c serial drivers intepret the fields of the
    serial_rs485 structure in a different way.

    In particular, crisv10.c uses SER_RS485_RTS_AFTER_SEND and
    SER_RS485_RTS_ON_SEND for the voltage of the RTS pin; atmel_serial.c,
    instead, uses these values to know if a delay must be set before and
    after sending. This patch makes the usage of these variables consistent
    across all drivers and fixes the Documentation as well.

    From now on, SER_RS485_RTS_AFTER_SEND and SER_RS485_RTS_ON_SEND will be
    used to set the voltage of the RTS pin (as in the crisv10.c driver); the
    delay will be understood by looking only at the value of
    delay_rts_before_send and delay_rts_after_send.

    Signed-off-by: Claudio Scordino
    Signed-off-by: Darron Black
    Acked-by: Jesper Nilsson
    Acked-by: Nicolas Ferre
    Acked-by: Alan Cox
    Signed-off-by: Greg Kroah-Hartman

    Claudio Scordino
     

25 Aug, 2011

1 commit


04 Sep, 2010

1 commit


11 Aug, 2010

3 commits

  • UART Features extract from STEricsson U6715 data-sheet (arm926 SoC for mobile phone):
    * Fully compatible with industry standard 16C550 and 16C450 from various
    manufacturers
    * RX and TX 64 byte FIFO reduces CPU interrupts
    * Full double buffering
    * Modem control signals include CTS, RTS, (and DSR, DTR on UART1 only)
    * Automatic baud rate selection
    * Manual or automatic RTS/CTS smart hardware flow control
    * Programmable serial characteristics:
    – Baud rate generation (50 to 3.25M baud)
    – 5, 6, 7 or 8-bit characters
    – Even, odd or no-parity bit generation and detection
    – 1, 1.5 or 2 stop bit generation
    * Independent control of transmit, receive, line status, data set interrupts and FIFOs
    * Full status-reporting capabilities
    * Separate DMA signaling for RX and TX
    * Timed interrupt to spread receive interrupt on known duration
    * DMA time-out interrupt to allow detection of end of reception
    * Carkit pulse coding and decoding compliant with USB carkit control interface [40]

    In 16550A auto-configuration, if the fifo size is 64 then it's an U6 16550A port
    Add set_termios hook & export serial8250_do_set_termios to change uart
    clock following baudrate

    Signed-off-by: Philippe Langlais
    Acked-by: Alan Cox
    Signed-off-by: Greg Kroah-Hartman

    Philippe Langlais
     
  • Fix several issues related to the RS485 interface:

    - It adds the flag SER_RS485_RTS_BEFORE_SEND that was missing from the
    serial_rs485 structure (even if "delay_rts_before_send" was existing)

    - It adds a further "delay_rts_after_send" field for those drivers that
    can have a delay after send (e.g., atmel_serial)

    - It fixes the usage of the structure in the atmel_serial driver (where
    "delay_rts_before_send" should be used instead of "delay_rts_after_send").

    Signed-off-by: Claudio Scordino
    Signed-off-by: Bernhard Roth
    Cc: Philippe De Muyter
    Cc: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    Claudio Scordino
     
  • It seems that currently ASYNC_FLAGS is one bit short of covering all the
    bits of the ASYNC user flags. In particular it does not cover the
    ASYNC_AUTOPROBE bit.

    ASYNCB_LAST_USER and ASYNCB_AUTOPROBE are both equal to 15.

    Therefore:
    ASYNC_AUTOPROBE = 1000 0000 0000 0000
    ASYNC_FLAGS = 0111 1111 1111 1111

    So ASYNC_FLAGS is not covering the ASYNC_AUTOPROBE bit.

    This patch fixes the issue and with the patch the values will be:
    ASYNC_AUTOPROBE = 1000 0000 0000 0000
    ASYNC_FLAGS = 1111 1111 1111 1111

    As a side note, doing a "git grep" I didn't find any use of
    ASYNC_AUTOPROBE or ASYNCB_AUTOPROBE in the kernel, besides this include
    file.

    Signed-off-by: John Villalovos
    Cc: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    John Villalovos
     

20 Sep, 2009

1 commit

  • Fortunately the serial layer was designed to use the same flag values but
    with different names. It has its own SUSPENDED flag which is a free slot in
    the ASYNC flags so we allocate it in the ASYNC flags instead.

    Signed-off-by: Alan Cox
    Signed-off-by: Greg Kroah-Hartman

    Alan Cox
     

11 Jun, 2009

1 commit

  • Define ASYNCB_* flags which are bit numbers of the ASYNC_* flags.
    This is useful for {test,set,clear}_bit.

    Also convert each ASYNC_% to be (1 << ASYNCB_%) and define masks
    with the macros, not constants.

    Tested with:
    #include "PATH_TO_KERNEL/include/linux/serial.h"
    static struct {
    unsigned int new, old;
    } as[] = {
    { ASYNC_HUP_NOTIFY, 0x0001 },
    { ASYNC_FOURPORT, 0x0002 },
    ...
    { ASYNC_BOOT_ONLYMCA, 0x00400000 },
    { ASYNC_INTERNAL_FLAGS, 0xFFC00000 }
    };
    ...
    for (a = 0; a < ARRAY_SIZE(as); a++)
    if (as[a].old != as[a].new)
    printf("%.8x != %.8x\n", as[a].old, as[a].new);

    Signed-off-by: Jiri Slaby
    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Jiri Slaby
     

03 Jan, 2009

1 commit

  • In the commit below a new struct serial_rs485 was introduced for a new
    ioctl:

    commit c26c56c0f40e200e61d1390629c806f6adaffbcc
    Author: Alan Cox
    Date: Mon Oct 13 10:37:48 2008 +0100

    tty: Cris has a nice RS485 ioctl so we should steal it

    This structure uses the __u32 types for some of its members, which leads
    to the following compile error:

    $ cc -I.../include -c X.c
    In file included from X.c:2: .../include/linux/serial.h:185:
    error: expected specifier-qualifier-list before ‘__u32’
    $

    It seems that these types are appropriate for this structure as it is
    to be exposed to userspace. These types are available via linux/types.h
    so move the include of that outside the __KERNEL__ section.

    Signed-off-by: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Andy Whitcroft
     

14 Oct, 2008

1 commit

  • JP Tosoni observed:

    "About a RS485 ioctl: could you consider the attached files which are
    already in the Linux kernel (in include/asm-cris). They define a
    TIOCSERSETRS485 (ioctl.h), and the data structure (rs485.h)
    with allows to specify timings. Sounds just like what we want ?"

    and he's right: sort of. Rework the structure to use flag bits and make the
    time delay a fixed sized field so we don't get 32/64bit problems. Add the ioctls
    to x86 so that people know what to add to their platform of choice.

    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Alan Cox
     

17 Jul, 2007

1 commit

  • Beacuse SERIAL_PORT_DFNS is removed from include/asm-i386/serial.h and
    include/asm-x86_64/serial.h. the serial8250_ports need to be probed late in
    serial initializing stage. the console_init=>serial8250_console_init=>
    register_console=>serial8250_console_setup will return -ENDEV, and console
    ttyS0 can not be enabled at that time. need to wait till uart_add_one_port in
    drivers/serial/serial_core.c to call register_console to get console ttyS0.
    that is too late.

    Make early_uart to use early_param, so uart console can be used earlier. Make
    it to be bootconsole with CON_BOOT flag, so can use console handover feature.
    and it will switch to corresponding normal serial console automatically.

    new command line will be:
    console=uart8250,io,0x3f8,9600n8
    console=uart8250,mmio,0xff5e0000,115200n8
    or
    earlycon=uart8250,io,0x3f8,9600n8
    earlycon=uart8250,mmio,0xff5e0000,115200n8

    it will print in very early stage:
    Early serial console at I/O port 0x3f8 (options '9600n8')
    console [uart0] enabled
    later for console it will print:
    console handover: boot [uart0] -> real [ttyS0]

    Signed-off-by:
    Cc: Andi Kleen
    Cc: Bjorn Helgaas
    Cc: Russell King
    Cc: Gerd Hoffmann
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Yinghai Lu
     

31 Oct, 2005

1 commit

  • I recently picked up my older work to remove unnecessary #includes of
    sched.h, starting from a patch by Dave Jones to not include sched.h
    from module.h. This reduces the number of indirect includes of sched.h
    by ~300. Another ~400 pointless direct includes can be removed after
    this disentangling (patch to follow later).
    However, quite a few indirect includes need to be fixed up for this.

    In order to feed the patches through -mm with as little disturbance as
    possible, I've split out the fixes I accumulated up to now (complete for
    i386 and x86_64, more archs to follow later) and post them before the real
    patch. This way this large part of the patch is kept simple with only
    adding #includes, and all hunks are independent of each other. So if any
    hunk rejects or gets in the way of other patches, just drop it. My scripts
    will pick it up again in the next round.

    Signed-off-by: Tim Schmielau
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tim Schmielau
     

01 Sep, 2005

1 commit


16 Jul, 2005

1 commit


17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds