- 07 9月, 2012 15 次提交
-
-
由 Ruchika Kharwar 提交于
This patch unlocks the port lock before calling a serial_core API and re-acquires the port lock after calling it. This patch fixes a system freeze issue seen when the serial_core API uart_write_wakeup() eventually attempts to acquire the port lock already acquired by omap serial interrupt handler. Tested-by: NShubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: NRuchika Kharwar <ruchika@ti.com> Signed-off-by: NPavan Savoy <pavan_savoy@ti.com> Signed-off-by: NVijay Badawadagi <bvijay@ti.com> Signed-off-by: NFelipe Balbi <balbi@ti.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Felipe Balbi 提交于
it makes no sense to mark our IRQ handler inline since it's passed as a function pointer when enabling the IRQ line. Tested-by: NShubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: NFelipe Balbi <balbi@ti.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Felipe Balbi 提交于
Two functions: omap_serial_fill_features_erratas() and of_get_uart_port_info() are only called from probe(). Marking them as __devinit gives us another oportunity to free some code after .init.text is done. Tested-by: NShubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: NRuchika Kharwar <ruchika@ti.com> Signed-off-by: NFelipe Balbi <balbi@ti.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Ruchika Kharwar 提交于
pm_runtime_enable() needs to be invoked before pm_runtime_use_autosuspend(), and pm_runtime_set_autosuspend_delay() functions. Tested-by: NShubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: NNishanth Menon <nm@ti.com> Signed-off-by: NRuchika Kharwar <ruchika@ti.com> Signed-off-by: NFelipe Balbi <balbi@ti.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Felipe Balbi 提交于
When we're running our hardirq handler, there's not need to disable IRQs with spin_lock_irqsave() because IRQs are already disabled. It also makes no difference if we save or not IRQ flags. Switch over to simple spin_lock/spin_unlock and drop the "flags" variable. Tested-by: NShubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: NFelipe Balbi <balbi@ti.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Felipe Balbi 提交于
before removing the driver, let's make sure to force device into a suspended state in order to conserve power. Tested-by: NShubhrajyoti D <shubhrajyoti@ti.com> Acked-by: NSantosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: NFelipe Balbi <balbi@ti.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Felipe Balbi 提交于
if platform_get_drvdata() returns NULL, that's quite a nasty bug on the driver which we want to catch ASAP. Otherwise, that check is hugely unneeded. Tested-by: NShubhrajyoti D <shubhrajyoti@ti.com> Acked-by: NSantosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: NFelipe Balbi <balbi@ti.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Felipe Balbi 提交于
by the time we call our first pm_runtme_get_sync() after enable pm_runtime, our resume method might be called. To avoid problems, we must make sure that our dev->drvdata is set correctly before our resume method gets called. Tested-by: NShubhrajyoti D <shubhrajyoti@ti.com> Acked-by: NSantosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: NFelipe Balbi <balbi@ti.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Felipe Balbi 提交于
Everytime we're done using our TTY, we want the pm timer to be reinitilized. By sticking to pm_runtime_pm_autosuspend() we make sure that this will always be the case. The idea behind this patch is to make sure we will always reinitialize the pm timer so that we don't fall into a situation where pm_runtime_put() expires right away (if timer was already about to expire when we made the call to pm_runtime_put()). While suspending right away wouldn't cause any issues, reinitializing the pm timer can help us avoiding unnecessary context save & restore operations (which are somewhat expensive) if there's another read/write/set_termios request coming right after. IOW, we are trying to make sure UART is still powered up while it's still under heavy usage. Tested-by: NShubhrajyoti D <shubhrajyoti@ti.com> Acked-by: NSantosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: NFelipe Balbi <balbi@ti.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Felipe Balbi 提交于
since all other IRQ types now do all necessary checks inside their handlers, transmit_chars() was the only one left expecting serial_omap_irq() to check THRE for it. We can move THRE check to transmit_chars() in order to make serial_omap_irq() more uniform. Tested-by: NShubhrajyoti D <shubhrajyoti@ti.com> Acked-by: NSantosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: NFelipe Balbi <balbi@ti.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Felipe Balbi 提交于
receive_chars() was getting too big and too difficult to follow. By splitting it into separate RDI and RSLI handlers, we have smaller functions which are easy to understand and only touch the pieces which they need to touch. Tested-by: NShubhrajyoti D <shubhrajyoti@ti.com> Acked-by: NSantosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: NFelipe Balbi <balbi@ti.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Felipe Balbi 提交于
quite a few changes here, though they are pretty obvious. In summary we're making sure to detect which interrupt type we need to handle before calling the underlying interrupt handling procedure. Tested-by: NShubhrajyoti D <shubhrajyoti@ti.com> Acked-by: NSantosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: NFelipe Balbi <balbi@ti.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Felipe Balbi 提交于
OMAP has some extra Interrupt types which can be really useful for SW. Let's define them so we can later use those in OMAP's serial driver. Tested-by: NShubhrajyoti D <shubhrajyoti@ti.com> Acked-by: NSantosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: NFelipe Balbi <balbi@ti.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Felipe Balbi 提交于
The current support is known to be broken and a later patch will come re-adding it using dma engine API. Tested-by: NShubhrajyoti D <shubhrajyoti@ti.com> Acked-by: NSantosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: NFelipe Balbi <balbi@ti.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Felipe Balbi 提交于
The driver doesn't need to know about its platform_device. Everything the driver needs can be done through the struct device pointer. In case we need to use the OMAP-specific PM function pointers, those can make sure to find the device's platform_device pointer so they can find the struct omap_device through pdev->archdata field. Tested-by: NShubhrajyoti D <shubhrajyoti@ti.com> Acked-by: NSantosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: NFelipe Balbi <balbi@ti.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 06 9月, 2012 25 次提交
-
-
由 Alan Cox 提交于
These were reported in bugzilla long ago with a hack patch. Now we have a proper patch for one we can do the rest. Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=25102Signed-off-by: NAlan Cox <alan@linux.intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Wei Yongjun 提交于
ops has been allocated in this function and should be freed before leaving from the error handling cases. spatch with a semantic match is used to found this problem. (http://coccinelle.lip6.fr/) Signed-off-by: NWei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Huang Shijie 提交于
In most of the time, the driver needs to check if the cts flow control is enabled. But now, the driver checks the ASYNC_CTS_FLOW flag manually, which is not a grace way. So add a new wraper function to make the code tidy and clean. Signed-off-by: NHuang Shijie <shijie8@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Felipe Balbi 提交于
this patch is in preparation to a few other changes which will align on the prototype for function pointers passed through pdata. It also helps cleaning up the driver a little by agregating checks for pdata in a single location. Tested-by: NShubhrajyoti D <shubhrajyoti@ti.com> Acked-by: NSantosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: NFelipe Balbi <balbi@ti.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Felipe Balbi 提交于
current code only works because struct uart_port is the first member on the uart_omap_port structure. If, for whatever reason, someone puts another member as the first of the structure, that cast won't work anymore. In order to be safe, let's use a container_of() which, for now, gets optimized into a cast anyway. Tested-by: NShubhrajyoti D <shubhrajyoti@ti.com> Acked-by: NSantosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: NFelipe Balbi <balbi@ti.com> Acked-by: NTony Lindgren <tony@atomide.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Alexander Shiyan 提交于
This patch adds note about migration to driver SCCNXP in the code of driver SC26XX and in MIPS SNI board initialization with example. Signed-off-by: NAlexander Shiyan <shc_work@mail.ru> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Alexander Shiyan 提交于
This driver is a replacement for a SC26XX driver with a lot of improvements and new features. The main differences from the SC26XX driver: - Removed dependency on MIPS. Driver can be used on any platform. - Added support for SCC2681, SCC2691, SCC2692, SC28L91, SC28L92, SC28L202, SCC68681 and SCC68692 ICs. - Using devm_-related functions. - Improved error handling of serial port, improved FIFO handling. - Ability to load multiple instances of drivers. To avoid the possibility of regression, driver SC26XX left in the system to confirm the stability of the driver on platforms where it is being used. Signed-off-by: NAlexander Shiyan <shc_work@mail.ru> Acked-by: NAlan Cox <alan@linux.intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Guainluca Anzolin 提交于
To allow parport_serial to handle the card the same PCI ids are blacklisted in 8250_pci.c using the existing software blacklist mechanism. The blacklist array is also renamed because it now covers this new use case. Since the two serial ports are auto-detected as XScale instead of 16550A clones, we also add a quirk to 8250_pci.c to skip autodetection and set the correct port type. Signed-off-by: NGianluca Anzolin <gianluca@sottospazio.it> [Fold in fixes for the uart_8250 change] Signed-off-by: NAlan Cox <alan@linux.intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Sachin Kamat 提交于
Fixes the following errors and warnings: ERROR: trailing whitespace ERROR: return is not a function, parentheses are not required WARNING: suspect code indent for conditional statements (32, 36) Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org> Acked-by: NAlan Cox <alan@linux.intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Sachin Kamat 提交于
Silences checkpatch warnings regarding use of printks. Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org> Acked-by: NAlan Cox <alan@linux.intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Matthew Leach 提交于
If the order of UART nodes is changed in the device tree, then tty dev devices are attached to different serial ports causing the console to be directed to a different physical serial port. The "serial" aliases in the device tree should prevent this. This patch ensures that the UART driver creates tty devices that honour these aliases if a device tree is present. Acked-by: NLinus Walleij <linus.walleij@linaro.org> Reviewed-by: NWill Deacon <will.deacon@arm.com> Acked-by: NRob Herring <rob.herring@calxeda.com> Signed-off-by: NMatthew Leach <matthew.leach@arm.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Paul Gortmaker 提交于
This structure might have made sense many years ago, but at this point it is only used in one specific driver, and referenced in stale comments elsewhere. Rather than change the sunsu.c driver, simply move the struct to be within the exclusive domain of that driver, so it won't get inadvertently picked up and used by other serial drivers going forward. The comments referencing the now driver specific struct are updated accordingly. Note that 8250.c has a struct that is similar in usage, with the name serial8250_config; but is 100% independent and untouched here. Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com> Acked-by: NAlan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Paul Gortmaker 提交于
The addition of 8250-like entities continues to grow, while this driver has a snapshot of a select few common 8250 UARTs. So it has no need to grow with the new additions, since it calls out its own (largely historic) static list which does not grow. Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com> Acked-by: NAlan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Paul Gortmaker 提交于
The struct serial_uart_config is hardly used at all, and the use case like this one are somewhat needless. Remove the trivial usage so that we can remove serial_uart_config. Since the type field isn't really used at all, we also delete the initialization and references of it here as well. Cc: Hirokazu Takata <takata@linux-m32r.org> Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com> Acked-by: NAlan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Uwe Kleine-König 提交于
These error paths are used more often now after deep changes to the clock code and pinctrl is still new for imx. So help debugging and give clues in the boot log. Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Alan Cox 提交于
These are used with the tty_port flags which are tty generic so move the flags into a more sensible place. This then makes it possible to add helpers such as those suggested by Huang Shijie. Signed-off-by: NAlan Cox <alan@linux.intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Alan Cox 提交于
We want them split so that we can call them from setserial functionality where we copy to/from user space and do the locking, but also from sysfs where in future we'll want to came them within a sysfs context. Signed-off-by: NAlan Cox <alan@linux.intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Julia Lawall 提交于
devm free functions should not have to be explicitly used. A semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ @@ ( * devm_kfree(...); | * devm_free_irq(...); | * devm_iounmap(...); | * devm_release_region(...); | * devm_release_mem_region(...); ) // </smpl> Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Wolfram Sang 提交于
Tested on a custom MPC5200B-board using some fancy industrial protocol. Verified that MPC512x has identical bits, so should work there as well. Signed-off-by: NWolfram Sang <w.sang@pengutronix.de> Acked-by: NAnatolij Gustschin <agust@denx.de> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Wanlong Gao 提交于
At commit 07d106d0, Linus pointed out that ENOIOCTLCMD should be translated as ENOTTY to user mode. For example: fd = open("/dev/tty", O_RDWR); ioctl(fd, -1, &argp); then the errno should be ENOTTY but not EINVAL. Signed-off-by: NWanlong Gao <gaowanlong@cn.fujitsu.com> Acked-by: NAlan Cox <alan@linux.intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Emil Goode 提交于
There is no reason to explicitly call devm_kfree in probe or remove functions. Signed-off-by: NEmil Goode <emilgoode@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Emil Goode 提交于
The gpiochip_remove function may fail to remove a gpio_chip if any GPIOs are still requested. This patch informs the caller of such a senario. Sparse is warning because the function prototype has a __must_check annotation. Sparse warning: drivers/tty/serial/max310x.c:1223:18: warning: ignoring return value of ‘gpiochip_remove’, declared with attribute warn_unused_result [-Wunused-result] Signed-off-by: NEmil Goode <emilgoode@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Tobias Klauser 提交于
Use the wrapper functions, so we can directly pass a struct platfrom_device. Signed-off-by: NTobias Klauser <tklauser@distanz.ch> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Devendra Naga 提交于
the driver's module init and exit functions can be replaced with module_spi_driver as they do only spi_register_driver and spi_unregister_driver in module's init and exit paths. Signed-off-by: NDevendra Naga <develkernel412222@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Julia Lawall 提交于
Clk_prepare_enable and clk_disable_unprepare combine clk_prepare and clk_enable, and clk_disable and clk_unprepare. The9 make the code more concise, and ensure that clk_unprepare is called when clk_enable fails. A simplified version of the semantic patch that introduces calls to these functions is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression e; @@ - clk_prepare(e); - clk_enable(e); + clk_prepare_enable(e); @@ expression e; @@ - clk_disable(e); - clk_unprepare(e); + clk_disable_unprepare(e); // </smpl> Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-