[PATCH 2/3] remoteproc: Remove unused mem_type platform data

Tom Rini trini at konsulko.com
Mon Feb 20 17:54:28 CET 2023


On Mon, Feb 20, 2023 at 12:13:02AM -0600, Samuel Holland wrote:

> There is only one possible value for this field, it is unused except for
> debugging, and the devicetree property is not documented.
> 
> Signed-off-by: Samuel Holland <samuel at sholland.org>
> ---
> 
>  cmd/remoteproc.c                                  | 12 +-----------
>  doc/develop/driver-model/remoteproc-framework.rst |  1 -
>  drivers/remoteproc/rproc-uclass.c                 |  7 -------
>  drivers/remoteproc/sandbox_testproc.c             |  1 -
>  include/remoteproc.h                              | 15 ---------------
>  5 files changed, 1 insertion(+), 35 deletions(-)
> 
> diff --git a/cmd/remoteproc.c b/cmd/remoteproc.c
> index ca3b436242a..2b2e52e7d3e 100644
> --- a/cmd/remoteproc.c
> +++ b/cmd/remoteproc.c
> @@ -20,7 +20,6 @@ static int print_remoteproc_list(void)
>  	struct udevice *dev;
>  	struct uclass *uc;
>  	int ret;
> -	char *type;
>  
>  	ret = uclass_get(UCLASS_REMOTEPROC, &uc);
>  	if (ret) {
> @@ -38,18 +37,9 @@ static int print_remoteproc_list(void)
>  		if (!(dev_get_flags(dev) & DM_FLAG_ACTIVATED))
>  			continue;
>  
> -		switch (uc_pdata->mem_type) {
> -		case RPROC_INTERNAL_MEMORY_MAPPED:
> -			type = "internal memory mapped";
> -			break;
> -		default:
> -			type = "unknown";
> -			break;
> -		}
> -		printf("%d - Name:'%s' type:'%s' supports: %s%s%s%s%s%s\n",
> +		printf("%d - Name:'%s' supports: %s%s%s%s%s%s\n",
>  		       dev_seq(dev),
>  		       uc_pdata->name,
> -		       type,
>  		       ops->load ? "load " : "",
>  		       ops->start ? "start " : "",
>  		       ops->stop ? "stop " : "",
> diff --git a/doc/develop/driver-model/remoteproc-framework.rst b/doc/develop/driver-model/remoteproc-framework.rst
> index 566495a21c4..bdbbb8ab7be 100644
> --- a/doc/develop/driver-model/remoteproc-framework.rst
> +++ b/doc/develop/driver-model/remoteproc-framework.rst
> @@ -121,7 +121,6 @@ a simplified definition of a device is as follows:
>  
>  	struct dm_rproc_uclass_pdata proc_3_test = {
>  		.name = "proc_3_legacy",
> -		.mem_type = RPROC_INTERNAL_MEMORY_MAPPED,
>  		.driver_plat_data = &mydriver_data;
>  	};
>  
> diff --git a/drivers/remoteproc/rproc-uclass.c b/drivers/remoteproc/rproc-uclass.c
> index 50bcc9030e9..3eacd4a8d9b 100644
> --- a/drivers/remoteproc/rproc-uclass.c
> +++ b/drivers/remoteproc/rproc-uclass.c
> @@ -136,12 +136,6 @@ static int rproc_pre_probe(struct udevice *dev)
>  		bool tmp;
>  		debug("'%s': using fdt\n", dev->name);
>  		uc_pdata->name = dev_read_string(dev, "remoteproc-name");
> -
> -		/* Default is internal memory mapped */
> -		uc_pdata->mem_type = RPROC_INTERNAL_MEMORY_MAPPED;
> -		tmp = dev_read_bool(dev, "remoteproc-internal-memory-mapped");
> -		if (tmp)
> -			uc_pdata->mem_type = RPROC_INTERNAL_MEMORY_MAPPED;
>  #else
>  		/* Nothing much we can do about this, can we? */
>  		return -EINVAL;
> @@ -153,7 +147,6 @@ static int rproc_pre_probe(struct udevice *dev)
>  		debug("'%s': using legacy data\n", dev->name);
>  		if (pdata->name)
>  			uc_pdata->name = pdata->name;
> -		uc_pdata->mem_type = pdata->mem_type;
>  		uc_pdata->driver_plat_data = pdata->driver_plat_data;
>  	}
>  
> diff --git a/drivers/remoteproc/sandbox_testproc.c b/drivers/remoteproc/sandbox_testproc.c
> index 78b108184bb..4cb784ce32e 100644
> --- a/drivers/remoteproc/sandbox_testproc.c
> +++ b/drivers/remoteproc/sandbox_testproc.c
> @@ -349,7 +349,6 @@ U_BOOT_DRIVER(sandbox_testproc) = {
>  /* TODO(nm at ti.com): Remove this along with non-DT support */
>  static struct dm_rproc_uclass_pdata proc_3_test = {
>  	.name = "proc_3_legacy",
> -	.mem_type = RPROC_INTERNAL_MEMORY_MAPPED,
>  };
>  
>  U_BOOT_DRVINFO(proc_3_demo) = {
> diff --git a/include/remoteproc.h b/include/remoteproc.h
> index d8cde73748b..0c4d64706d9 100644
> --- a/include/remoteproc.h
> +++ b/include/remoteproc.h
> @@ -383,23 +383,9 @@ struct rproc {
>  	u32 trace_len;
>  };
>  
> -/**
> - * enum rproc_mem_type - What type of memory model does the rproc use
> - * @RPROC_INTERNAL_MEMORY_MAPPED: Remote processor uses own memory and is memory
> - *	mapped to the host processor over an address range.
> - *
> - * Please note that this is an enumeration of memory model of different types
> - * of remote processors. Few of the remote processors do have own internal
> - * memories, while others use external memory for instruction and data.
> - */
> -enum rproc_mem_type {
> -	RPROC_INTERNAL_MEMORY_MAPPED	= 0,
> -};
> -
>  /**
>   * struct dm_rproc_uclass_pdata - platform data for a CPU
>   * @name: Platform-specific way of naming the Remote proc
> - * @mem_type: one of 'enum rproc_mem_type'
>   * @driver_plat_data: driver specific platform data that may be needed.
>   *
>   * This can be accessed with dev_get_uclass_plat() for any UCLASS_REMOTEPROC
> @@ -408,7 +394,6 @@ enum rproc_mem_type {
>   */
>  struct dm_rproc_uclass_pdata {
>  	const char *name;
> -	enum rproc_mem_type mem_type;
>  	void *driver_plat_data;
>  };
>  

Adding Nishanth, since he knows the TI remoteproc stuff.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20230220/1fa715bb/attachment.sig>


More information about the U-Boot mailing list