summaryrefslogtreecommitdiff
path: root/drivers/serial
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-12-03 16:55:18 -0700
committerSimon Glass <sjg@chromium.org>2020-12-13 16:51:08 -0700
commitcaa4daa2ae3dc0a3e516addea5772c9af76abcb0 (patch)
tree0abbc5b538894532f4db28d56e4645d3be230d27 /drivers/serial
parent41575d8e4c334df148c4cdd7c40cc825dc0fcaa1 (diff)
downloadu-boot-caa4daa2ae3dc0a3e516addea5772c9af76abcb0.tar.gz
u-boot-caa4daa2ae3dc0a3e516addea5772c9af76abcb0.tar.bz2
u-boot-caa4daa2ae3dc0a3e516addea5772c9af76abcb0.zip
dm: treewide: Rename 'platdata' variables to just 'plat'
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>
Diffstat (limited to 'drivers/serial')
-rw-r--r--drivers/serial/altera_jtag_uart.c10
-rw-r--r--drivers/serial/altera_uart.c10
-rw-r--r--drivers/serial/atmel_usart.c4
-rw-r--r--drivers/serial/lpc32xx_hsuart.c4
-rw-r--r--drivers/serial/ns16550.c8
-rw-r--r--drivers/serial/sandbox.c10
-rw-r--r--drivers/serial/serial_arc.c10
-rw-r--r--drivers/serial/serial_bcm283x_mu.c2
-rw-r--r--drivers/serial/serial_bcm283x_pl011.c2
-rw-r--r--drivers/serial/serial_coreboot.c2
-rw-r--r--drivers/serial/serial_intel_mid.c2
-rw-r--r--drivers/serial/serial_linflexuart.c2
-rw-r--r--drivers/serial/serial_lpuart.c12
-rw-r--r--drivers/serial/serial_mcf.c12
-rw-r--r--drivers/serial/serial_meson.c14
-rw-r--r--drivers/serial/serial_mvebu_a3700.c2
-rw-r--r--drivers/serial/serial_mxc.c14
-rw-r--r--drivers/serial/serial_omap.c4
-rw-r--r--drivers/serial/serial_pl01x.c2
-rw-r--r--drivers/serial/serial_pxa.c10
-rw-r--r--drivers/serial/serial_rockchip.c6
-rw-r--r--drivers/serial/serial_s5p.c14
-rw-r--r--drivers/serial/serial_sh.c2
-rw-r--r--drivers/serial/serial_sifive.c32
-rw-r--r--drivers/serial/serial_stm32.c2
-rw-r--r--drivers/serial/serial_xuartlite.c2
-rw-r--r--drivers/serial/serial_zynq.c32
27 files changed, 113 insertions, 113 deletions
diff --git a/drivers/serial/altera_jtag_uart.c b/drivers/serial/altera_jtag_uart.c
index 173ac240ea..01dc41ebc0 100644
--- a/drivers/serial/altera_jtag_uart.c
+++ b/drivers/serial/altera_jtag_uart.c
@@ -37,7 +37,7 @@ static int altera_jtaguart_setbrg(struct udevice *dev, int baudrate)
static int altera_jtaguart_putc(struct udevice *dev, const char ch)
{
- struct altera_jtaguart_platdata *plat = dev->platdata;
+ struct altera_jtaguart_platdata *plat = dev->plat;
struct altera_jtaguart_regs *const regs = plat->regs;
u32 st = readl(&regs->control);
@@ -56,7 +56,7 @@ static int altera_jtaguart_putc(struct udevice *dev, const char ch)
static int altera_jtaguart_pending(struct udevice *dev, bool input)
{
- struct altera_jtaguart_platdata *plat = dev->platdata;
+ struct altera_jtaguart_platdata *plat = dev->plat;
struct altera_jtaguart_regs *const regs = plat->regs;
u32 st = readl(&regs->control);
@@ -68,7 +68,7 @@ static int altera_jtaguart_pending(struct udevice *dev, bool input)
static int altera_jtaguart_getc(struct udevice *dev)
{
- struct altera_jtaguart_platdata *plat = dev->platdata;
+ struct altera_jtaguart_platdata *plat = dev->plat;
struct altera_jtaguart_regs *const regs = plat->regs;
u32 val;
@@ -83,7 +83,7 @@ static int altera_jtaguart_getc(struct udevice *dev)
static int altera_jtaguart_probe(struct udevice *dev)
{
#ifdef CONFIG_ALTERA_JTAG_UART_BYPASS
- struct altera_jtaguart_platdata *plat = dev->platdata;
+ struct altera_jtaguart_platdata *plat = dev->plat;
struct altera_jtaguart_regs *const regs = plat->regs;
writel(ALTERA_JTAG_AC, &regs->control); /* clear AC flag */
@@ -119,7 +119,7 @@ U_BOOT_DRIVER(altera_jtaguart) = {
.id = UCLASS_SERIAL,
.of_match = altera_jtaguart_ids,
.ofdata_to_platdata = altera_jtaguart_ofdata_to_platdata,
- .platdata_auto = sizeof(struct altera_jtaguart_platdata),
+ .plat_auto = sizeof(struct altera_jtaguart_platdata),
.probe = altera_jtaguart_probe,
.ops = &altera_jtaguart_ops,
};
diff --git a/drivers/serial/altera_uart.c b/drivers/serial/altera_uart.c
index eec70f6000..68169d51a3 100644
--- a/drivers/serial/altera_uart.c
+++ b/drivers/serial/altera_uart.c
@@ -32,7 +32,7 @@ struct altera_uart_platdata {
static int altera_uart_setbrg(struct udevice *dev, int baudrate)
{
- struct altera_uart_platdata *plat = dev->platdata;
+ struct altera_uart_platdata *plat = dev->plat;
struct altera_uart_regs *const regs = plat->regs;
u32 div;
@@ -44,7 +44,7 @@ static int altera_uart_setbrg(struct udevice *dev, int baudrate)
static int altera_uart_putc(struct udevice *dev, const char ch)
{
- struct altera_uart_platdata *plat = dev->platdata;
+ struct altera_uart_platdata *plat = dev->plat;
struct altera_uart_regs *const regs = plat->regs;
if (!(readl(&regs->status) & ALTERA_UART_TRDY))
@@ -57,7 +57,7 @@ static int altera_uart_putc(struct udevice *dev, const char ch)
static int altera_uart_pending(struct udevice *dev, bool input)
{
- struct altera_uart_platdata *plat = dev->platdata;
+ struct altera_uart_platdata *plat = dev->plat;
struct altera_uart_regs *const regs = plat->regs;
u32 st = readl(&regs->status);
@@ -69,7 +69,7 @@ static int altera_uart_pending(struct udevice *dev, bool input)
static int altera_uart_getc(struct udevice *dev)
{
- struct altera_uart_platdata *plat = dev->platdata;
+ struct altera_uart_platdata *plat = dev->plat;
struct altera_uart_regs *const regs = plat->regs;
if (!(readl(&regs->status) & ALTERA_UART_RRDY))
@@ -112,7 +112,7 @@ U_BOOT_DRIVER(altera_uart) = {
.id = UCLASS_SERIAL,
.of_match = altera_uart_ids,
.ofdata_to_platdata = altera_uart_ofdata_to_platdata,
- .platdata_auto = sizeof(struct altera_uart_platdata),
+ .plat_auto = sizeof(struct altera_uart_platdata),
.probe = altera_uart_probe,
.ops = &altera_uart_ops,
};
diff --git a/drivers/serial/atmel_usart.c b/drivers/serial/atmel_usart.c
index 45e6554f59..463bedef23 100644
--- a/drivers/serial/atmel_usart.c
+++ b/drivers/serial/atmel_usart.c
@@ -262,7 +262,7 @@ static int atmel_serial_enable_clk(struct udevice *dev)
static int atmel_serial_probe(struct udevice *dev)
{
- struct atmel_serial_platdata *plat = dev->platdata;
+ struct atmel_serial_platdata *plat = dev->plat;
struct atmel_serial_priv *priv = dev_get_priv(dev);
int ret;
#if CONFIG_IS_ENABLED(OF_CONTROL)
@@ -304,7 +304,7 @@ U_BOOT_DRIVER(serial_atmel) = {
.id = UCLASS_SERIAL,
#if CONFIG_IS_ENABLED(OF_CONTROL)
.of_match = atmel_serial_ids,
- .platdata_auto = sizeof(struct atmel_serial_platdata),
+ .plat_auto = sizeof(struct atmel_serial_platdata),
#endif
.probe = atmel_serial_probe,
.ops = &atmel_serial_ops,
diff --git a/drivers/serial/lpc32xx_hsuart.c b/drivers/serial/lpc32xx_hsuart.c
index 80b63807d6..6b7bf3f1c5 100644
--- a/drivers/serial/lpc32xx_hsuart.c
+++ b/drivers/serial/lpc32xx_hsuart.c
@@ -85,10 +85,10 @@ static int lpc32xx_serial_init(struct hsuart_regs *hsuart)
static int lpc32xx_hsuart_probe(struct udevice *dev)
{
- struct lpc32xx_hsuart_platdata *platdata = dev_get_platdata(dev);
+ struct lpc32xx_hsuart_platdata *plat = dev_get_platdata(dev);
struct lpc32xx_hsuart_priv *priv = dev_get_priv(dev);
- priv->hsuart = (struct hsuart_regs *)platdata->base;
+ priv->hsuart = (struct hsuart_regs *)plat->base;
lpc32xx_serial_init(priv->hsuart);
diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c
index 9b83f88187..88a486aab8 100644
--- a/drivers/serial/ns16550.c
+++ b/drivers/serial/ns16550.c
@@ -498,7 +498,7 @@ static int ns16550_serial_assign_base(struct ns16550_platdata *plat, ulong base)
int ns16550_serial_probe(struct udevice *dev)
{
- struct ns16550_platdata *plat = dev->platdata;
+ struct ns16550_platdata *plat = dev->plat;
struct NS16550 *const com_port = dev_get_priv(dev);
struct reset_ctl_bulk reset_bulk;
fdt_addr_t addr;
@@ -506,7 +506,7 @@ int ns16550_serial_probe(struct udevice *dev)
/*
* If we are on PCI bus, either directly attached to a PCI root port,
- * or via a PCI bridge, assign platdata->base before probing hardware.
+ * or via a PCI bridge, assign plat->base before probing hardware.
*/
if (device_is_on_pci_bus(dev)) {
addr = devfdt_get_addr_pci(dev);
@@ -535,7 +535,7 @@ enum {
#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)
int ns16550_serial_ofdata_to_platdata(struct udevice *dev)
{
- struct ns16550_platdata *plat = dev->platdata;
+ struct ns16550_platdata *plat = dev->plat;
const u32 port_type = dev_get_driver_data(dev);
fdt_addr_t addr;
struct clk clk;
@@ -611,7 +611,7 @@ U_BOOT_DRIVER(ns16550_serial) = {
#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)
.of_match = ns16550_serial_ids,
.ofdata_to_platdata = ns16550_serial_ofdata_to_platdata,
- .platdata_auto = sizeof(struct ns16550_platdata),
+ .plat_auto = sizeof(struct ns16550_platdata),
#endif
.priv_auto = sizeof(struct NS16550),
.probe = ns16550_serial_probe,
diff --git a/drivers/serial/sandbox.c b/drivers/serial/sandbox.c
index 03d16c73a3..85745610a3 100644
--- a/drivers/serial/sandbox.c
+++ b/drivers/serial/sandbox.c
@@ -72,7 +72,7 @@ static int sandbox_serial_probe(struct udevice *dev)
static int sandbox_serial_remove(struct udevice *dev)
{
- struct sandbox_serial_platdata *plat = dev->platdata;
+ struct sandbox_serial_platdata *plat = dev->plat;
if (plat->colour != -1)
output_ansi_reset();
@@ -83,7 +83,7 @@ static int sandbox_serial_remove(struct udevice *dev)
static int sandbox_serial_putc(struct udevice *dev, const char ch)
{
struct sandbox_serial_priv *priv = dev_get_priv(dev);
- struct sandbox_serial_platdata *plat = dev->platdata;
+ struct sandbox_serial_platdata *plat = dev->plat;
/* With of-platdata we don't real the colour correctly, so disable it */
if (!CONFIG_IS_ENABLED(OF_PLATDATA) && priv->start_of_line &&
@@ -203,7 +203,7 @@ static const char * const ansi_colour[] = {
static int sandbox_serial_ofdata_to_platdata(struct udevice *dev)
{
- struct sandbox_serial_platdata *plat = dev->platdata;
+ struct sandbox_serial_platdata *plat = dev->plat;
const char *colour;
int i;
@@ -242,7 +242,7 @@ U_BOOT_DRIVER(sandbox_serial) = {
.id = UCLASS_SERIAL,
.of_match = sandbox_serial_ids,
.ofdata_to_platdata = sandbox_serial_ofdata_to_platdata,
- .platdata_auto = sizeof(struct sandbox_serial_platdata),
+ .plat_auto = sizeof(struct sandbox_serial_platdata),
.priv_auto = sizeof(struct sandbox_serial_priv),
.probe = sandbox_serial_probe,
.remove = sandbox_serial_remove,
@@ -257,6 +257,6 @@ static const struct sandbox_serial_platdata platdata_non_fdt = {
U_BOOT_DEVICE(serial_sandbox_non_fdt) = {
.name = "sandbox_serial",
- .platdata = &platdata_non_fdt,
+ .plat = &platdata_non_fdt,
};
#endif
diff --git a/drivers/serial/serial_arc.c b/drivers/serial/serial_arc.c
index 52dce3505e..0c7418f5bc 100644
--- a/drivers/serial/serial_arc.c
+++ b/drivers/serial/serial_arc.c
@@ -37,7 +37,7 @@ struct arc_serial_platdata {
static int arc_serial_setbrg(struct udevice *dev, int baudrate)
{
- struct arc_serial_platdata *plat = dev->platdata;
+ struct arc_serial_platdata *plat = dev->plat;
struct arc_serial_regs *const regs = plat->reg;
int arc_console_baud = gd->cpu_clk / (baudrate * 4) - 1;
@@ -49,7 +49,7 @@ static int arc_serial_setbrg(struct udevice *dev, int baudrate)
static int arc_serial_putc(struct udevice *dev, const char c)
{
- struct arc_serial_platdata *plat = dev->platdata;
+ struct arc_serial_platdata *plat = dev->plat;
struct arc_serial_regs *const regs = plat->reg;
while (!(readb(&regs->status) & UART_TXEMPTY))
@@ -67,7 +67,7 @@ static int arc_serial_tstc(struct arc_serial_regs *const regs)
static int arc_serial_pending(struct udevice *dev, bool input)
{
- struct arc_serial_platdata *plat = dev->platdata;
+ struct arc_serial_platdata *plat = dev->plat;
struct arc_serial_regs *const regs = plat->reg;
uint32_t status = readb(&regs->status);
@@ -79,7 +79,7 @@ static int arc_serial_pending(struct udevice *dev, bool input)
static int arc_serial_getc(struct udevice *dev)
{
- struct arc_serial_platdata *plat = dev->platdata;
+ struct arc_serial_platdata *plat = dev->plat;
struct arc_serial_regs *const regs = plat->reg;
while (!arc_serial_tstc(regs))
@@ -126,7 +126,7 @@ U_BOOT_DRIVER(serial_arc) = {
.id = UCLASS_SERIAL,
.of_match = arc_serial_ids,
.ofdata_to_platdata = arc_serial_ofdata_to_platdata,
- .platdata_auto = sizeof(struct arc_serial_platdata),
+ .plat_auto = sizeof(struct arc_serial_platdata),
.probe = arc_serial_probe,
.ops = &arc_serial_ops,
};
diff --git a/drivers/serial/serial_bcm283x_mu.c b/drivers/serial/serial_bcm283x_mu.c
index 8cd533f808..d11bdd4ebb 100644
--- a/drivers/serial/serial_bcm283x_mu.c
+++ b/drivers/serial/serial_bcm283x_mu.c
@@ -194,7 +194,7 @@ U_BOOT_DRIVER(serial_bcm283x_mu) = {
.name = "serial_bcm283x_mu",
.id = UCLASS_SERIAL,
.of_match = of_match_ptr(bcm283x_mu_serial_id),
- .platdata_auto = sizeof(struct bcm283x_mu_serial_platdata),
+ .plat_auto = sizeof(struct bcm283x_mu_serial_platdata),
.probe = bcm283x_mu_serial_probe,
.ops = &bcm283x_mu_serial_ops,
#if !CONFIG_IS_ENABLED(OF_CONTROL) || CONFIG_IS_ENABLED(OF_BOARD)
diff --git a/drivers/serial/serial_bcm283x_pl011.c b/drivers/serial/serial_bcm283x_pl011.c
index 484a281811..8d2f249b33 100644
--- a/drivers/serial/serial_bcm283x_pl011.c
+++ b/drivers/serial/serial_bcm283x_pl011.c
@@ -92,7 +92,7 @@ U_BOOT_DRIVER(bcm283x_pl011_uart) = {
.id = UCLASS_SERIAL,
.of_match = of_match_ptr(bcm283x_pl011_serial_id),
.probe = bcm283x_pl011_serial_probe,
- .platdata_auto = sizeof(struct pl01x_serial_platdata),
+ .plat_auto = sizeof(struct pl01x_serial_platdata),
.ops = &bcm283x_pl011_serial_ops,
#if !CONFIG_IS_ENABLED(OF_CONTROL) || CONFIG_IS_ENABLED(OF_BOARD)
.flags = DM_FLAG_PRE_RELOC,
diff --git a/drivers/serial/serial_coreboot.c b/drivers/serial/serial_coreboot.c
index 08363c4920..17072e42b2 100644
--- a/drivers/serial/serial_coreboot.c
+++ b/drivers/serial/serial_coreboot.c
@@ -38,7 +38,7 @@ U_BOOT_DRIVER(coreboot_uart) = {
.id = UCLASS_SERIAL,
.of_match = coreboot_serial_ids,
.priv_auto = sizeof(struct NS16550),
- .platdata_auto = sizeof(struct ns16550_platdata),
+ .plat_auto = sizeof(struct ns16550_platdata),
.ofdata_to_platdata = coreboot_ofdata_to_platdata,
.probe = ns16550_serial_probe,
.ops = &ns16550_serial_ops,
diff --git a/drivers/serial/serial_intel_mid.c b/drivers/serial/serial_intel_mid.c
index f9281590cd..26c6867180 100644
--- a/drivers/serial/serial_intel_mid.c
+++ b/drivers/serial/serial_intel_mid.c
@@ -60,7 +60,7 @@ U_BOOT_DRIVER(serial_intel_mid) = {
.id = UCLASS_SERIAL,
.of_match = mid_serial_ids,
.ofdata_to_platdata = ns16550_serial_ofdata_to_platdata,
- .platdata_auto = sizeof(struct ns16550_platdata),
+ .plat_auto = sizeof(struct ns16550_platdata),
.priv_auto = sizeof(struct NS16550),
.probe = mid_serial_probe,
.ops = &ns16550_serial_ops,
diff --git a/drivers/serial/serial_linflexuart.c b/drivers/serial/serial_linflexuart.c
index af7b842927..4f8867ab7b 100644
--- a/drivers/serial/serial_linflexuart.c
+++ b/drivers/serial/serial_linflexuart.c
@@ -168,7 +168,7 @@ static void linflex_serial_init_internal(struct linflex_fsl *lfuart)
static int linflex_serial_probe(struct udevice *dev)
{
- struct linflex_serial_platdata *plat = dev->platdata;
+ struct linflex_serial_platdata *plat = dev->plat;
struct linflex_serial_priv *priv = dev_get_priv(dev);
priv->lfuart = (struct linflex_fsl *)plat->base_addr;
diff --git a/drivers/serial/serial_lpuart.c b/drivers/serial/serial_lpuart.c
index b26f401cb7..e6e1b1def6 100644
--- a/drivers/serial/serial_lpuart.c
+++ b/drivers/serial/serial_lpuart.c
@@ -138,7 +138,7 @@ static inline int get_lpuart_clk_rate(struct udevice *dev, u32 *clk)
static bool is_lpuart32(struct udevice *dev)
{
- struct lpuart_serial_platdata *plat = dev->platdata;
+ struct lpuart_serial_platdata *plat = dev->plat;
return plat->flags & LPUART_FLAG_REGMAP_32BIT_REG;
}
@@ -445,7 +445,7 @@ static int lpuart_serial_setbrg(struct udevice *dev, int baudrate)
static int lpuart_serial_getc(struct udevice *dev)
{
- struct lpuart_serial_platdata *plat = dev->platdata;
+ struct lpuart_serial_platdata *plat = dev->plat;
if (is_lpuart32(dev))
return _lpuart32_serial_getc(plat);
@@ -455,7 +455,7 @@ static int lpuart_serial_getc(struct udevice *dev)
static int lpuart_serial_putc(struct udevice *dev, const char c)
{
- struct lpuart_serial_platdata *plat = dev->platdata;
+ struct lpuart_serial_platdata *plat = dev->plat;
if (is_lpuart32(dev))
_lpuart32_serial_putc(plat, c);
@@ -467,7 +467,7 @@ static int lpuart_serial_putc(struct udevice *dev, const char c)
static int lpuart_serial_pending(struct udevice *dev, bool input)
{
- struct lpuart_serial_platdata *plat = dev->platdata;
+ struct lpuart_serial_platdata *plat = dev->plat;
struct lpuart_fsl *reg = plat->reg;
struct lpuart_fsl_reg32 *reg32 = plat->reg;
u32 stat;
@@ -513,7 +513,7 @@ static int lpuart_serial_probe(struct udevice *dev)
static int lpuart_serial_ofdata_to_platdata(struct udevice *dev)
{
- struct lpuart_serial_platdata *plat = dev->platdata;
+ struct lpuart_serial_platdata *plat = dev->plat;
const void *blob = gd->fdt_blob;
int node = dev_of_offset(dev);
fdt_addr_t addr;
@@ -567,7 +567,7 @@ U_BOOT_DRIVER(serial_lpuart) = {
.id = UCLASS_SERIAL,
.of_match = lpuart_serial_ids,
.ofdata_to_platdata = lpuart_serial_ofdata_to_platdata,
- .platdata_auto = sizeof(struct lpuart_serial_platdata),
+ .plat_auto = sizeof(struct lpuart_serial_platdata),
.probe = lpuart_serial_probe,
.ops = &lpuart_serial_ops,
};
diff --git a/drivers/serial/serial_mcf.c b/drivers/serial/serial_mcf.c
index 513013ca5a..40f0b01c21 100644
--- a/drivers/serial/serial_mcf.c
+++ b/drivers/serial/serial_mcf.c
@@ -83,7 +83,7 @@ static void mcf_serial_setbrg_common(uart_t *uart, int baudrate)
static int coldfire_serial_probe(struct udevice *dev)
{
- struct coldfire_serial_platdata *plat = dev->platdata;
+ struct coldfire_serial_platdata *plat = dev->plat;
plat->port = dev->seq;
@@ -93,7 +93,7 @@ static int coldfire_serial_probe(struct udevice *dev)
static int coldfire_serial_putc(struct udevice *dev, const char ch)
{
- struct coldfire_serial_platdata *plat = dev->platdata;
+ struct coldfire_serial_platdata *plat = dev->plat;
uart_t *uart = (uart_t *)plat->base;
/* Wait for last character to go. */
@@ -107,7 +107,7 @@ static int coldfire_serial_putc(struct udevice *dev, const char ch)
static int coldfire_serial_getc(struct udevice *dev)
{
- struct coldfire_serial_platdata *plat = dev->platdata;
+ struct coldfire_serial_platdata *plat = dev->plat;
uart_t *uart = (uart_t *)(plat->base);
/* Wait for a character to arrive. */
@@ -119,7 +119,7 @@ static int coldfire_serial_getc(struct udevice *dev)
int coldfire_serial_setbrg(struct udevice *dev, int baudrate)
{
- struct coldfire_serial_platdata *plat = dev->platdata;
+ struct coldfire_serial_platdata *plat = dev->plat;
uart_t *uart = (uart_t *)(plat->base);
mcf_serial_setbrg_common(uart, baudrate);
@@ -129,7 +129,7 @@ int coldfire_serial_setbrg(struct udevice *dev, int baudrate)
static int coldfire_serial_pending(struct udevice *dev, bool input)
{
- struct coldfire_serial_platdata *plat = dev->platdata;
+ struct coldfire_serial_platdata *plat = dev->plat;
uart_t *uart = (uart_t *)(plat->base);
if (input)
@@ -172,7 +172,7 @@ U_BOOT_DRIVER(serial_coldfire) = {
.id = UCLASS_SERIAL,
.of_match = coldfire_serial_ids,
.ofdata_to_platdata = coldfire_ofdata_to_platdata,
- .platdata_auto = sizeof(struct coldfire_serial_platdata),
+ .plat_auto = sizeof(struct coldfire_serial_platdata),
.probe = coldfire_serial_probe,
.ops = &coldfire_serial_ops,
.flags = DM_FLAG_PRE_RELOC,
diff --git a/drivers/serial/serial_meson.c b/drivers/serial/serial_meson.c
index 73a10f89c0..997426d56d 100644
--- a/drivers/serial/serial_meson.c
+++ b/drivers/serial/serial_meson.c
@@ -57,7 +57,7 @@ static void meson_serial_init(struct meson_uart *uart)
static int meson_serial_probe(struct udevice *dev)
{
- struct meson_serial_platdata *plat = dev->platdata;
+ struct meson_serial_platdata *plat = dev->plat;
struct meson_uart *const uart = plat->reg;
meson_serial_init(uart);
@@ -67,7 +67,7 @@ static int meson_serial_probe(struct udevice *dev)
static void meson_serial_rx_error(struct udevice *dev)
{
- struct meson_serial_platdata *plat = dev->platdata;
+ struct meson_serial_platdata *plat = dev->plat;
struct meson_uart *const uart = plat->reg;
u32 val = readl(&uart->control);
@@ -83,7 +83,7 @@ static void meson_serial_rx_error(struct udevice *dev)
static int meson_serial_getc(struct udevice *dev)
{
- struct meson_serial_platdata *plat = dev->platdata;
+ struct meson_serial_platdata *plat = dev->plat;
struct meson_uart *const uart = plat->reg;
uint32_t status = readl(&uart->status);
@@ -100,7 +100,7 @@ static int meson_serial_getc(struct udevice *dev)
static int meson_serial_putc(struct udevice *dev, const char ch)
{
- struct meson_serial_platdata *plat = dev->platdata;
+ struct meson_serial_platdata *plat = dev->plat;
struct meson_uart *const uart = plat->reg;
if (readl(&uart->status) & AML_UART_TX_FULL)
@@ -113,7 +113,7 @@ static int meson_serial_putc(struct udevice *dev, const char ch)
static int meson_serial_pending(struct udevice *dev, bool input)
{
- struct meson_serial_platdata *plat = dev->platdata;
+ struct meson_serial_platdata *plat = dev->plat;
struct meson_uart *const uart = plat->reg;
uint32_t status = readl(&uart->status);
@@ -138,7 +138,7 @@ static int meson_serial_pending(struct udevice *dev, bool input)
static int meson_serial_ofdata_to_platdata(struct udevice *dev)
{
- struct meson_serial_platdata *plat = dev->platdata;
+ struct meson_serial_platdata *plat = dev->plat;
fdt_addr_t addr;
addr = dev_read_addr(dev);
@@ -169,7 +169,7 @@ U_BOOT_DRIVER(serial_meson) = {
.probe = meson_serial_probe,
.ops = &meson_serial_ops,
.ofdata_to_platdata = meson_serial_ofdata_to_platdata,
- .platdata_auto = sizeof(struct meson_serial_platdata),
+ .plat_auto = sizeof(struct meson_serial_platdata),
};
#ifdef CONFIG_DEBUG_UART_MESON
diff --git a/drivers/serial/serial_mvebu_a3700.c b/drivers/serial/serial_mvebu_a3700.c
index 7756b0d929..690b7c69c8 100644
--- a/drivers/serial/serial_mvebu_a3700.c
+++ b/drivers/serial/serial_mvebu_a3700.c
@@ -126,7 +126,7 @@ U_BOOT_DRIVER(serial_mvebu) = {
.id = UCLASS_SERIAL,
.of_match = mvebu_serial_ids,
.ofdata_to_platdata = mvebu_serial_ofdata_to_platdata,
- .platdata_auto = sizeof(struct mvebu_platdata),
+ .plat_auto = sizeof(struct mvebu_platdata),
.probe = mvebu_serial_probe,
.ops = &mvebu_serial_ops,
};
diff --git a/drivers/serial/serial_mxc.c b/drivers/serial/serial_mxc.c
index 83f2316a64..a228bc4c9e 100644
--- a/drivers/serial/serial_mxc.c
+++ b/drivers/serial/serial_mxc.c
@@ -264,7 +264,7 @@ __weak struct serial_device *default_serial_console(void)
int mxc_serial_setbrg(struct udevice *dev, int baudrate)
{
- struct mxc_serial_platdata *plat = dev->platdata;
+ struct mxc_serial_platdata *plat = dev->plat;
u32 clk = imx_get_uartclk();
_mxc_serial_setbrg(plat->reg, clk, baudrate, plat->use_dte);
@@ -274,7 +274,7 @@ int mxc_serial_setbrg(struct udevice *dev, int baudrate)
static int mxc_serial_probe(struct udevice *dev)
{
- struct mxc_serial_platdata *plat = dev->platdata;
+ struct mxc_serial_platdata *plat = dev->plat;
_mxc_serial_init(plat->reg, plat->use_dte);
@@ -283,7 +283,7 @@ static int mxc_serial_probe(struct udevice *dev)
static int mxc_serial_getc(struct udevice *dev)
{
- struct mxc_serial_platdata *plat = dev->platdata;
+ struct mxc_serial_platdata *plat = dev->plat;
struct mxc_uart *const uart = plat->reg;
if (readl(&uart->ts) & UTS_RXEMPTY)
@@ -294,7 +294,7 @@ static int mxc_serial_getc(struct udevice *dev)
static int mxc_serial_putc(struct udevice *dev, const char ch)
{
- struct mxc_serial_platdata *plat = dev->platdata;
+ struct mxc_serial_platdata *plat = dev->plat;
struct mxc_uart *const uart = plat->reg;
if (!(readl(&uart->ts) & UTS_TXEMPTY))
@@ -307,7 +307,7 @@ static int mxc_serial_putc(struct udevice *dev, const char ch)
static int mxc_serial_pending(struct udevice *dev, bool input)
{
- struct mxc_serial_platdata *plat = dev->platdata;
+ struct mxc_serial_platdata *plat = dev->plat;
struct mxc_uart *const uart = plat->reg;
uint32_t sr2 = readl(&uart->sr2);
@@ -327,7 +327,7 @@ static const struct dm_serial_ops mxc_serial_ops = {
#if CONFIG_IS_ENABLED(OF_CONTROL)
static int mxc_serial_ofdata_to_platdata(struct udevice *dev)
{
- struct mxc_serial_platdata *plat = dev->platdata;
+ struct mxc_serial_platdata *plat = dev->plat;
fdt_addr_t addr;
addr = dev_read_addr(dev);
@@ -358,7 +358,7 @@ U_BOOT_DRIVER(serial_mxc) = {
#if CONFIG_IS_ENABLED(OF_CONTROL)
.of_match = mxc_serial_ids,
.ofdata_to_platdata = mxc_serial_ofdata_to_platdata,
- .platdata_auto = sizeof(struct mxc_serial_platdata),
+ .plat_auto = sizeof(struct mxc_serial_platdata),
#endif
.probe = mxc_serial_probe,
.ops = &mxc_serial_ops,
diff --git a/drivers/serial/serial_omap.c b/drivers/serial/serial_omap.c
index 296c5fd45c..26e03b8620 100644
--- a/drivers/serial/serial_omap.c
+++ b/drivers/serial/serial_omap.c
@@ -101,7 +101,7 @@ DEBUG_UART_FUNCS
#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)
static int omap_serial_ofdata_to_platdata(struct udevice *dev)
{
- struct ns16550_platdata *plat = dev->platdata;
+ struct ns16550_platdata *plat = dev->plat;
fdt_addr_t addr;
struct clk clk;
int err;
@@ -158,7 +158,7 @@ U_BOOT_DRIVER(omap_serial) = {
#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)
.of_match = omap_serial_ids,
.ofdata_to_platdata = omap_serial_ofdata_to_platdata,
- .platdata_auto = sizeof(struct ns16550_platdata),
+ .plat_auto = sizeof(struct ns16550_platdata),
#endif
.priv_auto = sizeof(struct NS16550),
.probe = ns16550_serial_probe,
diff --git a/drivers/serial/serial_pl01x.c b/drivers/serial/serial_pl01x.c
index 4e201287bf..3a876fe2f2 100644
--- a/drivers/serial/serial_pl01x.c
+++ b/drivers/serial/serial_pl01x.c
@@ -388,7 +388,7 @@ U_BOOT_DRIVER(serial_pl01x) = {
.id = UCLASS_SERIAL,
.of_match = of_match_ptr(pl01x_serial_id),
.ofdata_to_platdata = of_match_ptr(pl01x_serial_ofdata_to_platdata),
- .platdata_auto = sizeof(struct pl01x_serial_platdata),
+ .plat_auto = sizeof(struct pl01x_serial_platdata),
.probe = pl01x_serial_probe,
.ops = &pl01x_serial_ops,
.flags = DM_FLAG_PRE_RELOC,
diff --git a/drivers/serial/serial_pxa.c b/drivers/serial/serial_pxa.c
index 6f8f7e1198..232218dcdc 100644
--- a/drivers/serial/serial_pxa.c
+++ b/drivers/serial/serial_pxa.c
@@ -268,7 +268,7 @@ void pxa_serial_initialize(void)
#ifdef CONFIG_DM_SERIAL
static int pxa_serial_probe(struct udevice *dev)
{
- struct pxa_serial_platdata *plat = dev->platdata;
+ struct pxa_serial_platdata *plat = dev->plat;
pxa_setbrg_common((struct pxa_uart_regs *)plat->base, plat->port,
plat->baudrate);
@@ -277,7 +277,7 @@ static int pxa_serial_probe(struct udevice *dev)
static int pxa_serial_putc(struct udevice *dev, const char ch)
{
- struct pxa_serial_platdata *plat = dev->platdata;
+ struct pxa_serial_platdata *plat = dev->plat;
struct pxa_uart_regs *uart_regs = (struct pxa_uart_regs *)plat->base;
/* Wait for last character to go. */
@@ -291,7 +291,7 @@ static int pxa_serial_putc(struct udevice *dev, const char ch)
static int pxa_serial_getc(struct udevice *dev)
{
- struct pxa_serial_platdata *plat = dev->platdata;
+ struct pxa_serial_platdata *plat = dev->plat;
struct pxa_uart_regs *uart_regs = (struct pxa_uart_regs *)plat->base;
/* Wait for a character to arrive. */
@@ -303,7 +303,7 @@ static int pxa_serial_getc(struct udevice *dev)
int pxa_serial_setbrg(struct udevice *dev, int baudrate)
{
- struct pxa_serial_platdata *plat = dev->platdata;
+ struct pxa_serial_platdata *plat = dev->plat;
struct pxa_uart_regs *uart_regs = (struct pxa_uart_regs *)plat->base;
int port = plat->port;
@@ -314,7 +314,7 @@ int pxa_serial_setbrg(struct udevice *dev, int baudrate)
static int pxa_serial_pending(struct udevice *dev, bool input)
{
- struct pxa_serial_platdata *plat = dev->platdata;
+ struct pxa_serial_platdata *plat = dev->plat;
struct pxa_uart_regs *uart_regs = (struct pxa_uart_regs *)plat->base;
if (input)
diff --git a/drivers/serial/serial_rockchip.c b/drivers/serial/serial_rockchip.c
index 74245f8d5d..e00df4b21a 100644
--- a/drivers/serial/serial_rockchip.c
+++ b/drivers/serial/serial_rockchip.c
@@ -34,7 +34,7 @@ static int rockchip_serial_probe(struct udevice *dev)
plat->plat.reg_shift = plat->dtplat.reg_shift;
plat->plat.clock = plat->dtplat.clock_frequency;
plat->plat.fcr = UART_FCR_DEFVAL;
- dev->platdata = &plat->plat;
+ dev->plat = &plat->plat;
return ns16550_serial_probe(dev);
}
@@ -43,7 +43,7 @@ U_BOOT_DRIVER(rockchip_rk3188_uart) = {
.name = "rockchip_rk3188_uart",
.id = UCLASS_SERIAL,
.priv_auto = sizeof(struct NS16550),
- .platdata_auto = sizeof(struct rockchip_uart_platdata),
+ .plat_auto = sizeof(struct rockchip_uart_platdata),
.probe = rockchip_serial_probe,
.ops = &ns16550_serial_ops,
.flags = DM_FLAG_PRE_RELOC,
@@ -53,7 +53,7 @@ U_BOOT_DRIVER(rockchip_rk3288_uart) = {
.name = "rockchip_rk3288_uart",
.id = UCLASS_SERIAL,
.priv_auto = sizeof(struct NS16550),
- .platdata_auto = sizeof(struct rockchip_uart_platdata),
+ .plat_auto = sizeof(struct rockchip_uart_platdata),
.probe = rockchip_serial_probe,
.ops = &ns16550_serial_ops,
.flags = DM_FLAG_PRE_RELOC,
diff --git a/drivers/serial/serial_s5p.c b/drivers/serial/serial_s5p.c
index df50210dbd..03a85c078a 100644
--- a/drivers/serial/serial_s5p.c
+++ b/drivers/serial/serial_s5p.c
@@ -88,7 +88,7 @@ static void __maybe_unused s5p_serial_baud(struct s5p_uart *uart, uint uclk,
#ifndef CONFIG_SPL_BUILD
int s5p_serial_setbrg(struct udevice *dev, int baudrate)
{
- struct s5p_serial_platdata *plat = dev->platdata;
+ struct s5p_serial_platdata *plat = dev->plat;
struct s5p_uart *const uart = plat->reg;
u32 uclk;
@@ -111,7 +111,7 @@ int s5p_serial_setbrg(struct udevice *dev, int baudrate)
static int s5p_serial_probe(struct udevice *dev)
{
- struct s5p_serial_platdata *plat = dev->platdata;
+ struct s5p_serial_platdata *plat = dev->plat;
struct s5p_uart *const uart = plat->reg;
s5p_serial_init(uart);
@@ -140,7 +140,7 @@ static int serial_err_check(const struct s5p_uart *const uart, int op)
static int s5p_serial_getc(struct udevice *dev)
{
- struct s5p_serial_platdata *plat = dev->platdata;
+ struct s5p_serial_platdata *plat = dev->plat;
struct s5p_uart *const uart = plat->reg;
if (!(readl(&uart->ufstat) & RX_FIFO_COUNT_MASK))
@@ -152,7 +152,7 @@ static int s5p_serial_getc(struct udevice *dev)
static int s5p_serial_putc(struct udevice *dev, const char ch)
{
- struct s5p_serial_platdata *plat = dev->platdata;
+ struct s5p_serial_platdata *plat = dev->plat;
struct s5p_uart *const uart = plat->reg;
if (readl(&uart->ufstat) & TX_FIFO_FULL)
@@ -166,7 +166,7 @@ static int s5p_serial_putc(struct udevice *dev, const char ch)
static int s5p_serial_pending(struct udevice *dev, bool input)
{
- struct s5p_serial_platdata *plat = dev->platdata;
+ struct s5p_serial_platdata *plat = dev->plat;
struct s5p_uart *const uart = plat->reg;
uint32_t ufstat = readl(&uart->ufstat);
@@ -178,7 +178,7 @@ static int s5p_serial_pending(struct udevice *dev, bool input)
static int s5p_serial_ofdata_to_platdata(struct udevice *dev)
{
- struct s5p_serial_platdata *plat = dev->platdata;
+ struct s5p_serial_platdata *plat = dev->plat;
fdt_addr_t addr;
addr = dev_read_addr(dev);
@@ -208,7 +208,7 @@ U_BOOT_DRIVER(serial_s5p) = {
.id = UCLASS_SERIAL,
.of_match = s5p_serial_ids,
.ofdata_to_platdata = s5p_serial_ofdata_to_platdata,
- .platdata_auto = sizeof(struct s5p_serial_platdata),
+ .plat_auto = sizeof(struct s5p_serial_platdata),
.probe = s5p_serial_probe,
.ops = &s5p_serial_ops,
};
diff --git a/drivers/serial/serial_sh.c b/drivers/serial/serial_sh.c
index 4e37ab0c31..0cac2b9740 100644
--- a/drivers/serial/serial_sh.c
+++ b/drivers/serial/serial_sh.c
@@ -240,7 +240,7 @@ U_BOOT_DRIVER(serial_sh) = {
.id = UCLASS_SERIAL,
.of_match = of_match_ptr(sh_serial_id),
.ofdata_to_platdata = of_match_ptr(sh_serial_ofdata_to_platdata),
- .platdata_auto = sizeof(struct sh_serial_platdata),
+ .plat_auto = sizeof(struct sh_serial_platdata),
.probe = sh_serial_probe,
.ops = &sh_serial_ops,
#if !CONFIG_IS_ENABLED(OF_CONTROL)
diff --git a/drivers/serial/serial_sifive.c b/drivers/serial/serial_sifive.c
index 710bb72363..276f0902db 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 *platdata = dev_get_platdata(dev);
+ struct sifive_uart_platdata *plat = dev_get_platdata(dev);
u32 clock = 0;
ret = clk_get_by_index(dev, 0, &clk);
@@ -123,21 +123,21 @@ static int sifive_serial_setbrg(struct udevice *dev, int baudrate)
return 0;
}
}
- platdata->clock = clock;
- _sifive_serial_setbrg(platdata->regs, platdata->clock, baudrate);
+ plat->clock = clock;
+ _sifive_serial_setbrg(plat->regs, plat->clock, baudrate);
return 0;
}
static int sifive_serial_probe(struct udevice *dev)
{
- struct sifive_uart_platdata *platdata = dev_get_platdata(dev);
+ struct sifive_uart_platdata *plat = dev_get_platdata(dev);
/* No need to reinitialize the UART after relocation */
if (gd->flags & GD_FLG_RELOC)
return 0;
- _sifive_serial_init(platdata->regs);
+ _sifive_serial_init(plat->regs);
return 0;
}
@@ -145,8 +145,8 @@ static int sifive_serial_probe(struct udevice *dev)
static int sifive_serial_getc(struct udevice *dev)
{
int c;
- struct sifive_uart_platdata *platdata = dev_get_platdata(dev);
- struct uart_sifive *regs = platdata->regs;
+ struct sifive_uart_platdata *plat = dev_get_platdata(dev);
+ struct uart_sifive *regs = plat->regs;
while ((c = _sifive_serial_getc(regs)) == -EAGAIN) ;
@@ -156,17 +156,17 @@ 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 *platdata = dev_get_platdata(dev);
+ struct sifive_uart_platdata *plat = dev_get_platdata(dev);
- while ((rc = _sifive_serial_putc(platdata->regs, ch)) == -EAGAIN) ;
+ while ((rc = _sifive_serial_putc(plat->regs, ch)) == -EAGAIN) ;
return rc;
}
static int sifive_serial_pending(struct udevice *dev, bool input)
{
- struct sifive_uart_platdata *platdata = dev_get_platdata(dev);
- struct uart_sifive *regs = platdata->regs;
+ struct sifive_uart_platdata *plat = dev_get_platdata(dev);
+ struct uart_sifive *regs = plat->regs;
if (input)
return (readl(&regs->ip) & UART_IP_RXWM);
@@ -176,11 +176,11 @@ static int sifive_serial_pending(struct udevice *dev, bool input)
static int sifive_serial_ofdata_to_platdata(struct udevice *dev)
{
- struct sifive_uart_platdata *platdata = dev_get_platdata(dev);
+ struct sifive_uart_platdata *plat = dev_get_platdata(dev);
- platdata->regs = (struct uart_sifive *)dev_read_addr(dev);
- if (IS_ERR(platdata->regs))
- return PTR_ERR(platdata->regs);
+ plat->regs = (struct uart_sifive *)dev_read_addr(dev);
+ if (IS_ERR(plat->regs))
+ return PTR_ERR(plat->regs);
return 0;
}
@@ -202,7 +202,7 @@ U_BOOT_DRIVER(serial_sifive) = {
.id = UCLASS_SERIAL,
.of_match = sifive_serial_ids,
.ofdata_to_platdata = sifive_serial_ofdata_to_platdata,
- .platdata_auto = sizeof(struct sifive_uart_platdata),
+ .plat_auto = sizeof(struct sifive_uart_platdata),
.probe = sifive_serial_probe,
.ops = &sifive_serial_ops,
};
diff --git a/drivers/serial/serial_stm32.c b/drivers/serial/serial_stm32.c
index a8e0320750..210b5b5139 100644
--- a/drivers/serial/serial_stm32.c
+++ b/drivers/serial/serial_stm32.c
@@ -241,7 +241,7 @@ U_BOOT_DRIVER(serial_stm32) = {
.id = UCLASS_SERIAL,
.of_match = of_match_ptr(stm32_serial_id),
.ofdata_to_platdata = of_match_ptr(stm32_serial_ofdata_to_platdata),
- .platdata_auto = sizeof(struct stm32x7_serial_platdata),
+ .plat_auto = sizeof(struct stm32x7_serial_platdata),
.ops = &stm32_serial_ops,
.probe = stm32_serial_probe,
#if !CONFIG_IS_ENABLED(OF_CONTROL)
diff --git a/drivers/serial/serial_xuartlite.c b/drivers/serial/serial_xuartlite.c
index bc039492ef..eb76c7800e 100644
--- a/drivers/serial/serial_xuartlite.c
+++ b/drivers/serial/serial_xuartlite.c
@@ -132,7 +132,7 @@ U_BOOT_DRIVER(serial_uartlite) = {
.id = UCLASS_SERIAL,
.of_match = uartlite_serial_ids,
.ofdata_to_platdata = uartlite_serial_ofdata_to_platdata,
- .platdata_auto = sizeof(struct uartlite_platdata),
+ .plat_auto = sizeof(struct uartlite_platdata),
.probe = uartlite_serial_probe,
.ops = &uartlite_serial_ops,
};
diff --git a/drivers/serial/serial_zynq.c b/drivers/serial/serial_zynq.c
index d04c399019..7984b61ce1 100644
--- a/drivers/serial/serial_zynq.c
+++ b/drivers/serial/serial_zynq.c
@@ -107,7 +107,7 @@ static int _uart_zynq_serial_putc(struct uart_zynq *regs, const char c)
static int zynq_serial_setbrg(struct udevice *dev, int baudrate)
{
- struct zynq_uart_platdata *platdata = dev_get_platdata(dev);
+ struct zynq_uart_platdata *plat = dev_get_platdata(dev);
unsigned long clock;
int ret;
@@ -132,15 +132,15 @@ static int zynq_serial_setbrg(struct udevice *dev, int baudrate)
return ret;
}
- _uart_zynq_serial_setbrg(platdata->regs, clock, baudrate);
+ _uart_zynq_serial_setbrg(plat->regs, clock, baudrate);
return 0;
}
static int zynq_serial_probe(struct udevice *dev)
{
- struct zynq_uart_platdata *platdata = dev_get_platdata(dev);
- struct uart_zynq *regs = platdata->regs;
+ struct zynq_uart_platdata *plat = dev_get_platdata(dev);
+ struct uart_zynq *regs = plat->regs;
u32 val;
/* No need to reinitialize the UART if TX already enabled */
@@ -148,15 +148,15 @@ static int zynq_serial_probe(struct udevice *dev)
if (val & ZYNQ_UART_CR_TX_EN)
return 0;
- _uart_zynq_serial_init(platdata->regs);
+ _uart_zynq_serial_init(plat->regs);
return 0;
}
static int zynq_serial_getc(struct udevice *dev)
{
- struct zynq_uart_platdata *platdata = dev_get_platdata(dev);
- struct uart_zynq *regs = platdata->regs;
+ struct zynq_uart_platdata *plat = dev_get_platdata(dev);
+ struct uart_zynq *regs = plat->regs;
if (readl(&regs->channel_sts) & ZYNQ_UART_SR_RXEMPTY)
return -EAGAIN;
@@ -166,15 +166,15 @@ static int zynq_serial_getc(struct udevice *dev)
static int zynq_serial_putc(struct udevice *dev, const char ch)
{
- struct zynq_uart_platdata *platdata = dev_get_platdata(dev);
+ struct zynq_uart_platdata *plat = dev_get_platdata(dev);
- return _uart_zynq_serial_putc(platdata->regs, ch);
+ return _uart_zynq_serial_putc(plat->regs, ch);
}
static int zynq_serial_pending(struct udevice *dev, bool input)
{
- struct zynq_uart_platdata *platdata = dev_get_platdata(dev);
- struct uart_zynq *regs = platdata->regs;
+ struct zynq_uart_platdata *plat = dev_get_platdata(dev);
+ struct uart_zynq *regs = plat->regs;
if (input)
return !(readl(&regs->channel_sts) & ZYNQ_UART_SR_RXEMPTY);
@@ -184,11 +184,11 @@ static int zynq_serial_pending(struct udevice *dev, bool input)
static int zynq_serial_ofdata_to_platdata(struct udevice *dev)
{
- struct zynq_uart_platdata *platdata = dev_get_platdata(dev);
+ struct zynq_uart_platdata *plat = dev_get_platdata(dev);
- platdata->regs = (struct uart_zynq *)dev_read_addr(dev);
- if (IS_ERR(platdata->regs))
- return PTR_ERR(platdata->regs);
+ plat->regs = (struct uart_zynq *)dev_read_addr(dev);
+ if (IS_ERR(plat->regs))
+ return PTR_ERR(plat->regs);
return 0;
}
@@ -212,7 +212,7 @@ U_BOOT_DRIVER(serial_zynq) = {
.id = UCLASS_SERIAL,
.of_match = zynq_serial_ids,
.ofdata_to_platdata = zynq_serial_ofdata_to_platdata,
- .platdata_auto = sizeof(struct zynq_uart_platdata),
+ .plat_auto = sizeof(struct zynq_uart_platdata),
.probe = zynq_serial_probe,
.ops = &zynq_serial_ops,
};