[PATCH 2/6] ufs: core: Fold ufs-uclass into ufs

Neil Armstrong neil.armstrong at linaro.org
Tue Oct 28 09:14:42 CET 2025


On 10/27/25 18:06, Marek Vasut wrote:
> Move the few lines of ufs-uclass.c into ufs.c and remove the
> ufs-uclass.c . No functional change.
> 
> Signed-off-by: Marek Vasut <marek.vasut+renesas at mailbox.org>
> ---
> Cc: Bhupesh Sharma <bhupesh.linux at gmail.com>
> Cc: Casey Connolly <casey.connolly at linaro.org>
> Cc: Michal Simek <michal.simek at amd.com>
> Cc: Neha Malcom Francis <n-francis at ti.com>
> Cc: Neil Armstrong <neil.armstrong at linaro.org>
> Cc: Nobuhiro Iwamatsu <iwamatsu at nigauri.org>
> Cc: Sumit Garg <sumit.garg at kernel.org>
> Cc: Tom Rini <trini at konsulko.com>
> Cc: Tuyen Dang <tuyen.dang.xa at renesas.com>
> Cc: Venkatesh Yadav Abbarapu <venkatesh.abbarapu at amd.com>
> Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh at renesas.com>
> Cc: u-boot-qcom at groups.io
> Cc: u-boot at lists.denx.de
> ---
>   drivers/ufs/Makefile     |  2 +-
>   drivers/ufs/ufs-uclass.c | 17 -----------------
>   drivers/ufs/ufs.c        |  6 ++++++
>   3 files changed, 7 insertions(+), 18 deletions(-)
>   delete mode 100644 drivers/ufs/ufs-uclass.c
> 
> diff --git a/drivers/ufs/Makefile b/drivers/ufs/Makefile
> index 548306fb99e..2ac410cf7c3 100644
> --- a/drivers/ufs/Makefile
> +++ b/drivers/ufs/Makefile
> @@ -3,7 +3,7 @@
>   # Copyright (C) 2019 Texas Instruments Incorporated - https://www.ti.com
>   #
>   
> -obj-$(CONFIG_UFS) += ufs.o ufs-uclass.o
> +obj-$(CONFIG_UFS) += ufs.o
>   obj-$(CONFIG_CADENCE_UFS) += cdns-platform.o
>   obj-$(CONFIG_QCOM_UFS) += ufs-qcom.o
>   obj-$(CONFIG_TI_J721E_UFS) += ti-j721e-ufs.o
> diff --git a/drivers/ufs/ufs-uclass.c b/drivers/ufs/ufs-uclass.c
> deleted file mode 100644
> index 334bfcfa06a..00000000000
> --- a/drivers/ufs/ufs-uclass.c
> +++ /dev/null
> @@ -1,17 +0,0 @@
> -// SPDX-License-Identifier: GPL-2.0
> -/**
> - * ufs-uclass.c - Universal Flash Storage (UFS) Uclass driver
> - *
> - * Copyright (C) 2019 Texas Instruments Incorporated - https://www.ti.com
> - */
> -
> -#define LOG_CATEGORY UCLASS_UFS
> -
> -#include "ufs.h"
> -#include <dm.h>
> -
> -UCLASS_DRIVER(ufs) = {
> -	.id	= UCLASS_UFS,
> -	.name	= "ufs",
> -	.per_device_auto	= sizeof(struct ufs_hba),
> -};
> diff --git a/drivers/ufs/ufs.c b/drivers/ufs/ufs.c
> index 57e6e8c013b..c1f3301b37e 100644
> --- a/drivers/ufs/ufs.c
> +++ b/drivers/ufs/ufs.c
> @@ -2091,3 +2091,9 @@ U_BOOT_DRIVER(ufs_scsi) = {
>   	.name = "ufs_scsi",
>   	.ops = &ufs_ops,
>   };
> +
> +UCLASS_DRIVER(ufs) = {
> +	.id			= UCLASS_UFS,
> +	.name			= "ufs",
> +	.per_device_auto	= sizeof(struct ufs_hba),
> +};

This breaks the implicit rule to have a <uclass>-uclass.c file, but I'm fine with that

Reviewed-by: Neil Armstrong <neil.armstrong at linaro.org>


More information about the U-Boot mailing list