1. 01 6月, 2015 1 次提交
  2. 06 11月, 2014 1 次提交
    • S
      tty: serial: Add 8250-core based omap driver · 61929cf0
      Sebastian Andrzej Siewior 提交于
      This patch provides a 8250-core based UART driver for the internal OMAP
      UART. The long term goal is to provide the same functionality as the
      current OMAP uart driver and DMA support.
      I tried to merge omap-serial code together with the 8250-core code.
      There should should be hardly a noticable difference. The trigger levels
      are different compared to omap-serial:
      - omap serial
        TX: Interrupt comes after TX FIFO has room for 16 bytes.
            TX of 4096 bytes in one go results in 256 interrupts
      
        RX: Interrupt comes after there is on byte in the FIFO.
            RX of 4096 bytes results in 4096 interrupts.
      
      - this driver
        TX: Interrupt comes once the TX FIFO is empty.
            TX of 4096 bytes results in 65 interrupts. That means there will
            be gaps on the line while the driver reloads the FIFO.
      
        RX: Interrupt comes once there are 48 bytes in the FIFO or less over
            "longer" time frame. We have
                1 / 11520 * 10^3 * 16 => 1.38… ms
            1.38ms to react and purge the FIFO on 115200,8N1. Since the other
            driver fired after each byte it had ~5.47ms time to react. This
            _may_ cause problems if one relies on no missing bytes and has no
            flow control. On the other hand we get only 85 interrupts for the
            same amount of data.
      
      It has been only tested as console UART on am335x-evm, dra7-evm and
      beagle bone. I also did some longer raw-transfers to meassure the load.
      
      The device name is ttyS based instead of ttyO. If a ttyO based node name
      is required please ask udev for it. If both driver are activated (this
      and omap-serial) then this serial driver will take control over the
      device due to the link order
      
      v9…v10:
      	- Tony noticed that omap3 won't show anything after waking up
      	  from core off. In v9 I reworked the register restore and set
      	  IER to 0 by accident. This went unnoticed because start_tx
      	  usually sets ier (either due to DMA bug or due to TX-complete
      	  IRQ).
      	- dropped EFR and SLEEP from capabilities. We do have both but
      	  nobody should touch it. We already handle SLEEP ourself.
      	- make the private copy of the registers (like EFR) u8 instead
      	  u32
      	- drop MDR1 & DL[ML] reset in restore registers. Does not look
      	  required it is set to the required value later.
      	- update MDR1 & SCR only if changed.
      	- set MDR1 as the last thing. The errata says that we should
      	  setup everything before MDR1 set.
      	- avoid div by 0 in omap_8250_get_divisor() if baud rate gets
      	  very large (Frans Klaver fixed the same thing omap-serial)
      	- drop "is in early stage" from Kconfig.
      v8…v9:
      	- less on a file seems to hang the am335x after a while. I
      	  believe I introduce this bug a while ago since I can reproduce
      	  this prior to v8. Fixed by redoing the omap8250_restore_regs()
      v7…v8:
      	- redo the register write. There is now one function for that
      	  which is used from set_termios() and runtime-resume.
      	- drop PORT_OMAP_16750 and move the setup to the omap file. We
      	  have our own set termios function anyway (Heikki Krogerus)
      	- use MEM instead of MEM32. TRM of AM/DM37x says that 32bit
      	  access on THR might result in data abort. We only need 32bit
      	  access in the errata function which is before we use 8250's
      	  read function so it doesn't matter.
      v4…v7:
      	- change trigger levels after some tests with raw transfers.
      v3…v4:
      	- drop RS485 support
      	- wire up ->throttle / ->unthrottle
      v2…v3:
      	- wire up startup & shutdown for wakeup-irq handling.
      	- RS485 handling (well the core does).
      
      v1…v2:
      	- added runtime PM. Could somebody could please double check
      	  this?
      	- added omap_8250_set_termios()
      Reviewed-by: NTony Lindgren <tony@atomide.com>
      Tested-by: NTony Lindgren <tony@atomide.com>
      Tested-by: NFrans Klaver <frans.klaver@xsens.com>
      Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Reviewed-by: NPeter Hurley <peter@hurleysoftware.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      61929cf0
  3. 10 9月, 2014 1 次提交
  4. 09 9月, 2014 1 次提交
  5. 26 3月, 2013 1 次提交
    • J
      TTY: 8250, revert module name change · 9196d8ac
      Jiri Slaby 提交于
      In 3.7 the 8250 module name was changed unintentionally from 8250 to
      8250_core by commit 835d844d
      (8250_pnp: do pnp probe before legacy probe). We then had to
      re-introduce the old module options to ensure the old good
      8250.nr_uart & co. still work. This can be done only by a very dirty
      hack and we did it in f2b8dfd9
      (serial: 8250: Keep 8250.<xxxx> module options functional after driver
      rename).
      
      That is so damn ugly so that I decided to revert to the old module
      name and deprecate the new 8250_core options present in 3.7 and 3.8
      only. The deprecation will happen in the following patch.
      
      Note that this patch changes the hack above to support "8250_core.*",
      because we now have "8250.*" natively.
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Cc: Josh Boyer <jwboyer@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      9196d8ac
  6. 16 1月, 2013 1 次提交
  7. 27 9月, 2012 1 次提交
  8. 18 5月, 2012 1 次提交
  9. 05 5月, 2012 1 次提交
    • M
      serial8250-em: Emma Mobile UART driver V2 · 22886ee9
      Magnus Damm 提交于
      This is V2 of the Emma Mobile 8250 platform driver.
      
      The hardware itself has according to the data sheet
      up to 64 byte FIFOs but at this point we only make
      use of the 16550 compatible mode.
      
      To support this piece of hardware the common UART
      registers need to be remapped, and the access size
      differences need to be handled.
      
      The DLL and DLM registers can due to offset collision
      not be remapped easily, and because of that this
      driver makes use of ->dl_read() and ->dl_write()
      callbacks. This in turn requires a registration
      function that takes 8250-specific paramenters.
      
      Future potential enhancements include DT support,
      early platform driver console and fine grained PM.
      Signed-off-by: NMagnus Damm <damm@opensource.se>
      Acked-by: NAlan Cox <alan@linux.intel.com>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      22886ee9
  10. 25 1月, 2012 1 次提交