31 Aug, 2016

1 commit

  • Serial console is broken in v4.8-rcX. Mika and I independently bisected down to
    commit 4ef03d328769 ("tty/serial/8250: use mctrl_gpio helpers").

    Since neither author nor anyone else didn't propose a solution we better revert
    it for now.

    This reverts commit 4ef03d328769eddbfeca1f1c958fdb181a69c341.

    Link: https://lkml.kernel.org/r/20160809130229.GN1729@lahna.fi.intel.com
    Signed-off-by: Andy Shevchenko
    Tested-by: Heikki Krogerus
    Tested-by: Mika Westerberg
    Signed-off-by: Greg Kroah-Hartman

    Andy Shevchenko
     

26 Jun, 2016

1 commit


01 May, 2016

1 commit


07 Feb, 2016

1 commit

  • Implementation of software emulation of RS485 direction handling is based
    on omap_serial driver.
    Before and after transmission RTS is set to the appropriate value.

    Note that before calling serial8250_em485_init() the caller has to
    ensure that UART will interrupt when shift register empty. Otherwise,
    emultaion cannot be used.

    Both serial8250_em485_init() and serial8250_em485_destroy() are
    idempotent functions.

    Signed-off-by: Matwey V. Kornilov
    Signed-off-by: Greg Kroah-Hartman

    Matwey V. Kornilov
     

24 Jul, 2015

