summaryrefslogtreecommitdiffstats
path: root/drivers/serial
Commit message (Collapse)AuthorAgeFilesLines
* serial S3: fix local structure mallocJuergen Beisert2012-03-131-1/+1
| | | | | | | | | Patch 2c5404651091e985c9009aa417d80fdaf50d7a68 introduces a private structure for the S3C based UARTs but still reserves the memory for the smaller structure which fails at runtime. Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* drivers/serial: trivial regression fixRobert Jarzmik2012-02-291-1/+1
| | | | | | | | Fix commit "serial pxa: fix unregister", which forgot a semicolon, breaking serial_pxa compilation. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* serial s3c: add a driver private structSascha Hauer2012-02-251-19/+28
| | | | | | | Do not use dev->priv as a register base, but use a driver private struct instead. Also, remove usage of dev->type_data Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* serial stm: fix unregisterSascha Hauer2012-02-251-3/+6
| | | | | | | - Add missing console_unregister call - use dev->priv instead of dev->type_data Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* serial imx: fix unregisterSascha Hauer2012-02-251-3/+5
| | | | | | | - Add missing console_unregister call - use dev->priv instead of dev->type_data Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* serial pxa: fix unregisterSascha Hauer2012-02-251-2/+5
| | | | | | | - Add missing console_unregister call - use dev->priv instead of dev->type_data Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* serial drivers: remove unused type_dataSascha Hauer2012-02-2511-12/+1
| | | | | | | Several serial drivers set the type_data field without ever using it, so just remove it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ns16550: fix ier selectionAntony Pavlov2012-01-191-0/+2
| | | | | | | | | | | | | | The document "PC16550D Universal Asynchronous Receiver Transmitter with FIFOs" (vers. June 1995, http://www.national.com/ds/PC/PC16550D.pdf) states that IER (Interrupt Enable Register) is accessible if the bit DLAB = 0 (DLAB is bit 7 in LCR; in barebox DLAB known as LCR_BKSE). So before IER access we need set DLAB to 0. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ns16550: write zero to ier only onceAntony Pavlov2012-01-191-1/+0
| | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ns16550: make ns16550_serial_init_port() shorterAntony Pavlov2012-01-191-17/+3
| | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ns16550: support for UART with broken FIFOAntony Pavlov2012-01-191-2/+16
| | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* serial: drop non used at91rm9200 driverJean-Christophe PLAGNIOL-VILLARD2012-01-061-110/+0
| | | | | | | we use atmel driver now Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* MACH SAMSUNG/S3C: Unify the UART driver for the S3C family of CPUsJuergen Beisert2012-01-023-32/+48
| | | | | | | | The UART is one of the units which differs only slightly inside the S3C family. Prepare this driver to share it with more recent CPUs. Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* MACH SAMSUNG/S3C: Separate S3C24XX clock managementJuergen Beisert2012-01-021-1/+1
| | | | | | | | | | There are major differences in the clock tree of the S3C24xx family and the more recent CPUs of the S3C family. Keep the S3C24XX clock routines separate to avoid an ifdef hell. But also use generic function names to be able to share drivers among the S3C family. Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* MACH SAMSUNG/S3C: Make it more generic for future updatesJuergen Beisert2012-01-021-2/+2
| | | | | | | Start with renaming files to share them in the S3C CPU family, Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* uart drivers: use xzalloc instead of xmallocSascha Hauer2011-12-239-9/+9
| | | | | | | | | | | | | | | | | | | The flags in struct console_device have to be initialized to zero. Otherwise the following can happen: - console_register sets the initial baudrate of a new console before we set the global console init state to CONSOLE_INIT_FULL. - In console_baudrate_set we test whether the current console is active which may be true because of unitialized flags. - we then call getc() to wait for the user to accept the new settings and we are stuck because of the CONSOLE_UNINITIALIZED state we will never get anything from getc(). Looking back this explains some cases for me when barebox refused to start and I really wonder why this did not become a more visible problem before. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* arm/mach-pxa: Initial Intel/Marvell PXA supportMarc Kleine-Budde2011-12-053-0/+206
| | | | | | | | | | | | The core support was brought by Marc and Sascha. The cache choice was fixed by Luotao Fu. Some gpio and devices addons were provided by Robert. Signed-off-by: Luotao Fu <l.fu@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* S3C24XX: Fix wrong RTS behaviourJuergen Beisert2011-11-271-0/+2
| | | | | | | Enabling AUTOSYNC means enabling the auto sync feature, not rising the RTS Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* remove EARLY_INIT and EARLY_CONSOLE supportSascha Hauer2011-09-271-25/+0
| | | | | | Bitrotted over time and nearly unused, so remove it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* introduce io.hSascha Hauer2011-09-2212-12/+12
| | | | | | | To allow for some generic io accessors introduce io.h and use this instead of asm/io.h throughout the tree. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* arm_dcc: fix missing switch to resourceJean-Christophe PLAGNIOL-VILLARD2011-08-101-1/+0
| | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* at91: swtich to clkdevJean-Christophe PLAGNIOL-VILLARD2011-08-101-1/+1
| | | | | | | | | | | | | | this will also fix the clock support as we now switch to allocated generic device as we can need to associate the clock and the device but the driver is probe before the association we also change the atmel serial name to "atmel_usart" to simplify sharing with linux Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* serial_ns16550: drop the non working checkJean-Christophe PLAGNIOL-VILLARD2011-08-041-3/+0
| | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ns16550: switch to resourceJean-Christophe PLAGNIOL-VILLARD2011-08-011-37/+89
| | | | | | | use generic read/write depending on the memory size if no reg_read/write defined Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* ns16550: if not specific f_caps defined use default stdin, stdout, stderrJean-Christophe PLAGNIOL-VILLARD2011-07-301-1/+4
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* ARM: add support for the i.MX53Marc Kleine-Budde2011-07-291-1/+2
| | | | | Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* serial mpc5xxx: get rid of map_baseSascha Hauer2011-07-281-5/+6
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* serial stm: get rid of map_baseSascha Hauer2011-07-281-46/+48
| | | | | | | | While at it, dynamically allocate private driver struct. There might be only a single instance of this driver, but don't be a bad example for others. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* serial pl010: get rid of map_baseSascha Hauer2011-07-281-5/+6
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* serial s3c: get rid of map_baseSascha Hauer2011-07-281-12/+19
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* serial netx: get rid of map_baseSascha Hauer2011-07-281-18/+19
| | | | | | While at it, switch to standard readl/writel accessors Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* nios2/altera_serial_jtag: Switch to resourcesFranck Jullien2011-07-271-4/+23
| | | | | Signed-off-by: Franck Jullien <franck.jullien@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* nios2/serial_altera: Switch to resourcesFranck Jullien2011-07-271-5/+26
| | | | | Signed-off-by: Franck Jullien <franck.jullien@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* DRIVER_SERIAL_LINUX_CONSOLE: fix misprintAntony Pavlov2011-07-252-2/+2
| | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* amba-pl011: switch to dev_request_mem_regionJean-Christophe PLAGNIOL-VILLARD2011-07-201-1/+1
| | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* amba-pl011: fix missing switch to "struct resource"Jean-Christophe PLAGNIOL-VILLARD2011-07-201-2/+2
| | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* atmel/drivers: switch to dev_request_mem_regionJean-Christophe PLAGNIOL-VILLARD2011-07-201-1/+1
| | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* serial i.MX: convert to struct resourceSascha Hauer2011-07-191-1/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* amba-pl011: switch to "struct resource"Jean-Christophe PLAGNIOL-VILLARD2011-07-181-13/+15
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* at91/serial: switch to "struct resource"Jean-Christophe PLAGNIOL-VILLARD2011-07-181-13/+14
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* serial_ns16550: remove legacy code copied from U-Boot v1Antony Pavlov2011-07-172-23/+0
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Add Altera JTAG UART driverFranck Jullien2011-06-103-0/+107
| | | | | | | | | Add Altera JTAG UART driver I removed the CONFIG_ALTERA_JTAG_UART_BYPASS. Signed-off-by: Franck Jullien <franck.jullien@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* serial 16550: use xzallocSascha Hauer2011-04-111-3/+1
| | | | | | | No need to check for the result and increases the chance that we build a binary without the rarely used calloc function. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Nios2: Add Altera UART driverFranck JULLIEN2011-04-083-1/+102
| | | | | | | | This patch adds Altera UART driver. Kconfig and Makefile are updated to include this new driver. Signed-off-by: Franck JULLIEN <franck.jullien@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: rename STM arch to mxsSascha Hauer2011-01-201-1/+1
| | | | | | | | We never supported the sigmatel stm chips and probably never will. So do the first step and rename the architecture to mxs just like in the kernel. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Fix error handling with malloc, memalign etc. Introduce xmemalign().Krzysztof Halasa2011-01-077-10/+7
| | | | | | | | | | | | | | The idea is to panic() when there is no memory available for normal operation. Exception: code which can consume arbitrary amount of RAM (example: files allocated in ramfs) must report error instead of panic(). This patch also fixes code which didn't check for NULL from malloc() etc. Usage: malloc(), memalign() return NULL when out of RAM. xmalloc(), xmemalign() always return non-NULL or panic(). Signed-off-by: Krzysztof HaƂasa <khc@pm.waw.pl> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* STM378x: Adapt the serial driver to support i.MX23 and i.MX28Juergen Beisert2010-12-141-1/+1
| | | | | Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* STM378x: Do not configure any pin usage in the driverJuergen Beisert2010-12-141-7/+0
| | | | | | | | Only the platform should configure pins to be used by the driver. The driver must work independently from the settings. Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* STM378x: Use Hz as the clock unit like in all other archJuergen Beisert2010-12-141-1/+1
| | | | | | | | | | i.MX23 currently uses kHz as the unit for its clock handling and calculation to avoid overflows when calculation with the internal 480 MHz PLL and its fractional divider. This patch changes all routines to accept Hz and deliver Hz as the clock unit. Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* serial_s3c24x0: Add missing brackets.Marek Belisko2010-11-171-1/+1
| | | | | | | | | Fucntion s3c24x0_serial_flush() could behave wrong because of missing brackets. Correct condition logic. Problem found by sparse. Signed-off-by: Marek Belisko <marek.belisko@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>