From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Tue, 2 Jun 2020 10:28:33 -0400 Subject: [PATCH v4 2/5] arm: provide a function for boards init code to modify MMU virtual-physical map In-Reply-To: <20200602120423.6285-3-m.szyprowski@samsung.com> References: <20200602120423.6285-1-m.szyprowski@samsung.com> <20200602120423.6285-3-m.szyprowski@samsung.com> Message-ID: <20200602142833.GF21630@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Tue, Jun 02, 2020 at 02:04:20PM +0200, Marek Szyprowski wrote: > Provide function for setting arbitrary virtual-physical MMU mapping for the given region. > > Signed-off-by: Marek Szyprowski > Change-Id: If10b06cc6edbdff311a1b6302112e8cd0bb5313f > --- > arch/arm/include/asm/mmu.h | 8 ++++++++ > arch/arm/include/asm/system.h | 11 +++++++++++ > arch/arm/lib/cache-cp15.c | 24 ++++++++++++++++++------ > 3 files changed, 37 insertions(+), 6 deletions(-) > create mode 100644 arch/arm/include/asm/mmu.h > > diff --git a/arch/arm/include/asm/mmu.h b/arch/arm/include/asm/mmu.h > new file mode 100644 > index 00000000000..fe3d7930790 > --- /dev/null > +++ b/arch/arm/include/asm/mmu.h > @@ -0,0 +1,8 @@ > +#ifndef __ASM_ARM_MMU_H > +#define __ASM_ARM_MMU_H > + > +#ifdef CONFIG_ADDR_MAP > +extern void init_addr_map(void); > +#endif > + > +#endif No SPDX tag and just like Linux we don't need/want 'extern' (yes, there are examples doing this today still). We also shouldn't wrap this in an #if. > diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h > index 1e3f574403a..6b6095d78e2 100644 > --- a/arch/arm/include/asm/system.h > +++ b/arch/arm/include/asm/system.h > @@ -581,6 +581,17 @@ s32 psci_features(u32 function_id, u32 psci_fid); > */ > void save_boot_params_ret(void); > > +/** > + * Change the virt/phys mapping and cache settings for a region. > + * > + * \param virt virtual start address of memory region to change > + * \param phys physical address for the memory region to set > + * \param size size of memory region to change > + * \param option dcache option to select > + */ > +void mmu_set_region_dcache_behaviour_phys(phys_addr_t virt, phys_addr_t phys, > + size_t size, enum dcache_option option); > + Is '\param' valid rST? I see that follows some other examples in the file, would you mind doing a follow up to convert those to @param instead. If you don't have time, at least please make these @param. Functionally I believe everything else is fine however, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: