summaryrefslogtreecommitdiffstats
path: root/drivers/serial
Commit message (Collapse)AuthorAgeFilesLines
* serial Samsung: add the S3C64xx requirementsJuergen Beisert2012-08-012-1/+4
| | | | | Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/samsung'Sascha Hauer2012-08-012-33/+42
|\ | | | | | | | | | | | | Conflicts: arch/arm/Makefile arch/arm/mach-samsung/Makefile arch/arm/mach-samsung/include/mach/s5pcxx-iomap.h
| * Samsung/serial: make the clock source configureableJuergen Beisert2012-07-251-6/+12
| | | | | | | | | | | | | | | | | | Instead of taking the value from somewhere, use the selected architecture to select one. This ensures the selected clock source corresponds to the values setup in the clocks-*.c from the mach directory. Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * Samsung/serial: unify UCON register settingsJuergen Beisert2012-07-251-3/+7
| | | | | | | | | | | | | | | | | | This should work on S3C24XX and S3C64XX SoCs. Tested at runtime on a Mini2440 and Mini6410. Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * Samsung/serial: move the decision about an improved UART into KconfigJuergen Beisert2012-07-252-8/+12
| | | | | | | | | | | | | | More or less just cosmetic (removing ifdefs!). Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * Samsung/serial: there is no need to ifdef the slot tableJuergen Beisert2012-07-251-2/+0
| | | | | | | | | | | | | | | | | | The '__maybe_unused' attribute prevents the compiler from warning about an unused variable and the 'static' will remove it entirely if it's not used. This patch is only cosmetic. Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * Samsung/serial: there is no need to ifdef these register definesJuergen Beisert2012-07-251-6/+2
| | | | | | | | | | Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * Samsung/serial: make the code more readableJuergen Beisert2012-07-251-3/+5
| | | | | | | | | | | | | | This bit magic is just setting and reading the UART's selected clock source. Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * Samsung/serial: remove more ugly ifdef linesJuergen Beisert2012-07-251-5/+4
| | | | | | | | | | | | | | | | More or less just cosmetic. Easier to read, and lets the compiler remove unused code. Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | serial_ns16550: change the driver's nameAntony Pavlov2012-07-201-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | The name "serial_ns16550" is not handy because the devices will have the names like "serial_ns165500", "serial_ns165501", "serial_ns165502" etc. The names like "ns16550_serial0" and "ns16550_serial1" look much better. Also it is reasonable to make serial driver's names unification. E.g. see the names for drivers in drivers/serial directory: "netx_serial", "mpc5xxx_serial", "altera_serial", "s3c_serial", "imx_serial", "pxa_serial", "blackfin_serial", "stm_serial", "pl010_serial", and even "g_serial" in ./drivers/usb/gadget/serial.c Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Support most Samsung SoCs in S3C serial driverAlexey Galakhov2012-05-142-18/+39
| | | | | | | | | | | | | | | | Ok, I assume this should go into separate series. It fits both S5PV210 and S3C6410. This adds support for S3C and S5P architectures (all of my knowledge) to the serial driver. Since the only difference between them is in clock handling, this is moved to an arch-dependent separate function. Most modern architectures should define S3C_UART_HAS_UBRDIVSLOT and S3C_UART_HAS_UINTM. This adds support for most Signed-off-by: Alexey Galakhov <agalakhov@gmail.com> Signed-off-by: Juergen Beisewrt <kernel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* netX: UART may not initialize correctly.Michael Trensch2012-04-301-6/+5
| | | | | | | | | | | The netX internal UART latches register settings and internally uses them only if written in the correct order. Other orders may work, but sometimes the UART gets stuck, as the baudrate has not correctly been set. Signed-off-by: Michael Trensch <MTrensch@gmail.com> Acked-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'pu/mx6-v2' into nextSascha Hauer2012-04-241-1/+1
|\ | | | | | | | | | | | | | | Conflicts: arch/arm/Makefile arch/arm/mach-imx/Kconfig Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * serial i.MX: i.MX6 supportSascha Hauer2012-04-241-1/+1
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Use DEVICE_ID_DYNAMIC where applicableSascha Hauer2012-04-161-1/+1
|/ | | | | | | We now have DEVICE_ID_DYNAMIC for dynamic allocation of device ids, Use it where applicable. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* 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>