1. 19 11月, 2019 1 次提交
  2. 19 2月, 2019 1 次提交
    • S
      tty: serial: samsung: Enable baud clock during initialisation · 5086e0a4
      Stuart Menefy 提交于
      The Exynos 5260, like the 5433, appears to require baud clock as
      well as pclk to be running before accessing any of the registers,
      otherwise an external abort is raised.
      
      The serial driver already enables baud clock when required, but only
      if it knows which clock is baud clock. On older SoCs baud clock may be
      selected from a number of possible clocks so to support this the driver
      only selects which clock to use for baud clock when a port is opened,
      at which point the desired baud rate is known and the best clock can be
      selected.
      
      The result is that there are a number of circumstances in which
      registers are accessed without first explicitly enabling baud clock:
       - while the driver is being initialised
       - the initial parts of opening a port for the first time
       - when resuming if the port hasn't been already opened
      
      The 5433 overcomes this currently by marking the baud clock as
      CLK_IGNORE_UNUSED, so the clock is always enabled, however
      for the 5260 I've been trying to avoid this.
      
      This change adds code to pick the first available clock to use
      as baud clock and enables it while initialising the driver.
      
      This code wouldn't be sufficient on a SoC which supports
      multiple possible baud clock sources _and_ requires the
      correct baud clock to be enabled before accessing any of the
      serial port registers (in particular the register which selects
      which clock to use as the baud clock).  As far as I know
      such hardware doesn't exist.
      Signed-off-by: NStuart Menefy <stuart.menefy@mathembedded.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      5086e0a4
  3. 17 12月, 2018 2 次提交
  4. 18 9月, 2018 1 次提交
  5. 25 5月, 2018 1 次提交
  6. 14 5月, 2018 1 次提交
  7. 28 2月, 2018 1 次提交
  8. 08 11月, 2017 2 次提交
    • G
      tty: serial: Remove redundant license text · 4793f2eb
      Greg Kroah-Hartman 提交于
      Now that the SPDX tag is in all tty files, that identifies the license
      in a specific and legally-defined manner.  So the extra GPL text wording
      can be removed as it is no longer needed at all.
      
      This is done on a quest to remove the 700+ different ways that files in
      the kernel describe the GPL license text.  And there's unneeded stuff
      like the address (sometimes incorrect) for the FSF which is never
      needed.
      
      No copyright headers or other non-license-description text was removed.
      
      Cc: Jiri Slaby <jslaby@suse.com>
      Cc: Eric Anholt <eric@anholt.net>
      Cc: Stefan Wahren <stefan.wahren@i2se.com>
      Cc: Florian Fainelli <f.fainelli@gmail.com>
      Cc: Ray Jui <rjui@broadcom.com>
      Cc: Scott Branden <sbranden@broadcom.com>
      Cc: bcm-kernel-feedback-list@broadcom.com
      Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
      Cc: Helge Deller <deller@gmx.de>
      Cc: Joachim Eastwood <manabian@gmail.com>
      Cc: Matthias Brugger <matthias.bgg@gmail.com>
      Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
      Cc: Tobias Klauser <tklauser@distanz.ch>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Vineet Gupta <vgupta@synopsys.com>
      Cc: Richard Genoud <richard.genoud@gmail.com>
      Cc: Alexander Shiyan <shc_work@mail.ru>
      Cc: Baruch Siach <baruch@tkos.co.il>
      Cc: Pat Gefre <pfg@sgi.com>
      Cc: "Guilherme G. Piccoli" <gpiccoli@linux.vnet.ibm.com>
      Cc: Jason Wessel <jason.wessel@windriver.com>
      Cc: Vladimir Zapolskiy <vz@mleia.com>
      Cc: Sylvain Lemieux <slemieux.tyco@gmail.com>
      Cc: Carlo Caione <carlo@caione.org>
      Cc: Kevin Hilman <khilman@baylibre.com>
      Cc: Liviu Dudau <liviu.dudau@arm.com>
      Cc: Sudeep Holla <sudeep.holla@arm.com>
      Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Cc: Andy Gross <andy.gross@linaro.org>
      Cc: David Brown <david.brown@linaro.org>
      Cc: "Andreas Färber" <afaerber@suse.de>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Kevin Cernekee <cernekee@gmail.com>
      Cc: Laxman Dewangan <ldewangan@nvidia.com>
      Cc: Thierry Reding <thierry.reding@gmail.com>
      Cc: Jonathan Hunter <jonathanh@nvidia.com>
      Cc: Barry Song <baohua@kernel.org>
      Cc: Patrice Chotard <patrice.chotard@st.com>
      Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
      Cc: Alexandre Torgue <alexandre.torgue@st.com>
      Cc: Chris Metcalf <cmetcalf@mellanox.com>
      Cc: Peter Korsgaard <jacmet@sunsite.dk>
      Cc: Timur Tabi <timur@tabi.org>
      Cc: Tony Prisk <linux@prisktech.co.nz>
      Cc: Michal Simek <michal.simek@xilinx.com>
      Cc: "Sören Brinkmann" <soren.brinkmann@xilinx.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      4793f2eb
    • G
      tty: add SPDX identifiers to all remaining files in drivers/tty/ · e3b3d0f5
      Greg Kroah-Hartman 提交于
      It's good to have SPDX identifiers in all files to make it easier to
      audit the kernel tree for correct licenses.
      
      Update the drivers/tty files files with the correct SPDX license
      identifier based on the license text in the file itself.  The SPDX
      identifier is a legally binding shorthand, which can be used instead of
      the full boiler plate text.
      
      This work is based on a script and data from Thomas Gleixner, Philippe
      Ombredanne, and Kate Stewart.
      
      Cc: Jiri Slaby <jslaby@suse.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Chris Metcalf <cmetcalf@mellanox.com>
      Cc: Jiri Kosina <jikos@kernel.org>
      Cc: David Sterba <dsterba@suse.com>
      Cc: James Hogan <jhogan@kernel.org>
      Cc: Rob Herring <robh@kernel.org>
      Cc: Eric Anholt <eric@anholt.net>
      Cc: Stefan Wahren <stefan.wahren@i2se.com>
      Cc: Florian Fainelli <f.fainelli@gmail.com>
      Cc: Ray Jui <rjui@broadcom.com>
      Cc: Scott Branden <sbranden@broadcom.com>
      Cc: bcm-kernel-feedback-list@broadcom.com
      Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
      Cc: Helge Deller <deller@gmx.de>
      Cc: Joachim Eastwood <manabian@gmail.com>
      Cc: Matthias Brugger <matthias.bgg@gmail.com>
      Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
      Cc: Tobias Klauser <tklauser@distanz.ch>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Vineet Gupta <vgupta@synopsys.com>
      Cc: Richard Genoud <richard.genoud@gmail.com>
      Cc: Alexander Shiyan <shc_work@mail.ru>
      Cc: Baruch Siach <baruch@tkos.co.il>
      Cc: "Maciej W. Rozycki" <macro@linux-mips.org>
      Cc: "Uwe Kleine-König" <kernel@pengutronix.de>
      Cc: Pat Gefre <pfg@sgi.com>
      Cc: "Guilherme G. Piccoli" <gpiccoli@linux.vnet.ibm.com>
      Cc: Jason Wessel <jason.wessel@windriver.com>
      Cc: Vladimir Zapolskiy <vz@mleia.com>
      Cc: Sylvain Lemieux <slemieux.tyco@gmail.com>
      Cc: Carlo Caione <carlo@caione.org>
      Cc: Kevin Hilman <khilman@baylibre.com>
      Cc: Liviu Dudau <liviu.dudau@arm.com>
      Cc: Sudeep Holla <sudeep.holla@arm.com>
      Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Cc: Andy Gross <andy.gross@linaro.org>
      Cc: David Brown <david.brown@linaro.org>
      Cc: "Andreas Färber" <afaerber@suse.de>
      Cc: Kevin Cernekee <cernekee@gmail.com>
      Cc: Laxman Dewangan <ldewangan@nvidia.com>
      Cc: Thierry Reding <thierry.reding@gmail.com>
      Cc: Jonathan Hunter <jonathanh@nvidia.com>
      Cc: Barry Song <baohua@kernel.org>
      Cc: Patrice Chotard <patrice.chotard@st.com>
      Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
      Cc: Alexandre Torgue <alexandre.torgue@st.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Peter Korsgaard <jacmet@sunsite.dk>
      Cc: Timur Tabi <timur@tabi.org>
      Cc: Tony Prisk <linux@prisktech.co.nz>
      Cc: Michal Simek <michal.simek@xilinx.com>
      Cc: "Sören Brinkmann" <soren.brinkmann@xilinx.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Kate Stewart <kstewart@linuxfoundation.org>
      Cc: Philippe Ombredanne <pombredanne@nexb.com>
      Cc: Jiri Slaby <jslaby@suse.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      e3b3d0f5
  9. 09 4月, 2017 3 次提交
    • M
      serial: samsung: Remove useless spinlock · 469f813f
      Marek Szyprowski 提交于
      Spinlock taken only for dma_map_single() for TX buffer is completely
      useless and doesn't protect anything, so remove it to simplify the code.
      Signed-off-by: NMarek Szyprowski <m.szyprowski@samsung.com>
      Reviewed-by: NKrzysztof Kozlowski <krzk@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      469f813f
    • M
      serial: samsung: Add missing checks for dma_map_single failure · 500fcc08
      Marek Szyprowski 提交于
      This patch adds missing checks for dma_map_single() failure and proper error
      reporting. Although this issue was harmless on ARM architecture, it is always
      good to use the DMA mapping API in a proper way. This patch fixes the following
      DMA API debug warning:
      
      WARNING: CPU: 1 PID: 3785 at lib/dma-debug.c:1171 check_unmap+0x8a0/0xf28
      dma-pl330 121a0000.pdma: DMA-API: device driver failed to check map error[device address=0x000000006e0f9000] [size=4096 bytes] [mapped as single]
      Modules linked in:
      CPU: 1 PID: 3785 Comm: (agetty) Tainted: G        W       4.11.0-rc1-00137-g07ca963-dirty #59
      Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
      [<c011aaa4>] (unwind_backtrace) from [<c01127c0>] (show_stack+0x20/0x24)
      [<c01127c0>] (show_stack) from [<c06ba5d8>] (dump_stack+0x84/0xa0)
      [<c06ba5d8>] (dump_stack) from [<c0139528>] (__warn+0x14c/0x180)
      [<c0139528>] (__warn) from [<c01395a4>] (warn_slowpath_fmt+0x48/0x50)
      [<c01395a4>] (warn_slowpath_fmt) from [<c072a114>] (check_unmap+0x8a0/0xf28)
      [<c072a114>] (check_unmap) from [<c072a834>] (debug_dma_unmap_page+0x98/0xc8)
      [<c072a834>] (debug_dma_unmap_page) from [<c0803874>] (s3c24xx_serial_shutdown+0x314/0x52c)
      [<c0803874>] (s3c24xx_serial_shutdown) from [<c07f5124>] (uart_port_shutdown+0x54/0x88)
      [<c07f5124>] (uart_port_shutdown) from [<c07f522c>] (uart_shutdown+0xd4/0x110)
      [<c07f522c>] (uart_shutdown) from [<c07f6a8c>] (uart_hangup+0x9c/0x208)
      [<c07f6a8c>] (uart_hangup) from [<c07c426c>] (__tty_hangup+0x49c/0x634)
      [<c07c426c>] (__tty_hangup) from [<c07c78ac>] (tty_ioctl+0xc88/0x16e4)
      [<c07c78ac>] (tty_ioctl) from [<c03b5f2c>] (do_vfs_ioctl+0xc4/0xd10)
      [<c03b5f2c>] (do_vfs_ioctl) from [<c03b6bf4>] (SyS_ioctl+0x7c/0x8c)
      [<c03b6bf4>] (SyS_ioctl) from [<c010b4a0>] (ret_fast_syscall+0x0/0x3c)
      Reported-by: NSeung-Woo Kim <sw0312.kim@samsung.com>
      Fixes: 62c37eed ("serial: samsung: add dma reqest/release functions")
      CC: stable@vger.kernel.org # v4.10+
      Signed-off-by: NMarek Szyprowski <m.szyprowski@samsung.com>
      Reviewed-by: NBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Reviewed-by: NShuah Khan <shuahkh@osg.samsung.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      500fcc08
    • M
      serial: samsung: Use right device for DMA-mapping calls · 768d64f4
      Marek Szyprowski 提交于
      Driver should provide its own struct device for all DMA-mapping calls instead
      of extracting device pointer from DMA engine channel. Although this is harmless
      from the driver operation perspective on ARM architecture, it is always good
      to use the DMA mapping API in a proper way. This patch fixes following DMA API
      debug warning:
      
      WARNING: CPU: 0 PID: 0 at lib/dma-debug.c:1241 check_sync+0x520/0x9f4
      samsung-uart 12c20000.serial: DMA-API: device driver tries to sync DMA memory it has not allocated [device address=0x000000006df0f580] [size=64 bytes]
      Modules linked in:
      CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.11.0-rc1-00137-g07ca963 #51
      Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
      [<c011aaa4>] (unwind_backtrace) from [<c01127c0>] (show_stack+0x20/0x24)
      [<c01127c0>] (show_stack) from [<c06ba5d8>] (dump_stack+0x84/0xa0)
      [<c06ba5d8>] (dump_stack) from [<c0139528>] (__warn+0x14c/0x180)
      [<c0139528>] (__warn) from [<c01395a4>] (warn_slowpath_fmt+0x48/0x50)
      [<c01395a4>] (warn_slowpath_fmt) from [<c0729058>] (check_sync+0x520/0x9f4)
      [<c0729058>] (check_sync) from [<c072967c>] (debug_dma_sync_single_for_device+0x88/0xc8)
      [<c072967c>] (debug_dma_sync_single_for_device) from [<c0803c10>] (s3c24xx_serial_start_tx_dma+0x100/0x2f8)
      [<c0803c10>] (s3c24xx_serial_start_tx_dma) from [<c0804338>] (s3c24xx_serial_tx_chars+0x198/0x33c)
      Reported-by: NSeung-Woo Kim <sw0312.kim@samsung.com>
      Fixes: 62c37eed ("serial: samsung: add dma reqest/release functions")
      CC: stable@vger.kernel.org # v4.0+
      Signed-off-by: NMarek Szyprowski <m.szyprowski@samsung.com>
      Reviewed-by: NBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Reviewed-by: NKrzysztof Kozlowski <krzk@kernel.org>
      Reviewed-by: NShuah Khan <shuahkh@osg.samsung.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      768d64f4
  10. 08 3月, 2017 1 次提交
    • K
      serial: samsung: Continue to work if DMA request fails · f98c7bce
      Krzysztof Kozlowski 提交于
      If DMA is not available (even when configured in DeviceTree), the driver
      will fail the startup procedure thus making serial console not
      available.
      
      For example this causes boot failure on QEMU ARMv7 (Exynos4210, SMDKC210):
          [    1.302575] OF: amba_device_add() failed (-19) for /amba/pdma@12680000
          ...
          [   11.435732] samsung-uart 13800000.serial: DMA request failed
          [   72.963893] samsung-uart 13800000.serial: DMA request failed
          [   73.143361] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000000
      
      DMA is not necessary for serial to work, so continue with UART startup
      after emitting a warning.
      
      Fixes: 62c37eed ("serial: samsung: add dma reqest/release functions")
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NKrzysztof Kozlowski <krzk@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f98c7bce
  11. 03 2月, 2017 1 次提交
  12. 12 1月, 2017 1 次提交
  13. 31 8月, 2016 1 次提交
  14. 26 6月, 2016 3 次提交
    • M
      tty: serial: samsung: add byte-order aware bit functions · bbb5ff91
      Matthew Leach 提交于
      This driver makes use of the __set_bit() and __clear_bit() functions.
      When running under big-endian, these functions don't convert the bit
      indexes when working with peripheral registers, leading to the
      incorrect bits being set and cleared when running big-endian.
      
      Add two new driver functions for setting and clearing bits that are
      byte-order aware.
      Signed-off-by: NMatthew Leach <matthew@mattleach.net>
      Reviewed-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      bbb5ff91
    • K
      serial: samsung: Fix possible out of bounds access on non-DT platform · 926b7b51
      Krzysztof Kozlowski 提交于
      On non-DeviceTree platforms, the index of serial device is a static
      variable incremented on each probe.  It is incremented even if deferred
      probe happens when getting the clock in s3c24xx_serial_init_port().
      
      This index is used for referencing elements of statically allocated
      s3c24xx_serial_ports array.  In case of re-probe, the index will point
      outside of this array leading to memory corruption.
      
      Increment the index only on successful probe.
      Reported-by: NBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Fixes: b497549a ("[ARM] S3C24XX: Split serial driver into core and per-cpu drivers")
      Signed-off-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      926b7b51
    • K
      serial: samsung: Fix ERR pointer dereference on deferred probe · e51e4d8a
      Krzysztof Kozlowski 提交于
      When the clk_get() of "uart" clock returns EPROBE_DEFER, the next re-probe
      finishes with success but uses invalid (ERR_PTR) values.  This leads to
      dereferencing of ERR_PTR stored under ourport->clk:
      
      	12c30000.serial: Controller clock not found
      	(...)
      	12c30000.serial: ttySAC3 at MMIO 0x12c30000 (irq = 61, base_baud = 0) is a S3C6400/10
      	Unable to handle kernel paging request at virtual address fffffdfb
      
      	(clk_prepare) from [<c039f7d0>] (s3c24xx_serial_pm+0x20/0x128)
      	(s3c24xx_serial_pm) from [<c0395414>] (uart_change_pm+0x38/0x40)
      	(uart_change_pm) from [<c039689c>] (uart_add_one_port+0x31c/0x44c)
      	(uart_add_one_port) from [<c03a035c>] (s3c24xx_serial_probe+0x2a8/0x418)
      	(s3c24xx_serial_probe) from [<c03ee110>] (platform_drv_probe+0x50/0xb0)
      	(platform_drv_probe) from [<c03ecb44>] (driver_probe_device+0x1f4/0x2b0)
      	(driver_probe_device) from [<c03eb0c0>] (bus_for_each_drv+0x44/0x8c)
      	(bus_for_each_drv) from [<c03ec8c8>] (__device_attach+0x9c/0x100)
      	(__device_attach) from [<c03ebf54>] (bus_probe_device+0x84/0x8c)
      	(bus_probe_device) from [<c03ec388>] (deferred_probe_work_func+0x60/0x8c)
      	(deferred_probe_work_func) from [<c012fee4>] (process_one_work+0x120/0x328)
      	(process_one_work) from [<c0130150>] (worker_thread+0x2c/0x4ac)
      	(worker_thread) from [<c0135320>] (kthread+0xd8/0xf4)
      	(kthread) from [<c0107978>] (ret_from_fork+0x14/0x3c)
      
      The first unsuccessful clk_get() causes s3c24xx_serial_init_port() to
      exit with failure but the s3c24xx_uart_port is left half-configured
      (e.g. port->mapbase is set, clk contains ERR_PTR).  On next re-probe,
      the function s3c24xx_serial_init_port() will exit early with success
      because of configured port->mapbase and driver will use old values,
      including the ERR_PTR as clock.
      
      Fix this by cleaning the port->mapbase on error path so each re-probe
      will initialize all of the port settings.
      
      Fixes: 60e93575 ("serial: samsung: enable clock before clearing pending interrupts during init")
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com>
      Reviewed-by: NJavier Martinez Canillas <javier@osg.samsung.com>
      Tested-by: NJavier Martinez Canillas <javier@osg.samsung.com>
      Tested-by: NKevin Hilman <khilman@baylibre.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      e51e4d8a
  15. 01 5月, 2016 1 次提交
  16. 08 3月, 2016 1 次提交
  17. 07 2月, 2016 1 次提交
    • P
      earlycon: Use common framework for earlycon declarations · 2eaa7909
      Peter Hurley 提交于
      Use a single common table of struct earlycon_id for both command line
      and devicetree. Re-define OF_EARLYCON_DECLARE() macro to instance a
      unique earlycon declaration (the declaration is only guaranteed to be
      unique within a compilation unit; separate compilation units must still
      use unique earlycon names).
      
      The semantics of OF_EARLYCON_DECLARE() is different; it declares an
      earlycon which can matched either on the command line or by devicetree.
      EARLYCON_DECLARE() is semantically unchanged; it declares an earlycon
      which is matched by command line only. Remove redundant instances of
      EARLYCON_DECLARE().
      
      This enables all earlycons to properly initialize struct console
      with the appropriate name and index, which improves diagnostics and
      enables direct earlycon-to-console handoff.
      Acked-by: NRob Herring <robh@kernel.org>
      Signed-off-by: NPeter Hurley <peter@hurleysoftware.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      2eaa7909
  18. 05 10月, 2015 4 次提交
  19. 05 8月, 2015 2 次提交
  20. 24 7月, 2015 1 次提交
  21. 11 5月, 2015 2 次提交
  22. 28 4月, 2015 1 次提交
    • R
      serial: samsung: fix serial console break · 31c6ba97
      Robert Baldyga 提交于
      This patch fixes problems with serial console break. When function
      s3c64xx_serial_startup() was started while serial console has been working,
      it caused lose of characters written to TX FIFO. This effect was particularly
      observable with systemd, which closes serial port every time when it's
      not currently needed, hence function s3c64xx_serial_startup() is called
      quite often there. To fix this problem we avoid resetting TX FIFO if port is
      used as serial console.
      
      Example of broken console log:
      
      [ 1086.7         Expecting device dev-ttySAC1.device...
      [ 1086.[  OK  ] Reached target Paths.
      [ 1086.756416] s[  OK  ] Reached target Swap.
      [ 1086.776413] systemd[1]: Reached target Swap.
      [ 1086.776642] systemd[1]: Starting Root Slice.
      [    5.53403[  OK  ] Created slice Root Slice.
      [    5.548433] systemd[1]: Create[  OK  ] Created slice User and Session Slice.
      [    5.568414] sys[  OK  ] Listening on /dev/initctl Compatibility Named Pipe.
      [    5.588388] s[  OK  ] Listening on Delayed Shutdown Socket.
      [    5.608376] sy[  OK  ] Listening on Journal Socket (/dev/log).
      [    5.628361] [  OK  ] Listening on udev Kernel Socket.
      [    5.648357] s[  OK  ] Listening on udev Control Socket.
      [    5.668353] s[  OK  ] Listening on Journal Socket.
      [    5.688366] systemd[1]: Listeni[  OK  ] Created slice System Slice.
      [    5.708393]          Mounting Temporary Directory...
      [ 7139.067436]          Starting prepare device daemon...
      [ 7139.091726] sy         Starting Generate environment from /etc/profile.d...
      [    5.792867] system         Starting Create Static Device Nodes in /dev...
      [ 7848.718         Mounting Debug File System...
      [ 7848.7384         Mounting Configuration File System...
      [    5.852         Starting Apply Kernel Variables...
      [    5.8720         Starting Setup Virtual Console...
      [ 7848.798         Starting udev Coldplug all Devices...
      [ 7848.817         Starting Journal Service...
      [  OK  ] Started Journal Service.
      [ 7848.854222] s[  OK  ] Reached target Slices.
               Starting Remount Root and Kernel File Systems...
      [  OK  ] Mounted Configuration File System.
      Reported-by: NChanwoo Choi <cw00.choi@samsung.com>
      Signed-off-by: NRobert Baldyga <r.baldyga@samsung.com>
      Reviewed-by: NPeter Hurley <peter@hurleysoftware.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      31c6ba97
  23. 27 3月, 2015 1 次提交
    • J
      serial: samsung: Clear operation mode on UART shutdown · e91d863d
      Javier Martinez Canillas 提交于
      Exynos serial ports operate either in a DMA-based or interrupt-based
      modes. In DMA-based mode, the UART generates a transfer data request
      and a Transmission (Tx) interrupt in interrupt-based mode.
      
      The Tx IRQ is only unmasked in interrupt-based mode and it was done
      in s3c24xx_serial_start_tx(). Commit ba019a3e ("serial: samsung:
      remove redundant interrupt enabling") removed the IRQ enable on that
      function since it is enabled when the mode is set in enable_tx_pio().
      
      The problem is that enable_tx_pio() is only called if the port mode
      has not been set before but the mode was not cleared on .shutdown().
      
      So if the UART was shutdown and then started up again, the mode set
      will remain and the Tx IRQ won't be unmasked.
      
      This caused a hang on at least Exynos5250, Exynos5420 and Exynos5800
      when the system is rebooted or powered off.
      
      Fixes: ba019a3e ("serial: samsung: remove redundant interrupt enabling")
      Signed-off-by: NJavier Martinez Canillas <javier.martinez@collabora.co.uk>
      Reviewed-by: NSylwester Nawrocki <s.nawrocki@samsung.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      e91d863d
  24. 03 2月, 2015 3 次提交
    • M
      serial: samsung: earlycon support depends on CONFIG_SERIAL_SAMSUNG_CONSOLE · c3bda295
      Marek Szyprowski 提交于
      EarlyCon support depends on serial console infrastructure, so the code
      implementing it should depend on CONFIG_SERIAL_SAMSUNG_CONSOLE.
      
      This patch fixes the following build break:
      CC [M]  drivers/tty/serial/samsung.o
      drivers/tty/serial/samsung.c:2468:1: error: expected declaration specifiers or ‘...’ before string constant
      drivers/tty/serial/samsung.c:2468:1: error: expected declaration specifiers or ‘...’ before ‘s3c2410_setup_earlycon’
      drivers/tty/serial/samsung.c:2487:1: error: expected declaration specifiers or ‘...’ before string constant
      drivers/tty/serial/samsung.c:2487:1: error: expected declaration specifiers or ‘...’ before ‘s3c2412_setup_earlycon’
      drivers/tty/serial/samsung.c:2488:1: error: expected declaration specifiers or ‘...’ before string constant
      drivers/tty/serial/samsung.c:2488:1: error: expected declaration specifiers or ‘...’ before ‘s3c2440_setup_earlycon’
      drivers/tty/serial/samsung.c:2489:1: error: expected declaration specifiers or ‘...’ before string constant
      drivers/tty/serial/samsung.c:2489:1: error: expected declaration specifiers or ‘...’ before ‘s3c6400_setup_earlycon’
      drivers/tty/serial/samsung.c:2506:1: error: expected declaration specifiers or ‘...’ before string constant
      drivers/tty/serial/samsung.c:2506:1: error: expected declaration specifiers or ‘...’ before ‘s5pv210_setup_earlycon’
      drivers/tty/serial/samsung.c:2507:1: error: expected declaration specifiers or ‘...’ before string constant
      drivers/tty/serial/samsung.c:2507:1: error: expected declaration specifiers or ‘...’ before ‘exynos4210_setup_earlycon’
      drivers/tty/serial/samsung.c:2468:1: warning: ‘s3c2410_setup_earlycon’ defined but not used [-Wunused-function]
      drivers/tty/serial/samsung.c:2487:1: warning: ‘s3c2412_setup_earlycon’ defined but not used [-Wunused-function]
      drivers/tty/serial/samsung.c:2488:1: warning: ‘s3c2440_setup_earlycon’ defined but not used [-Wunused-function]
      drivers/tty/serial/samsung.c:2489:1: warning: ‘s3c6400_setup_earlycon’ defined but not used [-Wunused-function]
      drivers/tty/serial/samsung.c:2506:1: warning: ‘s5pv210_setup_earlycon’ defined but not used [-Wunused-function]
      drivers/tty/serial/samsung.c:2507:1: warning: ‘exynos4210_setup_earlycon’ defined but not used [-Wunused-function]
      make[3]: *** [drivers/tty/serial/samsung.o] Error 1
      Reported-by: Nkbuild test robot <fengguang.wu@intel.com>
      Signed-off-by: NMarek Szyprowski <m.szyprowski@samsung.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c3bda295
    • R
      serial: samsung: remove redundant interrupt enabling · ba019a3e
      Robert Baldyga 提交于
      Function s3c24xx_serial_start_tx_pio() enables interrupts if needed,
      so we don't have to (or even we shouldn't) enable them before.
      Signed-off-by: NRobert Baldyga <r.baldyga@samsung.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ba019a3e
    • T
      serial: samsung: Add support for early console · b94ba032
      Tomasz Figa 提交于
      This patch adds support for early console initialized from device tree
      and kernel command line to all variants of Samsung serial driver.
      Signed-off-by: NTomasz Figa <t.figa@samsung.com>
      [mszyprow: added support for command line based initialization,
                 fixed comments, added documentation]
      Signed-off-by: NMarek Szyprowski <m.szyprowski@samsung.com>
      Reviewed-by: NAlim Akhtar <alim.akhtar@samsung.com>
      Tested-by: NAlim Akhtar <alim.akhtar@samsung.com>
      Tested-by: NChanwoo Choi <cw00.choi@samsung.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b94ba032
  25. 10 1月, 2015 3 次提交
    • R
      serial: samsung: add DMA support for RX · b543c301
      Robert Baldyga 提交于
      Add RX DMA transfers support for samsung serial driver. It's enabled
      when DMA controller for RX channel is specified in device-tree.
      
      DMA transactions are started when number of bytes in RX FIFO reaches
      trigger level, otherwise PIO mode is used. DMA transfer size is always
      PAGE_SIZE which can cause large latency when smaller data amount is
      transferred, so we always terminate DMA transaction on RX timeout
      interrupt. Timeout interval is set to 64 frame times.
      
      Based on previous work of Sylwester Nawrocki and Lukasz Czerwinski.
      Signed-off-by: NRobert Baldyga <r.baldyga@samsung.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b543c301
    • R
      serial: samsung: add DMA support for TX · 29bef799
      Robert Baldyga 提交于
      Add TX DMA transfers support for samsung serial driver. It's enabled
      when "dmas" property is defined in serial device-tree node, otherwise
      TX transfers are prerformed using PIO.
      
      TX DMA is used for data segments larger than fifosize to reduce number
      of interrupts during data transmission. For buffers shorter than fifosize
      PIO mode is selected.
      
      Data blocks for DMA transfers are aligned to cache line size to avoid
      problems with coherency (some areas of TX circ buffer can be used by
      CPU during DMA transaction, so we have to ensure that our data is always
      consistent).
      
      Based on previous work of Sylwester Nawrocki and Lukasz Czerwinski.
      Signed-off-by: NRobert Baldyga <r.baldyga@samsung.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      29bef799
    • R
      serial: samsung: add dma reqest/release functions · 62c37eed
      Robert Baldyga 提交于
      Add functions requesting and releasing RX and TX DMA channels. This
      function are called only when "dmas" property in serial device-tree
      node is defined.
      
      Based on previous work of Sylwester Nawrocki and Lukasz Czerwinski.
      Signed-off-by: NRobert Baldyga <r.baldyga@samsung.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      62c37eed