On Tue, Apr 24, 2018 at 08:32:40PM +0530, Lokesh Vutla wrote:
> 
> 
> On Tuesday 24 April 2018 06:50 PM, Tom Rini wrote:
> > On Tue, Apr 24, 2018 at 06:24:47PM +0530, Lokesh Vutla wrote:
> > 
> >> The Memory Protection Unit(MPU) allows to partition memory into regions
> >> and set individual protection attributes for each region. In absence
> >> of MPU a default map[1] will take effect. Add support for configuring
> >> MPU on Cortex-R, by reusing the existing support for Cortex-M processor.
> >>
> >> [1] 
> >> http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0460d/I1002400.html
> >>
> >> Signed-off-by: Lokesh Vutla <lokeshvu...@ti.com>
> >> ---
> >>  arch/arm/Kconfig                  |  11 +++
> >>  arch/arm/cpu/armv7/Makefile       |   2 +
> >>  arch/arm/cpu/armv7/mpu_v7r.c      | 109 ++++++++++++++++++++++++++++++
> >>  arch/arm/cpu/armv7m/Makefile      |   3 +-
> >>  arch/arm/cpu/armv7m/mpu.c         |  41 +----------
> >>  arch/arm/include/asm/armv7m_mpu.h |  69 +++++++++++++++++++
> > 
> > How close are armv7/mpu_v7r.c and armv7m/mpu.c ?  If we did some
> > underlying work so that armv7m/ and be put into armv7/ (and we introduce
> > CPU_V7A say, as I mentioned in another part of the thread so the
> > Makefile isn't too ugly) could we have a single mpu.c file, cleanly?
> > 
> 
> I did start with that but found out that the way we program the mpu
> registers are entirely different. For v7m mmio registers are used, but
> for v7r system registers are used. I couldn't find a way to get a common
> driver for these two. If you prefer #ifdefs and merged these two, I can
> do it but it doesn't look clean.

OK, if it's not clean then it's not clean.  But lets go for consistent
file naming.  And how about adding a CPU_V7A flag so that we could dump
the armv7m directory in?  Then mpu_v7[mr].c would make sense too.

-- 
Tom

Attachment: signature.asc
Description: PGP signature

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to