summaryrefslogtreecommitdiff
path: root/drivers/serial/serial_rockchip.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2021-01-11 13:55:03 -0500
committerTom Rini <trini@konsulko.com>2021-01-11 13:55:03 -0500
commitd71be1990218957b9f05dbf13a72859a2abe06d7 (patch)
tree99858dc9988f7f7b4c0ab1d8d45738e3abdf38c8 /drivers/serial/serial_rockchip.c
parentc4fddedc48f336eabc4ce3f74940e6aa372de18c (diff)
parentbc0b99bd8b19599f670f42401de655fa9b44cd94 (diff)
downloadu-boot-d71be1990218957b9f05dbf13a72859a2abe06d7.tar.gz
Merge branch 'next'
Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'drivers/serial/serial_rockchip.c')
-rw-r--r--drivers/serial/serial_rockchip.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/drivers/serial/serial_rockchip.c b/drivers/serial/serial_rockchip.c
index b1718f72d1..97d40869a2 100644
--- a/drivers/serial/serial_rockchip.c
+++ b/drivers/serial/serial_rockchip.c
@@ -10,31 +10,32 @@
#include <ns16550.h>
#include <serial.h>
#include <asm/arch-rockchip/clock.h>
+#include <dm/device-internal.h>
#if defined(CONFIG_ROCKCHIP_RK3188)
-struct rockchip_uart_platdata {
+struct rockchip_uart_plat {
struct dtd_rockchip_rk3188_uart dtplat;
- struct ns16550_platdata plat;
+ struct ns16550_plat plat;
};
struct dtd_rockchip_rk3188_uart *dtplat, s_dtplat;
#elif defined(CONFIG_ROCKCHIP_RK3288)
-struct rockchip_uart_platdata {
+struct rockchip_uart_plat {
struct dtd_rockchip_rk3288_uart dtplat;
- struct ns16550_platdata plat;
+ struct ns16550_plat plat;
};
struct dtd_rockchip_rk3288_uart *dtplat, s_dtplat;
#endif
static int rockchip_serial_probe(struct udevice *dev)
{
- struct rockchip_uart_platdata *plat = dev_get_platdata(dev);
+ struct rockchip_uart_plat *plat = dev_get_plat(dev);
/* Create some new platform data for the standard driver */
plat->plat.base = plat->dtplat.reg[0];
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_set_plat(dev, &plat->plat);
return ns16550_serial_probe(dev);
}
@@ -42,8 +43,8 @@ static int rockchip_serial_probe(struct udevice *dev)
U_BOOT_DRIVER(rockchip_rk3188_uart) = {
.name = "rockchip_rk3188_uart",
.id = UCLASS_SERIAL,
- .priv_auto_alloc_size = sizeof(struct NS16550),
- .platdata_auto_alloc_size = sizeof(struct rockchip_uart_platdata),
+ .priv_auto = sizeof(struct ns16550),
+ .plat_auto = sizeof(struct rockchip_uart_plat),
.probe = rockchip_serial_probe,
.ops = &ns16550_serial_ops,
.flags = DM_FLAG_PRE_RELOC,
@@ -52,8 +53,8 @@ U_BOOT_DRIVER(rockchip_rk3188_uart) = {
U_BOOT_DRIVER(rockchip_rk3288_uart) = {
.name = "rockchip_rk3288_uart",
.id = UCLASS_SERIAL,
- .priv_auto_alloc_size = sizeof(struct NS16550),
- .platdata_auto_alloc_size = sizeof(struct rockchip_uart_platdata),
+ .priv_auto = sizeof(struct ns16550),
+ .plat_auto = sizeof(struct rockchip_uart_plat),
.probe = rockchip_serial_probe,
.ops = &ns16550_serial_ops,
.flags = DM_FLAG_PRE_RELOC,