From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yu-Chien Peter Lin Date: Wed, 21 Dec 2022 14:22:32 +0000 Subject: [RFC PATCH] platform: generic: renesas: Add support to configure the PMA In-Reply-To: References: <20221212094421.14556-1-prabhakar.mahadev-lad.rj@bp.renesas.com> Message-ID: List-Id: To: opensbi@lists.infradead.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Wed, Dec 21, 2022 at 09:23:21AM +0800, Bin Meng wrote: > On Mon, Dec 12, 2022 at 5:44 PM Lad Prabhakar > wrote: > > > > Add support to configure the PMA regions and create a corresponding > > reserve memory node and propagate it to the higher boot stack. > > > > &L2 { > > andestech,pma-regions = <0x0 0x58000000 0x0 0x08000000 > > (AX45MP_PMACFG_ETYP_NAPOT | > > AX45MP_PMACFG_MTYP_MEM_NON_CACHE_BUF)>; > > }; > > > > PMA regions are passed as part of L2 cache node to OpenSBI, these regions > > are parsed and configured in the OpenSBI. > > > > Signed-off-by: Lad Prabhakar > > --- > > Hi All, > > > > This patch is based on the discussion [0] so sending this as an RFC > > patch so that we get the Linux side of things accepeted first and once its > > finalized I'll send a non RFC patch for this. > > > > [0] https://patchwork.kernel.org/project/linux-renesas-soc/patch/20221124172207.153718-8-prabhakar.mahadev-lad.rj at bp.renesas.com/ > > > > Cheers, > > Prabhakar > > --- > > platform/generic/renesas/rzfive/objects.mk | 1 + > > platform/generic/renesas/rzfive/rzfive-pma.c | 181 +++++++++++++++ > > platform/generic/renesas/rzfive/rzfive-pma.h | 12 + > > I feel we should name this to something like ax45mp-pma instead of > rzfive-pma, as this is at the core configuration level not SoC's, no? Agreed, Andes PMA CSRs also exist in A45MP (RV32) so it's better if we call it andes45-pma.c and andes45_{read|write}_pma{cfg|addr} as function name. Any suggestion to add these functions which will be shared between the platforms? > > > platform/generic/renesas/rzfive/rzfive.c | 227 +++++++++++++++++++ > > 4 files changed, 421 insertions(+) > > create mode 100644 platform/generic/renesas/rzfive/rzfive-pma.c > > create mode 100644 platform/generic/renesas/rzfive/rzfive-pma.h > > Best regards, Peter Lin