summaryrefslogtreecommitdiff
path: root/drivers/serial/serial_sifive.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-12-03 16:55:20 -0700
committerSimon Glass <sjg@chromium.org>2020-12-13 16:51:09 -0700
commitc69cda25c9b59e53a6bc8969ada58942549f5b5d (patch)
tree8c84d1773465eb8e06cbbaeb710daa6217f5618d /drivers/serial/serial_sifive.c
parent4f50086ad6d69c355a07389fb436c64c92ec614a (diff)
downloadu-boot-c69cda25c9b59e53a6bc8969ada58942549f5b5d.tar.gz
dm: treewide: Rename dev_get_platdata() to dev_get_plat()
Rename this to be consistent with the change from 'platdata'. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/serial/serial_sifive.c')
-rw-r--r--drivers/serial/serial_sifive.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/serial/serial_sifive.c b/drivers/serial/serial_sifive.c
index 276f0902db..e9d4d91b45 100644
--- a/drivers/serial/serial_sifive.c
+++ b/drivers/serial/serial_sifive.c
@@ -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_platdata(dev);
+ struct sifive_uart_platdata *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_platdata(dev);
+ struct sifive_uart_platdata *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_platdata(dev);
+ struct sifive_uart_platdata *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_platdata(dev);
+ struct sifive_uart_platdata *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_platdata(dev);
+ struct sifive_uart_platdata *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_ofdata_to_platdata(struct udevice *dev)
{
- struct sifive_uart_platdata *plat = dev_get_platdata(dev);
+ struct sifive_uart_platdata *plat = dev_get_plat(dev);
plat->regs = (struct uart_sifive *)dev_read_addr(dev);
if (IS_ERR(plat->regs))