2 commits

  • Commit ed71871bed719 ("tty/8250_early: Turn serial_in/serial_out into
    weak symbols") made these routines weak to allow platform specific
    Big endian override

    However recent updates to core, specifically ebc5e20082 ("serial:
    of_serial: Support big-endian register accesses") and 6e63be3fee14
    ("serial: earlycon: Add support for big-endian MMIO accesses") means
    that round about way to overide the early serial accessors is no longer
    needed.

    Cc: Jiri Slaby
    Cc: Peter Hurley
    Cc: Rob Herring
    Cc: Kevin Cernekee
    Acked-by: Noam Camus
    Signed-off-by: Vineet Gupta
    Reviewed-by: Peter Hurley
    Signed-off-by: Greg Kroah-Hartman

    Vineet Gupta
     
  • Refactor base port operations into new file; 8250_port.c.

    Legacy irq handling, RSA port support, port storage for universal
    driver, driver definition, module parameters and linkage remain in
    8250_core.c

    The source file split and resulting modules is diagrammed below:

    8250_core.c ====> 8250_core.c __
    \ \
    \ +-- 8250.ko (alias 8250_core)
    \ 8250_pnp.c __/ (universal driver)
    \
    => 8250_port.c __
    \
    +-- 8250_base.ko
    8250_dma.c __/ (port operations)

    Signed-off-by: Peter Hurley
    Signed-off-by: Greg Kroah-Hartman

    Peter Hurley
     

31 May, 2015

1 commit


11 May, 2015

1 commit


27 Mar, 2015

3 commits

  • Prepare for 8250 split; separate RSA probe and resource management
    from base port operations. Override base port operations for the
    config_port(), request_port() and release_port() methods to
    implement the optional RSA probe and resource management only in
    the universal/legacy 8250 driver.

    Introduce 'probe' flags for 8250 ports, which allows drivers higher
    up the driver stack to enable optional probes.

    Signed-off-by: Peter Hurley
    Signed-off-by: Greg Kroah-Hartman

    Peter Hurley
     
  • Prepare for 8250 split; decouple irq setup/teardown and handler from
    core port operations.

    Introduce setup_irq() and release_irq() 8250 driver methods; the 8250
    core will use these methods to install and remove irq handling for
    the given 8250 port.

    Refactor irq chain linking/unlinking from 8250 core into
    univ8250_setup_irq()/univ8250_release_irq() for the universal 8250 driver.

    Signed-off-by: Peter Hurley
    Signed-off-by: Greg Kroah-Hartman

    Peter Hurley
     
  • setup_earlycon() will now match and register the desired earlycon
    from the param string (as if 'earlycon=...' had been set on the
    command line). Use setup_earlycon() from existing arch call sites
    which start an earlycon directly.

    Acked-by: Rob Herring
    Signed-off-by: Peter Hurley
    Signed-off-by: Greg Kroah-Hartman

    Peter Hurley
     

26 Mar, 2015

1 commit

  • Add match() method to struct console which allows the console to
    perform console command line matching instead of (or in addition to)
    default console matching (ie., by fixed name and index).

    The match() method returns 0 to indicate a successful match; normal
    console matching occurs if no match() method is defined or the
    match() method returns non-zero. The match() method is expected to set
    the console index if required.

    Re-implement earlycon-to-console-handoff with direct matching of
    "console=uart|uart8250,..." to the 8250 ttyS console.

    Acked-by: Rob Herring
    Signed-off-by: Peter Hurley
    Signed-off-by: Greg Kroah-Hartman

    Peter Hurley
     

03 Feb, 2015

1 commit

  • When using no_console_suspend, the serial console may be powered off
    anyway during system sleep. Upon resume, the port may be in its default
    power-on state, but is expected to continue console i/o before the device
    has received its pm callback. The resultant garbage i/o can cause all
    kinds of havoc on the remote end.

    Use the scratch register as a canary to discover if the console
    has been powered-off. Write a non-zero value to the scratch register
    at port suspend and reprogram the port before any console i/o if the
    scratch register != canary before port resume.

    This workaround is disabled for omap_8250 (which uses different divisor
    programming).

    Credit to Doug Anderson for the idea of using
    the scratch register canary to discover port power-down.

    Cc: Doug Anderson
    Signed-off-by: Peter Hurley
    Signed-off-by: Greg Kroah-Hartman

    Peter Hurley
     

10 Jan, 2015

1 commit

  • The OMAP3 UART ignores MCR[1] (ie., UART_MCR_RTS) when in autoRTS
    mode (UPF_HARD_FLOW + CRTSCTS). This makes it impossible for either
    the serial core or userspace to manually flow control the sender.

    Disable autoRTS mode when RTS is lowered and restore the previous
    mode when RTS is raised.

    Note that the OMAP3 UART provides no mechanism for switching from
    autoRTS mode without corrupting incoming data; to access the
    necessary register, the line control settings must be set to 8-e-2
    and thus any data received during that time will be interpreted with
    those settings. This corruption has been observed in practice.

    Cc: Sebastian Andrzej Siewior
    Signed-off-by: Peter Hurley
    Signed-off-by: Greg Kroah-Hartman

    Peter Hurley
     

07 Nov, 2014

1 commit

  • There is no more users for this functions. All the 8250 drivers are
    using the rs485 handler on serial_core instead.

    Reviewed-by: Alan Cox
    Cc: Jiri Slaby
    Cc: Sebastian Andrzej Siewior
    Cc: Alan Cox
    Cc: Tony Lindgren
    Cc: Peter Hurley
    Cc: Yoshihiro YUNOMAE
    Cc: Andy Shevchenko
    Cc: Ingo Molnar
    Signed-off-by: Ricardo Ribalda Delgado
    Signed-off-by: Greg Kroah-Hartman

    Ricardo Ribalda Delgado
     

30 Sep, 2014

1 commit

  • The kbuild test robot wrote me:
    | make.cross ARCH=powerpc
    |>> ERROR: ".__xchg_called_with_bad_pointer" [drivers/tty/serial/8250/8250.ko] undefined!

    The generic implementation of xchg() on arm and x86 works for variables of
    size one bye (char). According to the report powerpc does not support
    xchg() for one byte sized variables and looking further it seems also to
    be the same case for sparc and tile (or for 10 out of 26 architectures
    which provide a custom implementation).
    For that reason I increase the size of the variable from one to four
    bytes to get it work on powerpc (and the others).

    Reported-By: kbuild test robot
    Signed-off-by: Sebastian Andrzej Siewior
    Signed-off-by: Greg Kroah-Hartman

    Sebastian Andrzej Siewior
     

27 Sep, 2014

1 commit

  • While comparing the OMAP-serial and the 8250 part of this I noticed that
    the latter does not use run time-pm. Here are the pieces. It is
    basically a get before first register access and a last_busy + put after
    last access. This has to be enabled from userland _and_ UART_CAP_RPM is
    required for this.
    The runtime PM can usually work transparently in the background however
    there is one exception to this: After serial8250_tx_chars() completes
    there still may be unsent bytes in the FIFO (depending on CPU speed vs
    baud rate + flow control). Even if the TTY-buffer is empty we do not
    want RPM to disable the device because it won't send the remaining
    bytes. Instead we leave serial8250_tx_chars() with RPM enabled and wait
    for the FIFO empty interrupt. Once we enter serial8250_tx_chars() with
    an empty buffer we know that the FIFO is empty and since we are not going
    to send anything, we can disable the device.
    That xchg() is to ensure that serial8250_tx_chars() can be called
    multiple times and only the first invocation will actually invoke the
    runtime PM function. So that the last invocation of __stop_tx() will
    disable runtime pm.

    NOTE: do not enable RPM on the device unless you know what you do! If
    the device goes idle, it won't be woken up by incomming RX data _unless_
    there is a wakeup irq configured which is usually the RX pin configure
    for wakeup via the reset module. The RX activity will then wake up the
    device from idle. However the first character is garbage and lost. The
    following bytes will be received once the device is up in time. On the
    beagle board xm (omap3) it takes approx 13ms from the first wakeup byte
    until the first byte that is received properly if the device was in
    core-off.

    v5…v8:
    - drop RPM from serial8250_set_mctrl() it will be used in
    restore path which already has RPM active and holds
    dev->power.lock
    v4…v5:
    - add a wrapper around rpm function and introduce UART_CAP_RPM
    to ensure RPM put is invoked after the TX FIFO is empty.
    v3…v4:
    - added runtime to the console code
    - removed device_may_wakeup() from serial8250_set_sleep()

    Cc: mika.westerberg@linux.intel.com
    Reviewed-by: Tony Lindgren
    Tested-by: Tony Lindgren
    Signed-off-by: Sebastian Andrzej Siewior
    Signed-off-by: Greg Kroah-Hartman

    Sebastian Andrzej Siewior
     

09 Sep, 2014

2 commits

  • The OMAP version of the 8250 can actually use 1:1 serial8250_startup().
    However it needs to be extended by a wake up irq which should to be
    requested & enabled at ->startup() time and disabled at ->shutdown() time.

    v2…v3: properly copy callbacks
    v1…v2: add shutdown callback

    Acked-by: Alan Cox
    Signed-off-by: Sebastian Andrzej Siewior
    Signed-off-by: Greg Kroah-Hartman

    Sebastian Andrzej Siewior
     
  • This patch allow the users of the 8250 infrastructure to define a
    handler for RS485 configration.

    If no handler is defined the 8250 driver will work as usual.

    Signed-off-by: Ricardo Ribalda Delgado
    Acked-by: Alan Cox
    --
    v2:Change suggested by Alan "One Thousand Gnomes":
    - Move rs485 structure further down on the uart_8250_port structure

    drivers/tty/serial/8250/8250_core.c | 39 +++++++++++++++++++++++++++++++++++++
    include/linux/serial_8250.h | 3 +++
    2 files changed, 42 insertions(+)
    Signed-off-by: Greg Kroah-Hartman

    Ricardo Ribalda Delgado
     

18 Jul, 2014

2 commits

  • Add tunable RX interrupt trigger I/F of FIFO buffers.

    Serial devices are used as not only message communication devices but control
    or sending communication devices. For the latter uses, normally small data
    will be exchanged, so user applications want to receive data unit as soon as
    possible for real-time tendency. If we have a sensor which sends a 1 byte data
    each time and must control a device based on the sensor feedback, the RX
    interrupt should be triggered for each data.

    According to HW specification of serial UART devices, RX interrupt trigger
    can be changed, but the trigger is hard-coded. For example, RX interrupt trigger
    in 16550A can be set to 1, 4, 8, or 14 bytes for HW, but current driver sets
    the trigger to only 8bytes.

    This patch makes some devices change RX interrupt trigger from userland.

    - Read current setting
    # cat /sys/class/tty/ttyS0/rx_trig_bytes
    8

    - Write user setting
    # echo 1 > /sys/class/tty/ttyS0/rx_trig_bytes
    # cat /sys/class/tty/ttyS0/rx_trig_bytes
    1

    - 16550A and Tegra (1, 4, 8, or 14 bytes)
    - 16650V2 (8, 16, 24, or 28 bytes)
    - 16654 (8, 16, 56, or 60 bytes)
    - 16750 (1, 16, 32, or 56 bytes)

    Changes in V9:
    - Use attr_group instead of dev_spec_attr_group of uart_port structure

    Changes in V8:
    - Divide this patch from V7's patch based on Greg's comment

    Changes in V7:
    - Add Documentation
    - Change I/F name from rx_int_trig to rx_trig_bytes because the name
    rx_int_trig is hard to understand how users specify the value

    Changes in V6:
    - Move FCR_RX_TRIG_* definition in 8250.h to include/uapi/linux/serial_reg.h,
    rename those to UART_FCR_R_TRIG_*, and use UART_FCR_TRIGGER_MASK to
    UART_FCR_R_TRIG_BITS()
    - Change following function names:
    convert_fcr2val() => fcr_get_rxtrig_bytes()
    convert_val2rxtrig() => bytes_to_fcr_rxtrig()
    - Fix typo in serial8250_do_set_termios()
    - Delete the verbose error message pr_info() in bytes_to_fcr_rxtrig()
    - Rename *rx_int_trig/rx_trig* to *rxtrig* for several functions or variables
    (but UI remains rx_int_trig)
    - Change the meaningless variable name 'val' to 'bytes' following functions:
    fcr_get_rxtrig_bytes(), bytes_to_fcr_rxtrig(), do_set_rxtrig(),
    do_serial8250_set_rxtrig(), and serial8250_set_attr_rxtrig()
    - Use up->fcr in order to get rxtrig_bytes instead of rx_trig_raw in
    fcr_get_rxtrig_bytes()
    - Use conf_type->rxtrig_bytes[0] instead of switch statement for support check
    in register_dev_spec_attr_grp()
    - Delete the checking whether a user changed FCR or not when minimum buffer
    is needed in serial8250_do_set_termios()

    Changes in V5.1:
    - Fix FCR_RX_TRIG_MAX_STATE definition

    Changes in V5:
    - Support Tegra, 16650V2, 16654, and 16750
    - Store default FCR value to up->fcr when the port is first created
    - Add rx_trig_byte[] in uart_config[] for each device and use rx_trig_byte[]
    in convert_fcr2val() and convert_val2rxtrig()

    Changes in V4:
    - Introduce fifo_bug flag in uart_8250_port structure
    This is enabled only when parity is enabled and UART_BUG_PARITY is enabled
    for up->bugs. If this flag is enabled, user cannot set RX trigger.
    - Return -EOPNOTSUPP when it does not support device at convert_fcr2val() and
    at convert_val2rxtrig()
    - Set the nearest lower RX trigger when users input a meaningless value at
    convert_val2rxtrig()
    - Check whether p->fcr is existing at serial8250_clear_and_reinit_fifos()
    - Set fcr = up->fcr in the begging of serial8250_do_set_termios()

    Changes in V3:
    - Change I/F from ioctl(2) to sysfs(rx_int_trig)

    Changed in V2:
    - Use _IOW for TIOCSFIFORTRIG definition
    - Pass the interrupt trigger value itself

    Signed-off-by: Yoshihiro YUNOMAE
    Signed-off-by: Greg Kroah-Hartman

    Yoshihiro YUNOMAE
     
  • It helps to cast struct uart_port to struct uart_8250_port at runtime.

    Signed-off-by: Andy Shevchenko
    Signed-off-by: Greg Kroah-Hartman

    Andy Shevchenko
     

16 Jan, 2013

1 commit


16 Nov, 2012

1 commit

  • Allows overriding default methods serial_in/serial_out.

    In such platform specific replacement it is possible to use
    other regshift, biased register offset, any other manipulation
    that is not covered with common default methods.

    Overriding default methods may be useful for platforms which got
    serial peripheral with registers represented in big endian.
    In this situation and assuming that 32 bit operations / alignment
    is required then it may be useful to swab words before/after
    accessing the serial registers.

    Signed-off-by: Noam Camus
    Acked-by: Alan Cox
    Signed-off-by: Greg Kroah-Hartman

    Noam Camus
     

18 Jul, 2012

1 commit

  • This resolves the differences between the original 8250 patch, the revised 8250 patch
    and the independant clean up of the octeon driver (to use platform devices properly yay!)

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

    Alan Cox
     

13 Jul, 2012

1 commit


24 May, 2012

1 commit

  • Pull the MCA deletion branch from Paul Gortmaker:
    "It was good that we could support MCA machines back in the day, but
    realistically, nobody is using them anymore. They were mostly limited
    to 386-sx 16MHz CPU and some 486 class machines and never more than
    64MB of RAM. Even the enthusiast hobbyist community seems to have
    dried up close to ten years ago, based on what you can find searching
    various websites dedicated to the relatively short lived hardware.

    So lets remove the support relating to CONFIG_MCA. There is no point
    carrying this forward, wasting cycles doing routine maintenance on it;
    wasting allyesconfig build time on validating it, wasting I/O on git
    grep'ping over it, and so on."

    Let's see if anybody screams. It generally has compiled, and James
    Bottomley pointed out that there was a MCA extension from NCR that
    allowed for up to 4GB of memory and PPro-class machines. So in *theory*
    there may be users out there.

    But even James (technically listed as a maintainer) doesn't actually
    have a system, and while Alan Cox claims to have a machine in his cellar
    that he offered to anybody who wants to take it off his hands, he didn't
    argue for keeping MCA support either.

    So we could bring it back. But somebody had better speak up and talk
    about how they have actually been using said MCA hardware with modern
    kernels for us to do that. And David already took the patch to delete
    all the networking driver code (commit a5e371f61ad3: "drivers/net:
    delete all code/drivers depending on CONFIG_MCA").

    * 'delete-mca' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux:
    MCA: delete all remaining traces of microchannel bus support.
    scsi: delete the MCA specific drivers and driver code
    serial: delete the MCA specific 8250 support.
    arm: remove ability to select CONFIG_MCA

    Linus Torvalds
     

18 May, 2012

1 commit

  • The support for CONFIG_MCA is being removed, since the 20
    year old hardware simply isn't capable of meeting today's
    software demands on CPU and memory resources.

    This commit removes the MCA specific 8250 UART code.

    Cc: Alan Cox
    Cc: linux-serial@vger.kernel.org
    Acked-by: Greg Kroah-Hartman
    Signed-off-by: Paul Gortmaker

    Paul Gortmaker
     

03 May, 2012

1 commit

  • Introduce yet another 8250 registration function.
    This time it is serial8250_register_8250_port() and it
    allows us to register 8250 hardware instances using struct
    uart_8250_port. The new function makes it possible to
    register 8250 hardware that makes use of 8250 specific
    callbacks such as ->dl_read() and ->dl_write().

    Signed-off-by: Magnus Damm
    Acked-by: Arnd Bergmann
    Acked-by: Alan Cox
    Signed-off-by: Greg Kroah-Hartman

    Magnus Damm
     

19 Apr, 2012

1 commit

  • The "KT" serial port has another use case for a "received break" quirk,
    so before adding another special case to the 8250 core take this
    opportunity to push such quirks out of the core and into a uart_port op.

    Stephen says:
    "If the callback function is to no longer live in 8250.c itself,
    arch/arm/mach-tegra/devices.c isn't logically a good place to put it,
    and that file will be going away once we get rid of all the board files
    and move solely to device tree."

    ...so since 8250_pci.c houses all the quirks for pci serial devices this
    quirk is similarly housed in of_serial.c. Once the open firmware
    conversion completes the infrastructure details
    (include/linux/of_serial.h, and the export) can all be removed to make
    this self contained to of_serial.c.

    Cc: Nhan H Mai
    Cc: Colin Cross
    Cc: Olof Johansson
    [stephen: kill CONFIG_SERIAL_TEGRA in favor just using CONFIG_ARCH_TEGRA]
    Cc: Grant Likely
    Acked-by: Arnd Bergmann
    Acked-by: Sudhakar Mamillapalli
    Reported-by: Alan Cox
    Acked-by: Alan Cox
    Signed-off-by: Dan Williams
    Acked-by: Stephen Warren
    Tested-by: Stephen Warren
    Signed-off-by: Greg Kroah-Hartman

    Dan Williams
     

10 Dec, 2011

2 commits

  • Sending a break on the SOC UARTs found in some MPC83xx/85xx/86xx
    chips seems to cause a short lived IRQ storm (/proc/interrupts
    typically shows somewhere between 300 and 1500 events). Unfortunately
    this renders SysRQ over the serial console completely inoperable.

    The suggested workaround in the errata is to read the Rx register,
    wait one character period, and then read the Rx register again.
    We achieve this by tracking the old LSR value, and on the subsequent
    interrupt event after a break, we don't read LSR, instead we just
    read the RBR again and return immediately.

    The "fsl,ns16550" is used in the compatible field of the serial
    device to mark UARTs known to have this issue.

    Thanks to Scott Wood for providing the errata data which led to
    a much cleaner fix.

    Signed-off-by: Paul Gortmaker
    Acked-by: Alan Cox
    Signed-off-by: Greg Kroah-Hartman

    Paul Gortmaker
     
  • For drivers that need to construct their own IRQ handler, the
    three components are seen in the current handle_port -- i.e.
    Rx, Tx and modem_status.

    Make these exported symbols so that "almost" 8250 UARTs can
    construct their own IRQ handler with these shared components,
    while working around their own unique errata issues.

    The function names are given a serial8250 prefix, since they
    are now entering the global namespace.

    Signed-off-by: Paul Gortmaker
    Acked-by: Alan Cox
    Signed-off-by: Greg Kroah-Hartman

    Paul Gortmaker
     

25 Aug, 2011

1 commit


24 Aug, 2011

2 commits

  • The Synopsys DesignWare 8250 is an 8250 that has an extra interrupt that
    gets raised when writing to the LCR when busy. To handle this we need
    special serial_out, serial_in and handle_irq methods. Add a new
    function serial8250_use_designware_io() that configures a uart_port with
    these accessors.

    Cc: Alan Cox
    Acked-by: Arnd Bergmann
    Signed-off-by: Jamie Iles
    Signed-off-by: Greg Kroah-Hartman

    Jamie Iles
     
  • Some ports (e.g. Synopsys DesignWare 8250) have special requirements for
    handling the interrupts. Allow these platforms to specify their own
    interrupt handler that will override the default.
    serial8250_handle_irq() is provided so that platforms can extend the IRQ
    handler rather than completely replacing it.

    Signed-off-by: Jamie Iles
    Acked-by: Alan Cox
    Signed-off-by: Greg Kroah-Hartman

    Jamie Iles
     

23 Oct, 2010

2 commits

  • Not every platform that has generic legacy 8250 ports manages to have them
    clocked the right way or without errata. Provide a generic interface to
    allow platforms to override the default behaviour in a manner that dumps
    the complexity in *their* code not the 8250 driver.

    Signed-off-by: Alan Cox
    Signed-off-by: Dirk Brandewie
    Acked-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Alan Cox
     
  • Add a hook for platforms to specify custom pm methods.

    Signed-off-by: Manuel Lauss
    Cc: Alan Cox
    Signed-off-by: Greg Kroah-Hartman

    Manuel Lauss
     

11 Aug, 2010

1 commit

  • 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
     

20 Sep, 2009

1 commit

  • There is currently no provision for passing IRQ trigger flags for
    serial IRQs with triggering requirements (such as GPIO IRQs)

    This patch adds irqflags to plat_serial8250_port that can be passed
    from board file to reqest_irq() of 8250 driver

    Changes are backward compatible with boards passing UPF_SHARE_IRQ flag

    Tested on Zoom2 board that has IRQF_TRIGGER_RISING requirement for 8250 irq

    [Moved new flag to end to fix bugs in the original with the old_serial array
    -- Alan]

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

    Vikram Pandita
     

03 Jan, 2009

2 commits

  • Add flag value UPF_FIXED_TYPE which specifies that the UART type is
    known and should not be probed. For this case the UARTs properties
    are just copied out of the uart_config entry.

    This allows us to keep SOC specific 8250 probe code out of 8250.c. In
    this case we know the serial hardware will not be changing as it is on
    the same silicon as the CPU, and we can specify it with certainty in
    the board/cpu setup code.

    The alternative is to load up 8250.c with a bunch of OCTEON specific
    special cases in the probing code.

    Signed-off-by: David Daney
    Signed-off-by: Andrew Morton
    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    David Daney
     
  • In order to use Cavium OCTEON specific serial i/o drivers, we first
    patch the 8250 driver to use replaceable I/O functions. Compatible
    I/O functions are added for existing iotypeS.

    An added benefit of this change is that it makes it easy to factor
    some of the existing special cases out to board/SOC specific support
    code.

    The alternative is to load up 8250.c with a bunch of OCTEON specific
    iotype code and bug work-arounds.

    Signed-off-by: David Daney
    Signed-off-by: Tomaso Paoletti
    Signed-off-by: Andrew Morton
    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    David Daney