1. 27 1月, 2017 1 次提交
    • B
      tty: serial: constify uart_ops structures · 2331e068
      Bhumika Goyal 提交于
      Declare uart_ops structures as const as they are only stored in the ops
      field of an uart_port structure. This field is of type const, so
      uart_ops structures having this property can be made const too.
      
      File size details before and after patching.
      First line of every .o file shows the file size before patching
      and second line shows the size after patching.
      
         text	   data	    bss	    dec	    hex	filename
      
         2977	    456	     64	   3497	    da9	drivers/tty/serial/amba-pl010.o
         3169	    272	     64	   3505	    db1	drivers/tty/serial/amba-pl010.o
      
         3109	    456	      0	   3565	    ded	drivers/tty/serial/efm32-uart.o
         3301	    272	      0	   3573	    df5	drivers/tty/serial/efm32-uart.o
      
        10668	    753	      1	  11422	   2c9e	drivers/tty/serial/icom.o
        10860	    561	      1	  11422	   2c9e	drivers/tty/serial/icom.o
      
        23904	    408	      8	  24320	   5f00	drivers/tty/serial/ioc3_serial.o
        24088	    224	      8	  24320	   5f00	drivers/tty/serial/ioc3_serial.o
      
        10516	    560	      4	  11080	   2b48	drivers/tty/serial/ioc4_serial.o
        10709	    368	      4	  11081	   2b49	drivers/tty/serial/ioc4_serial.o
      
         7853	    648	   1216	   9717	   25f5	drivers/tty/serial/mpsc.o
         8037	    456	   1216	   9709	   25ed	drivers/tty/serial/mpsc.o
      
        10248	    456	      0	  10704	   29d0	drivers/tty/serial/omap-serial.o
        10440	    272	      0	  10712	   29d8	drivers/tty/serial/omap-serial.o
      
         8122	    532	   1984	  10638	   298e	drivers/tty/serial/pmac_zilog.o
         8306	    340	   1984	  10630	   2986	drivers/tty/serial/pmac_zilog.o
      
         3808	    456	      0	   4264	   10a8	drivers/tty/serial/pxa.o
         4000	    264	      0	   4264	   10a8	drivers/tty/serial/pxa.o
      
        21781	   3864	      0	  25645	   642d	drivers/tty/serial/serial-tegra.o
        22037	   3608	      0	  25645	   642d	drivers/tty/serial/serial-tegra.o
      
         2481	    456	     96	   3033	    bd9	drivers/tty/serial/sprd_serial.o
         2673	    272	     96	   3041	    be1	drivers/tty/serial/sprd_serial.o
      
         5534	    300	    512	   6346	   18ca	drivers/tty/serial/vr41xx_siu.o
         5630	    204	    512	   6346	   18ca	drivers/tty/serial/vr41xx_siu.o
      
         6730	   1576	    128	   8434	   20f2	drivers/tty/serial/vt8500_serial.o
         6986	   1320	    128	   8434	   20f2	drivers/tty/serial/vt8500_serial.o
      
      Cross compiled for mips architecture.
      
         3005	    488	      0	   3493	    da5	drivers/tty/serial/pnx8xxx_uart.o
         3189	    304	      0	   3493	    da5	drivers/tty/serial/pnx8xxx_uart.o
      
         4272	    196	   1056	   5524	   1594	drivers/tty/serial/dz.o
         4368	    100	   1056	   5524	   1594	drivers/tty/serial/dz.o
      
         6551	    144	     16	   6711	   1a37	drivers/tty/serial/ip22zilog.o
         6647	     48	     16	   6711	   1a37	drivers/tty/serial/ip22zilog.o
      
         9612	    428	   1520	  11560	   2d28	drivers/tty/serial/serial_txx9.o
         9708	    332	   1520	  11560	   2d28	drivers/tty/serial/serial_txx9.o
      
         4156	    296	     16	   4468	   1174	drivers/tty/serial/ar933x_uart.o
         4252	    200	     16	   4468	   1174	drivers/tty/serial/ar933x_uart.o
      
      Cross compiled for arm archiecture.
      
        11716	   1780	     44	  13540	   34e4	drivers/tty/serial/sirfsoc_uart.o
        11808	   1688	     44	  13540	   34e4	drivers/tty/serial/sirfsoc_uart.o
      
        13352	    596	     56	  14004	   36b4	drivers/tty/serial/amba-pl011.o
        13444	    504	     56	  14004	   36b4	drivers/tty/serial/amba-pl011.o
      
      Cross compiled for sparc architecture.
      
         4664	    528	     32	   5224	   1468	drivers/tty/serial/sunhv.o
         4848	    344	     32	   5224	   1468	drivers/tty/serial/sunhv.o
      
         8080	    332	     28	   8440	   20f8	drivers/tty/serial/sunzilog.o
         8184	    228	     28	   8440	   20f8	drivers/tty/serial/sunzilog.o
      
      Cross compiled for ia64 architecture.
      
        10226	    549	    472	  11247	   2bef	drivers/tty/serial/sn_console.o
        10414	    365	    472	  11251	   2bf3	drivers/tty/serial/sn_console.o
      
      The files drivers/tty/serial/zs.o, drivers/tty/serial/lpc32xx_hs.o and
      drivers/tty/serial/lantiq.o did not compile.
      Signed-off-by: NBhumika Goyal <bhumirks@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      2331e068
  2. 25 1月, 2017 4 次提交
  3. 20 1月, 2017 6 次提交
  4. 19 1月, 2017 21 次提交
  5. 12 1月, 2017 8 次提交
    • D
      serial: 8250: Add new port type for TI DA8xx/66AK2x · a2d6a987
      David Lechner 提交于
      This adds a new UART port type for TI DA8xx/OMAPL13x/AM17xx/AM18xx/66AK2x.
      These SoCs have standard 8250 registers plus some extra non-standard
      registers.
      
      The UART will not function unless the non-standard Power and Emulation
      Management Register (PWREMU_MGMT) is configured correctly. This is
      currently handled in arch/arm/mach-davinci/serial.c for non-device-tree
      boards. Making this part of the UART driver will allow UART to work on
      device-tree boards as well and the mach code can eventually be removed.
      Signed-off-by: NDavid Lechner <david@lechnology.com>
      Acked-by: NSekhar Nori <nsekhar@ti.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a2d6a987
    • J
      serial: 8250_mid: make option visible · 19458893
      Jean Delvare 提交于
      Hiding tristate options with "if EXPERT" is usually not a good idea.
      You can decide that the driver should be included by default, but you
      don't know if the user wants it built-in or as a module. Hiding the
      option prevents the user from making that decision.
      
      This is even more problematic when said option selects other options.
      You end up with several device drivers forcibly built into the kernel.
      
      In this specific case, drivers 8250_mid, virt-dma, hsu_dma and
      hsu_dma_pci end up being built-in as soon as SERIAL_8250=y. It is
      very common for distribution kernels to build the subsystem core code
      into the kernel, because almost everybody will need it, but build all
      the device drivers as modules. This should be made possible.
      
      So drop the "if EXPERT" and make SERIAL_8250_MID visible.
      Signed-off-by: NJean Delvare <jdelvare@suse.de>
      Fixes: 1fc969c7 ("serial: 8250_mid: make module available only on X86")
      Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
      Cc: Jiri Slaby <jslaby@suse.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      19458893
    • J
      serial: 8250_lpss: make option visible · dce22df1
      Jean Delvare 提交于
      Hiding tristate options with "if EXPERT" is usually not a good idea.
      You can decide that the driver should be included by default, but you
      don't know if the user wants it built-in or as a module. Hiding the
      option prevents the user from making that decision.
      
      This is even more problematic when said option selects other options.
      You end up with several device drivers forcibly built into the kernel.
      
      In this specific case, drivers 8250_lpss, dw_dmac_core and
      dw_dmac_pci end up being built-in as soon as SERIAL_8250=y. It is
      very common for distribution kernels to build the subsystem core code
      into the kernel, because almost everybody will need it, but build all
      the device drivers as modules. This should be made possible.
      
      So drop the "if EXPERT" and make SERIAL_8250_LPSS visible.
      Signed-off-by: NJean Delvare <jdelvare@suse.de>
      Fixes: a13e19cf ("serial: 8250_lpss: split LPSS driver to separate module")
      Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
      Cc: Jiri Slaby <jslaby@suse.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      dce22df1
    • J
      serial: 8250_pci: make option visible · f1e8c710
      Jean Delvare 提交于
      Hiding tristate options with "if EXPERT" is usually not a good idea.
      You can decide that the driver should be included by default, but you
      don't know if the user wants it built-in or as a module. Hiding the
      option prevents the user from making that decision.
      
      In this specific case, driver 8250_pci ends up being built-in as soon
      as SERIAL_8250=y. It is very common for distribution kernels to build
      the subsystem core code into the kernel, because almost everybody
      will need it, but build all the device drivers as modules. This
      should be made possible.
      
      So drop the "if EXPERT" and make SERIAL_8250_PCI visible.
      Signed-off-by: NJean Delvare <jdelvare@suse.de>
      Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
      Cc: Jiri Slaby <jslaby@suse.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f1e8c710
    • A
      serial: 8250_port: Remove dangerous pr_debug() · 699a11ba
      Alexey Brodkin 提交于
      With CONFIG_DYNAMIC_DEBUG if dyndbg enables debug output in
      8250_port.c deadlock happens inevitably on UART IRQ handling.
      
      That's the problematic execution path:
      ---------------------------->8------------------------
      UART IRQ:
        serial8250_interrupt() ->
          serial8250_handle_irq(): lock "port->lock" ->
            pr_debug() ->
              serial8250_console_write(): bump in locked "port->lock".
      
            OR (if above pr_debug() gets removed):
            serial8250_tx_chars() ->
              pr_debug() ->
                serial8250_console_write(): bump in locked "port->lock".
      ---------------------------->8------------------------
      
      So let's get rid of those not that much useful debug entries.
      
      Discussed problem could be easily reproduced with QEMU for x86_64.
      As well as this fix could be mimicked with muting of dynamic debug for
      the problematic lines as simple as:
      ---------------------------->8------------------------
      dyndbg="+p; file 8250_port.c line 1756 -p; file 8250_port.c line 1822 -p"
      ---------------------------->8------------------------
      Signed-off-by: NAlexey Brodkin <abrodkin@synopsys.com>
      Cc: Jiri Slaby <jslaby@suse.com>
      Cc: Peter Hurley <peter@hurleysoftware.com>
      Cc: Phillip Raffeck <phillip.raffeck@fau.de>
      Cc: Anton Wuerfel <anton.wuerfel@fau.de>
      Cc: "Matwey V. Kornilov" <matwey@sai.msu.ru>
      Cc: Yegor Yefremov <yegorslists@googlemail.com>
      Cc: Thor Thayer <tthayer@opensource.altera.com>
      Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      699a11ba
    • C
      tty: goldfish: Fix a parameter of a call to free_irq · 1a5c2d1d
      Christophe JAILLET 提交于
      'request_irq()' and 'free_irq()' should be called with the same dev_id.
      Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      1a5c2d1d
    • F
      serial: imx: Allow passing 'rst-gpios' for rs485 mode · 7b7e8e8e
      Fabio Estevam 提交于
      According to Documentation/devicetree/bindings/serial/serial.txt the
      generic 'rts-gpios' property can be used to specify the GPIO for RTS
      functionality.
      
      Currently it is not possible to use the imx UART port in rs485 mode when
      the 'rts-gpios' property is passed in the device tree.
      
      The imx uart driver only checks for the presence of the built-in RTS pin,
      via 'uart-has-rtscts' property and disable the rs485 flag if this property
      is absent.
      
      So fix this logic by also checking if RTS pin has been passed via GPIO.
      
      Tested on a imx6dl based board.
      Signed-off-by: NFabio Estevam <fabio.estevam@nxp.com>
      Tested-by: NClemens Gruber <clemens.gruber@pqgruber.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      7b7e8e8e
    • A
      serial: 8250_lpss: avoid potential kernel crash when remove · 3f080878
      Andy Shevchenko 提交于
      This is a follow up to the commit a9b01b58 ("serial: 8250_mid fix calltrace
      when hotplug 8250 serial controller") in which the kernel crash was described
      for another 8250 based driver. It appears that we have the very same issue in
      8250_lpss. Fix it by unregistering serial driver first.
      
      Cc: Liwei Song <liwei.song@windriver.com>
      Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Reviewed-by: NBryan O'Donoghue <pure.logic@nexus-software.ie>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      3f080878