summaryrefslogtreecommitdiffstats
path: root/drivers/serial
Commit message (Collapse)AuthorAgeFilesLines
...
* of: use 'const void *' for struct of_device_id.dataAntony Pavlov2015-04-303-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since 2011 barebox' of_device_id struct uses unsigned long type for data field: struct of_device_id { char *compatible; unsigned long data; }; Almost always struct of_device_id.data field are used as pointer and need 'unsigned long' casting. E.g. see 'git grep -A 4 of_device_id drivers/' output: drivers/ata/sata-imx.c:static __maybe_unused struct of_device_id imx_sata_dt_ids[] = { drivers/ata/sata-imx.c- { drivers/ata/sata-imx.c- .compatible = "fsl,imx6q-ahci", drivers/ata/sata-imx.c- .data = (unsigned long)&data_imx6, drivers/ata/sata-imx.c- }, { Here is of_device_id struct in linux kernel v4.0: struct of_device_id { char name[32]; char type[32]; char compatible[128]; const void *data; }; Changing of_device_id.data type to 'const void *data' will increase barebox' linux kernel compatibility and decrease number of 'unsigned long' casts. Part of the patch was done using the 'coccinelle' tool with the following semantic patch: @rule1@ identifier dev; identifier type; identifier func; @@ func(...) { <... - dev_get_drvdata(dev, (unsigned long *)&type) + dev_get_drvdata(dev, (const void **)&type) ...> } @rule2@ identifier dev; identifier type; identifier func; identifier data; @@ func(...) { <... - dev_get_drvdata(dev, (unsigned long *)&type->data) + dev_get_drvdata(dev, (const void **)&type->data) ...> } Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/raspberry-pi'Sascha Hauer2015-02-041-0/+11
|\
| * 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>
* | Merge branch 'for-next/mxs'Sascha Hauer2015-02-041-0/+9
|\ \
| * | serial: stm_serial: Add devicetree supportSascha Hauer2015-01-281-0/+9
| |/ | | | | | | | | | | | | | | | | | | This adds device tree support for the stm serial driver. This driver really is a AMBA primecell, so the amba-pl011 could be used. However, the current code tries to get the apb_pclk before the clocks are registered, so this does not work. Use the stm driver instead until a solution is found. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / console: allow to specify the device idJean-Christophe PLAGNIOL-VILLARD2015-01-131-1/+3
|/ | | | | | | so we can use dynamic number id with specific devname Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/mxs'Sascha Hauer2015-01-092-2/+0
|\
| * drivers: remove unnecessary mach/imx-regs.h includeSascha Hauer2015-01-052-2/+0
| | | | | | | | | | | | And replace the ones needed with the SoC specific header. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | driver: workaroud resource request that conflicts with errno PTRJean-Christophe PLAGNIOL-VILLARD2015-01-081-3/+3
|/ | | | | | | | | | | | | | | | broken since commit ed6e965824303255cacc1c1a195d3684caa26bce Author: Sascha Hauer <s.hauer@pengutronix.de> resource: Let dev_request_mem_region return an error pointer Introduce dev_request_mem_region_err_null only used on platform like at91 where the resource address conflicts with errno PTR. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* serial: i.MX: Use "per" clkSascha Hauer2014-11-271-1/+1
| | | | | | Which is the correct clock for the baud rate. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/tegra'Sascha Hauer2014-11-051-0/+12
|\
| * serial: ns16550: add Tegra supportLucas Stach2014-11-041-0/+11
| | | | | | | | | | Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * serial: ns16550: enable clock if availableLucas Stach2014-11-041-0/+1
| | | | | | | | | | Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | serial: ns16550: Remove unused fields from NS16550_plat structureAlexander Shiyan2014-11-031-4/+1
|/ | | | | Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* resource: Let request_ioport_region return an error pointerSascha Hauer2014-09-161-2/+2
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* resource: Let dev_request_mem_region return an error pointerSascha Hauer2014-09-167-2/+17
| | | | | | For all users fix or add the error check. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* resource: Let dev_get_mem_region return an error pointerSascha Hauer2014-09-161-0/+2
| | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
* resource: Let dev_get_resource return an error pointerSascha Hauer2014-09-161-4/+4
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* serial: imx: Fix for non-devicetree boardsPhilipp Zabel2014-09-051-3/+5
| | | | | | | | | | | Commit 3843bfd0ab77eaf125ca617922927b61fc8ded74 "serial: imx: Determine device name from device tree" broke this driver for non-devicetree boards, since of_alias_get may not be called with a NULL pointer as first argument. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/efi'Sascha Hauer2014-08-074-116/+493
|\ | | | | | | | | | | | | Conflicts: .gitignore Makefile drivers/serial/Makefile
| * serial: Add EFI stdio driverSascha Hauer2014-07-163-0/+372
| | | | | | | | | | | | | | | | | | This adds a driver which uses the EFI stdin/stdout interfaces to implement a barebox console. Keyboard input should be fairly complete, but not all vt100 needed by barebox work properly. The clear-to-eol escape is missing causing garbled output in the editor. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * serial: ns16550: Add register read/write function pointers to private dataSascha Hauer2014-07-141-114/+120
| | | | | | | | | | | | | | Makes the code a bit cleaner. This also avoids casting from a pointer to a 32bit integer which may produce compiler warnings. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * serial: ns16550: Add mmiobase to private dataSascha Hauer2014-07-141-9/+8
| | | | | | | | | | | | | | We have a private data struct, so use it for storing the base address instead of abusing the dev->priv field. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/console'Sascha Hauer2014-08-071-0/+4
|\ \
| * | serial: imx: Determine device name from device treeSascha Hauer2014-07-111-0/+4
| |/ | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / serial: add driver for Canon DIGIC UARTAntony Pavlov2014-07-293-0/+137
|/ | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* serial: imx: Fix buggy transmissions when baudrate mismatchesFabio Estevam2014-06-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bit 7 of UCR3 is described in the i.MX reference manuals (with the exception of i.MX1) as follows: ADNIMP: Autobaud Detection Not Improved-. Disables new features of autobaud detection (See Baud Rate Automatic Detection Protocol, for more details). 0 Autobaud detection new features selected 1 Keep old autobaud detection mechanism The "new features" mechanism occasionally causes the receiver to get out of sync and continuously produces received characters of '0xff'. In order to reproduce the problem: $ cs0.baudrate=19200 - Change the terminal baudrate to 19200 - Type in the console and it should look good - Change the terminal baudrate back to 115200 - Type 'b' in the console, then a stream of '0xff' is transmitted in loop Setting the ADNIMP bit avoids the transmission of '0xff' in loop. Also rename the bit definition as per the reference manual. Tested on mx6q. Based on a patch from Eric Nelson for U-boot. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/ioresource'Sascha Hauer2014-05-051-16/+107
|\
| * x86: ns16550: Rework driver to allow for x86 I/O spaceMichel Stam2014-04-091-16/+107
| | | | | | | | | | | | | | | | | | | | | | | | The current implementation fakes a memory-mapped I/O device at 0x3f8 and 0x2f8, then uses platform read/write functions to do the actual reading and writing. These platform functions only exist for the x86 platform; better to move the I/O routines into the driver and have the driver request I/O ports using request_ioport_region. Signed-off-by: Michel Stam <michel@reverze.net> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | serial: ns16550: omap: set register shift from codeSascha Hauer2014-04-281-0/+4
|/ | | | | | | | The upstream dts files do not contain the register shift. As we have Omap specific init code anyway we can just set the register shift from there instead of relying on the devicetree properties. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* serial: add Atheros AR933x driverAntony Pavlov2014-03-284-0/+281
| | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* serial: ns16550: add compatible entry for "ingenic,jz4740-uart"Antony Pavlov2014-03-261-0/+20
| | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* serial: ns16550: add compatible entry for "ns16450"Antony Pavlov2014-03-261-0/+16
| | | | | | | "ns16450" uses the same code as "ns16550a" but with FIFO disabled. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* serial: ns16550: make FCR setup value part of struct ns16550_privAntony Pavlov2014-03-261-6/+7
| | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* serial: ns16550: fix whitespacesAntony Pavlov2014-03-261-1/+1
| | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2014-02-032-0/+4
|\
| * console: Set Linux console parameter automaticallySascha Hauer2014-01-222-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Linux specifies the linux,stdout-path property in the /chosen node in the devicetree. Unfortunately this is ignored in most cases. For cases in which barebox uses this property for its own use we translate this into a Linux boot arg with: - the console name provided by the serial driver - the the instance from the 'serial' alias - the baudrate from the actual baudrate. So with this it's for devicetee enabled boards no longer necessary to manually assign a console= parameter. Should a user not want to use the automatically assigned parameter it should do: global.linux.bootargs.console= in the environment. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | serial: clps711x: Update driverAlexander Shiyan2014-01-241-36/+82
| | | | | | | | | | | | | | | | | | This patch updates the CLPS711X UART driver. The update adds support for use with devicetree and makes driver comatible with current driver from kernel. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ARM: clps711x: Remove the special name for the syscon driverAlexander Shiyan2014-01-241-2/+2
|/ | | | | | | No reason to make SYSCON driver name unique to that processor. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/omap-drivers'Sascha Hauer2013-12-062-12/+54
|\
| * serial: ns16550: Add device ids for omapSascha Hauer2013-11-222-12/+54
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | treewide: Add missing includesSascha Hauer2013-11-081-0/+1
|/ | | | | | | | A lot of files rely on include/driver.h including include/of.h (and this including include/errno.h. include the files explicitly so we can eventually get rid of including of.h from driver.h Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/socfpga'Sascha Hauer2013-10-071-0/+2
|\ | | | | | | | | Conflicts: scripts/Makefile
| * serial: ns16550: Add compatible entry for snps,dw-apb-uartSascha Hauer2013-09-231-0/+2
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/rs485'Sascha Hauer2013-10-071-0/+27
|\ \ | | | | | | | | | | | | Conflicts: common/console_common.c
| * | atmel_serial: add rs485 supportJean-Christophe PLAGNIOL-VILLARD2013-09-241-0/+27
| |/ | | | | | | | | 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-226-13/+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-2119-22/+6
|/ | | | | | | | | | 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>
* serial_auart: fix compile errorEric Bénard2013-09-101-1/+1
| | | | | | | | | | | | | this fix : drivers/serial/serial_auart.c:49:22: fatal error: mach/mxs.h: No such file or directory and drivers/serial/serial_auart.c: In function 'auart_serial_init_port': drivers/serial/serial_auart.c:174:2: warning: implicit declaration of function 'stmp_reset_block' [-Wimplicit-function-declaration] only compile tested ATM Signed-off-by: Eric Bénard <eric@eukrea.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/serial'Sascha Hauer2013-08-051-39/+100
|\