aboutsummaryrefslogtreecommitdiff
path: root/payloads/libpayload/drivers/serial
AgeCommit message (Collapse)Author
2015-03-13libpayload: ipq808x: stale interrupt shall not be cleared unconditionallyYogesh Lal
The serial driver hangs in cases when FIFO has more than single word to be processed. Easiest way to reproduce is to paste a string of greater than 4 characters in cli. Clearing the RXSTALE interrupt without draining all the characters from FIFO leads to the issue as the driver is dependent on msm_boot_uart_dm_read function to reinitialize for next transfer. Logically the driver is organized in such a manner that next transfer never gets initiated till rx_data_read < total_rx_data. Clearing the RXSTALE without consideration of total number of characters (or words) unprocessed makes the msm_boot_uart_dm_read to return on the first if conditional. Thus the driver is stuck forever. A quick fix is to avoid clearing the stale interrupt. Reset is handled whenever a new transfer is initialized in msm_boot_uart_dm_init_rx_transfer. BUG=chrome-os-partner:29542 TEST=manual -Paste a string greater than 4 characters in cli. Original-Change-Id: I016afb01a77cd14764f0176f6bf144fb29796c2f Original-Signed-off-by: Yogesh Lal <ylal@codeaurora.org> Original-Reviewed-on: https://chromium-review.googlesource.com/209512 Original-Reviewed-by: Vadim Bendebury <vbendeb@chromium.org> Original-Commit-Queue: Vadim Bendebury <vbendeb@chromium.org> Original-Tested-by: Vadim Bendebury <vbendeb@chromium.org> (cherry picked from commit 61528884ad2c0a8e146054bbfeb01a3bc73b9692) Signed-off-by: Marc Jones <marc.jones@se-eng.com> Change-Id: I936af5daa52a25f62133bdf9fb44f0b68cf34e88 Reviewed-on: http://review.coreboot.org/8667 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-01-12libpayload: Add Rock Chip drivershuang lin
Add support: 1)Support driver rktimer 2)Support driver rkserial BUG=chrome-os-partner:29778 TEST=emerge-veyron libpayload Original-Change-Id: I2cccedf3b62883dd372842a7972e93f2ebbfb282 Original-Signed-off-by: huang lin <hl@rock-chips.com> Original-Reviewed-on: https://chromium-review.googlesource.com/206184 Original-Reviewed-by: Julius Werner <jwerner@chromium.org> Original-Tested-by: Julius Werner <jwerner@chromium.org> Original-Commit-Queue: Julius Werner <jwerner@chromium.org> (cherry picked from commit 387450d7c36b201bd177d46eb9f1d280fc043aab) Signed-off-by: Marc Jones <marc.jones@se-eng.com> Change-Id: Ia6b7a8ee2439a6f2bf7577df822d3f4f3a1e441c Reviewed-on: http://review.coreboot.org/8127 Tested-by: build bot (Jenkins) Reviewed-by: David Hendricks <dhendrix@chromium.org>
2015-01-09libpayload: Fix baseaddr access in serial/tegra.cFurquan Shaikh
Fix baseaddr typecast to allow use in 32- and 64-bit systems BUG=None BRANCH=None TEST=Compiles successfully for rush Original-Change-Id: Ie5ded744d75a0ae4d1428d04ff2478bdfe54d146 Original-Signed-off-by: Furquan Shaikh <furquan@google.com> Original-Reviewed-on: https://chromium-review.googlesource.com/204424 Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org> Original-Commit-Queue: Furquan Shaikh <furquan@chromium.org> Original-Tested-by: Furquan Shaikh <furquan@chromium.org> (cherry picked from commit b56814fe5fc7d3a2fdfb324d4baafb27a9d3ffd6) Signed-off-by: Marc Jones <marc.jones@se-eng.com> Change-Id: Icedc1c819e39b92a0dd92e98f848e15b3039dfbe Reviewed-on: http://review.coreboot.org/8123 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-01-06libpayload: ipq808x: introduce uart driverVadim Bendebury
This adds a UART driver for the ipq8064 controller. It still does not quite work in the receive direction - the receive FIFO returns read data in 32 bit chunks, which means that 4 keys need to be pressed before a character pops out of the driver (and it reports it as a single character). This issue is being addressed separately, the driver is being checked in to facilitate concurrent development. BUG=chrome-os-partner:27784, chrome-os-partner:29313 TEST=with deptcharge modifications in place, the AP148 board comes up to the depthcharge prompt: Starting depthcharge on storm... Original-Change-Id: Ief2cfcca73494be5c4147881144470078adcefb8 Original-Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Original-Reviewed-on: https://chromium-review.googlesource.com/202045 Original-Reviewed-by: Deepa Dinamani <deepad@codeaurora.org> Original-Reviewed-by: Stefan Reinauer <reinauer@chromium.org> (cherry picked from commit 4499318fb9a4e663c504d7c41380ccf2aa89da29) Signed-off-by: Marc Jones <marc.jones@se-eng.com> Change-Id: I3e07d7568c20c0e570222971ff219de3a6d9b7cc Reviewed-on: http://review.coreboot.org/8061 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2014-12-22libpayload: console: Allow output drivers to print whole strings at onceJulius Werner
The console output driver framework in libpayload is currently built on the putchar primitive, meaning that every driver's function gets called one character at a time. This becomes an issue when we add drivers that could output multiple characters at a time, but have a high constant overhead per invocation (such as the planned GDB stub, which needs to wrap a special frame around output strings and wait for an acknowledgement from the server). This patch adds a new 'write' function pointer to the console_output_driver structure as an alternative to 'putchar'. Output drivers need to provide at least one of the two ('write' is preferred if available). The CBMEM console driver is ported as a proof of concept (since it's our most performace-critical driver and should in theory benefit the most from less function pointer invocations, although it's probably still negligible compared to the big sprawling mess that is printf()). Even with this fix, the problem remains that printf() was written with the putchar primitive in mind. Even though normal text already contains an optimization to allow multiple characters at a time, almost all formatting directives cause their output (including things like padding whitespace) to be putchar()ed one character at a time. Therefore, this patch reworks parts of the output code (especially number printing) to all but remove that inefficiency (directives still invoke an extra write() call, but at least not one per character). Since I'm touching printf() core code anyway, I also tried to salvage what I could from that weird, broken "return negative on error" code path (not that any of our current output drivers can trigger it anyway). A final consequence of this patch is that the responsibility to prepend line feeds with carriage returns is moved into the output driver implementations. Doing this only makes sense for drivers with explicit cursor position control (i.e. serial or video), and things like the CBMEM console that appears like a normal file to the system really have no business containing carriage returns (we don't want people to accidentally associate us with Windows, now, do we?). BUG=chrome-os-partner:18390 TEST=Made sure video and CBMEM console still look good, tried printf() with as many weird edge-case strings as I could find and compared serial output as well as sprintf() return value. Original-Change-Id: Ie05ae489332a0103461620f5348774b6d4afd91a Original-Signed-off-by: Julius Werner <jwerner@chromium.org> Original-Reviewed-on: https://chromium-review.googlesource.com/196384 Original-Reviewed-by: Hung-Te Lin <hungte@chromium.org> Original-Reviewed-by: David Hendricks <dhendrix@chromium.org> (cherry picked from commit ab1ef0c07736fe1aa3e0baaf02d258731e6856c0) Signed-off-by: Marc Jones <marc.jones@se-eng.com> Change-Id: I78f5aedf6d0c3665924995cdab691ee0162de404 Reviewed-on: http://review.coreboot.org/7880 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2014-11-09libpayload: serial: Move the depthcharge serial drivers into libpayload.Gabe Black
These drivers need to be ready right away and never really fit into the depthcharge driver model anyway. CQ-DEPEND=CL:194063 BUG=None TEST=Built and booted on nyan and peach_pit. Built for nyan_big, nyan_blaze, and daisy. BRANCH=None Original-Change-Id: I9570dee53c57d42ef4cd956f66a878ce39a2dc20 Original-Signed-off-by: Gabe Black <gabeblack@google.com> Original-Reviewed-on: https://chromium-review.googlesource.com/194057 Original-Reviewed-by: Gabe Black <gabeblack@chromium.org> Original-Commit-Queue: Gabe Black <gabeblack@chromium.org> Original-Tested-by: Gabe Black <gabeblack@chromium.org> (cherry picked from commit 26e18f680c93fc990a3d1057c164f19859634a9f) Signed-off-by: Marc Jones <marc.jones@se-eng.com> Change-Id: Ia2233e2bd821d8de8d2d57a9423aeb74be7efd93 Reviewed-on: http://review.coreboot.org/7224 Reviewed-by: Patrick Georgi <pgeorgi@google.com> Tested-by: build bot (Jenkins)