summaryrefslogtreecommitdiffstats
path: root/drivers/serial/amba-pl011.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-next/missing-prototypes'Sascha Hauer2019-01-151-1/+1
|\
| * serial: amba-pl011: fix "no previous prototype for 'pl011_init_port'" warningAntony Pavlov2019-01-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | The patch fixes the following compiler's warning: drivers/serial/amba-pl011.c:151:5: warning: no previous prototype for ‘pl011_init_port’ [-Wmissing-prototypes] int pl011_init_port (struct console_device *cdev) ^~~~~~~~~~~~~~~ Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | serial: amba-pl011: Fix regulator_get() return checkAndrey Smirnov2018-12-171-1/+1
|/ | | | | | | | | | | | NULL is used to designate a dummy regulator, so it it should be safe to use against regulator_enable(). Any value that would retrun true for IS_ERR(), OTOH, is not. Such value would also pass "if (r)" check without any problems. Fix the code to use !IS_ERR() instead. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* amba: pl011: add support for regulatorJean-Christophe PLAGNIOL-VILLARD2015-02-041-0/+11
| | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* serial: do not set default baudrate at initJean-Christophe PLAGNIOL-VILLARD2013-09-221-4/+0
| | | | | | | this will be done at activation Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* console: drop f_caps and check the function pointer getc/putc insteadJean-Christophe PLAGNIOL-VILLARD2013-09-211-1/+0
| | | | | | | | | | None of the driver make the difference between STDOUT and STDERR. So we just need to check if putc or getc are filled in the console_device save 32 bytes on versatilepb Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* amba: pl011: set RTS during initializationRob Herring2013-02-181-1/+1
| | | | | | | | | | | | RTS is an output. Either flow control is used and you care about the state or it is not used and you don't care. So setting it to active does no harm in either case. This is inline with what Linux does. Mandatory for Highbank as example Signed-off-by: Rob Herring <rob.herring@calxeda.com> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/remove-fsf-address'Sascha Hauer2012-10-031-4/+0
|\ | | | | | | | | | | Conflicts: drivers/net/miidev.c include/miidev.h
| * Treewide: remove address of the Free Software FoundationSascha Hauer2012-09-171-4/+0
| | | | | | | | | | | | | | The FSF address has changed in the past. Instead of updating it each time the address changes, just drop it completely treewide. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | amba-pl011: add st specific initJean-Christophe PLAGNIOL-VILLARD2012-09-111-2/+38
| | | | | | | | | | | | This is need on the new IP for ux500 Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* | amba-pl011: switch to amba busJean-Christophe PLAGNIOL-VILLARD2012-09-111-10/+24
|/ | | | | | switch as the same time the nomadik and versatile arch that use the driver. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* serial drivers: remove unused type_dataSascha Hauer2012-02-251-1/+0
| | | | | | | 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>
* uart drivers: use xzalloc instead of xmallocSascha Hauer2011-12-231-1/+1
| | | | | | | | | | | | | | | | | | | 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>
* introduce io.hSascha Hauer2011-09-221-1/+1
| | | | | | | 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>
* 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>
* amba-pl011: switch to "struct resource"Jean-Christophe PLAGNIOL-VILLARD2011-07-181-13/+15
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* Fix error handling with malloc, memalign etc. Introduce xmemalign().Krzysztof Halasa2011-01-071-2/+1
| | | | | | | | | | | | | | 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>
* amba-pl011: probe fail if we can't get the clockJean-Christophe PLAGNIOL-VILLARD2010-09-201-0/+4
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* amba: add pl011Jean-Christophe PLAGNIOL-VILLARD2010-08-061-0/+192
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Cc: Andrea GALLO <andrea.gallo@stericsson.com> Cc: Gael SALLES <gael.salles@stericsson.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>