[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <32e308fa-1118-e17a-8038-c28cb2484c92@linaro.org>
Date: Wed, 13 Sep 2023 13:34:01 +0200
From: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To: Hari Nagalla <hnagalla@...com>, andersson@...nel.org,
mathieu.poirier@...aro.org, p.zabel@...gutronix.de,
martyn.welch@...labora.com, robh+dt@...nel.org,
krzysztof.kozlowski+dt@...aro.org, conor+dt@...nel.org
Cc: linux-remoteproc@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, devicetree@...r.kernel.org
Subject: Re: [PATCH v6 2/4] remoteproc: k3: Split out data structures common
with M4 driver
On 13/09/2023 13:16, Hari Nagalla wrote:
> From: Martyn Welch <martyn.welch@...labora.com>
>
> We will be adding the M4F driver which shares a lot of commonality
> with the DSP driver. Common data structures are introduced here.
>
> Signed-off-by: Martyn Welch <martyn.welch@...labora.com>
> Signed-off-by: Hari Nagalla <hnagalla@...com>
> ---
> Changes in v6:
> - Created a separate patch for data structures to ease review
>
> drivers/remoteproc/ti_k3_common.h | 103 ++++++++++++++++++++++++++++++
> 1 file changed, 103 insertions(+)
> create mode 100644 drivers/remoteproc/ti_k3_common.h
>
> diff --git a/drivers/remoteproc/ti_k3_common.h b/drivers/remoteproc/ti_k3_common.h
> new file mode 100644
> index 000000000000..5e1f27741183
> --- /dev/null
> +++ b/drivers/remoteproc/ti_k3_common.h
> @@ -0,0 +1,103 @@
> +/* SPDX-License-Identifier: GPL-2.0-only */
> +/*
> + * TI K3 Remote Processor(s) driver common code
> + *
> + * Refactored from ti_k3_dsp_remoteproc.c.
> + *
> + * ti_k3_dsp_remoteproc.c:
> + * Copyright (C) 2018-2022 Texas Instruments Incorporated - https://www.ti.com/
> + * Suman Anna <s-anna@...com>
> + */
> +
> +#ifndef REMOTEPROC_TI_K3_COMMON_H
> +#define REMOTEPROC_TI_K3_COMMON_H
> +
> +#define KEYSTONE_RPROC_LOCAL_ADDRESS_MASK (SZ_16M - 1)
> +
> +/**
> + * struct k3_rproc_mem - internal memory structure
> + * @cpu_addr: MPU virtual address of the memory region
> + * @bus_addr: Bus address used to access the memory region
> + * @dev_addr: Device address of the memory region from DSP view
> + * @size: Size of the memory region
> + */
> +struct k3_rproc_mem {
> + void __iomem *cpu_addr;
> + phys_addr_t bus_addr;
> + u32 dev_addr;
> + size_t size;
Where is the split? I see only addition here.
Where is the usage of this header? This is basically dead code. Don't
add dead code, but instead actually move the structures here! Move is
cut and paste, not just paste.
Best regards,
Krzysztof
Powered by blists - more mailing lists