summaryrefslogtreecommitdiff
path: root/drivers/serial/serial_sifive.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-12-03 16:55:23 -0700
committerSimon Glass <sjg@chromium.org>2020-12-13 16:51:09 -0700
commit8a8d24bdf174851ebb8607f359d54b72e3283b97 (patch)
tree89fe2b9fd0c33209ce154170f9bda61f624dd9cd /drivers/serial/serial_sifive.c
parentb012ff1f1b0d662587dcf8707fe7cbf1c1f35d2f (diff)
downloadu-boot-8a8d24bdf174851ebb8607f359d54b72e3283b97.tar.gz
dm: treewide: Rename ..._platdata variables to just ..._plat
Try to maintain some consistency between these variables by using _plat as a suffix for them. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/serial/serial_sifive.c')
-rw-r--r--drivers/serial/serial_sifive.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/serial/serial_sifive.c b/drivers/serial/serial_sifive.c
index 5248c6814c..d26fe7e770 100644
--- a/drivers/serial/serial_sifive.c
+++ b/drivers/serial/serial_sifive.c
@@ -37,7 +37,7 @@ struct uart_sifive {
u32 div;
};
-struct sifive_uart_platdata {
+struct sifive_uart_plat {
unsigned long clock;
struct uart_sifive *regs;
};
@@ -105,7 +105,7 @@ static int sifive_serial_setbrg(struct udevice *dev, int baudrate)
{
int ret;
struct clk clk;
- struct sifive_uart_platdata *plat = dev_get_plat(dev);
+ struct sifive_uart_plat *plat = dev_get_plat(dev);
u32 clock = 0;
ret = clk_get_by_index(dev, 0, &clk);
@@ -131,7 +131,7 @@ static int sifive_serial_setbrg(struct udevice *dev, int baudrate)
static int sifive_serial_probe(struct udevice *dev)
{
- struct sifive_uart_platdata *plat = dev_get_plat(dev);
+ struct sifive_uart_plat *plat = dev_get_plat(dev);
/* No need to reinitialize the UART after relocation */
if (gd->flags & GD_FLG_RELOC)
@@ -145,7 +145,7 @@ static int sifive_serial_probe(struct udevice *dev)
static int sifive_serial_getc(struct udevice *dev)
{
int c;
- struct sifive_uart_platdata *plat = dev_get_plat(dev);
+ struct sifive_uart_plat *plat = dev_get_plat(dev);
struct uart_sifive *regs = plat->regs;
while ((c = _sifive_serial_getc(regs)) == -EAGAIN) ;
@@ -156,7 +156,7 @@ static int sifive_serial_getc(struct udevice *dev)
static int sifive_serial_putc(struct udevice *dev, const char ch)
{
int rc;
- struct sifive_uart_platdata *plat = dev_get_plat(dev);
+ struct sifive_uart_plat *plat = dev_get_plat(dev);
while ((rc = _sifive_serial_putc(plat->regs, ch)) == -EAGAIN) ;
@@ -165,7 +165,7 @@ static int sifive_serial_putc(struct udevice *dev, const char ch)
static int sifive_serial_pending(struct udevice *dev, bool input)
{
- struct sifive_uart_platdata *plat = dev_get_plat(dev);
+ struct sifive_uart_plat *plat = dev_get_plat(dev);
struct uart_sifive *regs = plat->regs;
if (input)
@@ -176,7 +176,7 @@ static int sifive_serial_pending(struct udevice *dev, bool input)
static int sifive_serial_of_to_plat(struct udevice *dev)
{
- struct sifive_uart_platdata *plat = dev_get_plat(dev);
+ struct sifive_uart_plat *plat = dev_get_plat(dev);
plat->regs = (struct uart_sifive *)dev_read_addr(dev);
if (IS_ERR(plat->regs))
@@ -202,7 +202,7 @@ U_BOOT_DRIVER(serial_sifive) = {
.id = UCLASS_SERIAL,
.of_match = sifive_serial_ids,
.of_to_plat = sifive_serial_of_to_plat,
- .plat_auto = sizeof(struct sifive_uart_platdata),
+ .plat_auto = sizeof(struct sifive_uart_plat),
.probe = sifive_serial_probe,
.ops = &sifive_serial_ops,
};