[PATCH v5 11/13] rockchip: serial: rename U_BOOT_DRIVER name to rockchip_uart

Kever Yang kever.yang at rock-chips.com
Mon Apr 11 04:25:37 CEST 2022


On 2022/4/10 00:55, Johan Jonker wrote:
> When a defconfig for rk3288 is compiled it gives the warning:
>
> rockchip_rk3288_uart: Missing .compatible in
>                        ./drivers/serial/serial_rockchip.c
>                      : WARNING: the driver rockchip_rk3288_uart
>                        was not found in the driver list
>
> Fix by renaming U_BOOT_DRIVER name of serial_rockchip.c
> to rockchip_uart. Add rk3288 serial support with
> a DM_DRIVER_ALIAS define.
>
> Signed-off-by: Johan Jonker <jbx6244 at gmail.com>
Reviewed-by: Kever Yang <kever.yang at rock-chips.com>

Thanks,
- Kever
> ---
>   drivers/serial/serial_rockchip.c | 17 +++++++++--------
>   1 file changed, 9 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/serial/serial_rockchip.c b/drivers/serial/serial_rockchip.c
> index 10e731caa1..f4e9422ed9 100644
> --- a/drivers/serial/serial_rockchip.c
> +++ b/drivers/serial/serial_rockchip.c
> @@ -14,13 +14,13 @@
>   
>   struct rockchip_uart_plat {
>   #if CONFIG_IS_ENABLED(OF_PLATDATA)
> -	struct dtd_rockchip_rk3288_uart dtplat;
> +	struct dtd_rockchip_uart dtplat;
>   #endif
>   	struct ns16550_plat plat;
>   };
>   
>   #if CONFIG_IS_ENABLED(OF_PLATDATA)
> -struct dtd_rockchip_rk3288_uart *dtplat, s_dtplat;
> +struct dtd_rockchip_uart *dtplat, s_dtplat;
>   #endif
>   
>   static int rockchip_serial_probe(struct udevice *dev)
> @@ -41,8 +41,8 @@ static int rockchip_serial_probe(struct udevice *dev)
>   #endif
>   }
>   
> -U_BOOT_DRIVER(rockchip_rk3288_uart) = {
> -	.name		= "rockchip_rk3288_uart",
> +U_BOOT_DRIVER(rockchip_uart) = {
> +	.name		= "rockchip_uart",
>   	.id		= UCLASS_SERIAL,
>   	.priv_auto	= sizeof(struct ns16550),
>   	.plat_auto	= sizeof(struct rockchip_uart_plat),
> @@ -50,7 +50,8 @@ U_BOOT_DRIVER(rockchip_rk3288_uart) = {
>   	.ops		= &ns16550_serial_ops,
>   	.flags		= DM_FLAG_PRE_RELOC,
>   };
> -DM_DRIVER_ALIAS(rockchip_rk3288_uart, rockchip_rk3066_uart)
> -DM_DRIVER_ALIAS(rockchip_rk3288_uart, rockchip_rk3188_uart)
> -DM_DRIVER_ALIAS(rockchip_rk3288_uart, rockchip_rk3328_uart)
> -DM_DRIVER_ALIAS(rockchip_rk3288_uart, rockchip_rk3368_uart)
> +DM_DRIVER_ALIAS(rockchip_uart, rockchip_rk3066_uart)
> +DM_DRIVER_ALIAS(rockchip_uart, rockchip_rk3188_uart)
> +DM_DRIVER_ALIAS(rockchip_uart, rockchip_rk3288_uart)
> +DM_DRIVER_ALIAS(rockchip_uart, rockchip_rk3328_uart)
> +DM_DRIVER_ALIAS(rockchip_uart, rockchip_rk3368_uart)


More information about the U-Boot mailing list