summaryrefslogtreecommitdiff
path: root/drivers/serial/serial_bcm283x_pl011.c
AgeCommit message (Collapse)AuthorFilesLines
2020-12-14dm: treewide: Rename ..._platdata variables to just ..._platSimon Glass1-2/+2
Try to maintain some consistency between these variables by using _plat as a suffix for them. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-12-14dm: treewide: Rename ofdata_to_platdata() to of_to_plat()Simon Glass1-2/+2
This name is far too long. Rename it to remove the 'data' bits. This makes it consistent with the platdata->plat rename. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-12-14dm: treewide: Rename dev_get_platdata() to dev_get_plat()Simon Glass1-1/+1
Rename this to be consistent with the change from 'platdata'. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-12-14dm: treewide: Rename 'platdata' variables to just 'plat'Simon Glass1-1/+1
We use 'priv' for private data but often use 'platdata' for platform data. We can't really use 'pdata' since that is ambiguous (it could mean private or platform data). Rename some of the latter variables to end with 'plat' for consistency. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-12-13dm: treewide: Rename auto_alloc_size members to be shorterSimon Glass1-2/+2
This construct is quite long-winded. In earlier days it made some sense since auto-allocation was a strange concept. But with driver model now used pretty universally, we can shorten this to 'auto'. This reduces verbosity and makes it easier to read. Coincidentally it also ensures that every declaration is on one line, thus making dtoc's job easier. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-12arm: bcm283x: serial: Move ofdata reading to probe() methodSimon Glass1-4/+8
We cannot rely on a parent bus that needs to be probed, until we know that it is probed. That means that code in the ofdata_to_platdata() method cannot rely on the parent bus being probed. Move the ofdata code in the two serial drivers into a probe() method. This fixes serial output on rpi_3b_32b with the following config.txt options: enable_uart=1 gpu_freq=250 Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Matthias Brugger <mbrugger@suse.com>
2019-11-24drivers: bcm283x: Set pre-location flag for OF_BOARDMatthias Brugger1-1/+1
U-Boot support on Raspberry Pi 4 relies on the device-tree provided by the firmware. The blob does not contain the U-Boot specific pre-loc-rel properties. The result is, that the U-Boot banner is not printed. We fix this by setting the DM_FLAG_PRE_RELOC flag in the driver, if we rely on a device-tree provided by the firmware. Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Matthias Brugger <mbrugger@suse.com>
2018-11-14serial: Remove DM_FLAG_PRE_RELOC flag in various driversBin Meng1-0/+2
When a driver declares DM_FLAG_PRE_RELOC flag, it wishes to be bound before relocation. However due to a bug in the DM core, the flag only takes effect when devices are statically declared via U_BOOT_DEVICE(). This bug has been fixed recently by commit "dm: core: Respect drivers with the DM_FLAG_PRE_RELOC flag in lists_bind_fdt()", but with the fix, it has a side effect that all existing drivers that declared DM_FLAG_PRE_RELOC flag will be bound before relocation now. This may expose potential boot failure on some boards due to insufficient memory during the pre-relocation stage. To mitigate this potential impact, the following changes are implemented: - Remove DM_FLAG_PRE_RELOC flag in the driver, if the driver only supports configuration from device tree (OF_CONTROL) - Keep DM_FLAG_PRE_RELOC flag in the driver only if the device is statically declared via U_BOOT_DEVICE() - Surround DM_FLAG_PRE_RELOC flag with OF_CONTROL check, for drivers that support both statically declared devices and configuration from device tree Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-05-07SPDX: Convert all of our single license tags to Linux Kernel styleTom Rini1-2/+1
When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
2018-03-09bcm283x_pl011: Flush RX queue after setting baud rateAlexander Graf1-1/+24
After the UART was initialized, we may still have bogus data in the RX queue if it was enabled with incorrect pin muxing before. So let's flush the RX queue whenever we initialize baud rates. This fixes a regression with the dynamic pinmuxing code when enable_uart=1 is not set in config.txt on Raspberry Pis that use pl011 for serial. Fixes: caf2233b28 ("bcm283x: Add pinctrl driver") Reported-by: Göran Lundberg <goran@lundberg.email> Reported-by: Peter Robinson <pbrobinson@gmail.com> Signed-off-by: Alexander Graf <agraf@suse.de> Tested-by: Peter Robinson <pbrobinson@gmail.com> Tested-by: Tuomas Tynkkynen <tuomas@tuxera.com>
2018-01-28bcm2835_pl011_serial: Add BCM2835 specific serial driverAlexander Graf1-0/+73
On bcm2835 we need to ensure we only access serial devices that are muxed to the serial output pins of the pin header. To achieve this for the pl011 device, add a bcm2835 specific pl011 wrapper device that does this check but otherwise behaves like a pl011 device. Signed-off-by: Alexander Graf <agraf@suse.de>