From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marc Zyngier Date: Tue, 24 May 2016 09:15:09 +0100 Subject: [U-Boot] [PATCH 06/10] sunxi: Group cpu core related controls together In-Reply-To: <1464007306-30269-7-git-send-email-wens@csie.org> References: <1464007306-30269-1-git-send-email-wens@csie.org> <1464007306-30269-7-git-send-email-wens@csie.org> Message-ID: <57440D8D.80208@arm.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 23/05/16 13:41, Chen-Yu Tsai wrote: > Instead of listing individual registers for controls to each processor > core, list them as an array of registers. This makes accessing controls > by core index easier. > > Also rename "cpucfg_sun6i.h" (which was unused anyway) to the more generic > "cpucfg.h". > > Signed-off-by: Chen-Yu Tsai > --- > .../asm/arch-sunxi/{cpucfg_sun6i.h => cpucfg.h} | 31 +++++++++------------- > arch/arm/include/asm/arch-sunxi/prcm.h | 6 ++--- > 2 files changed, 14 insertions(+), 23 deletions(-) > rename arch/arm/include/asm/arch-sunxi/{cpucfg_sun6i.h => cpucfg.h} (69%) > > diff --git a/arch/arm/include/asm/arch-sunxi/cpucfg_sun6i.h b/arch/arm/include/asm/arch-sunxi/cpucfg.h > similarity index 69% > rename from arch/arm/include/asm/arch-sunxi/cpucfg_sun6i.h > rename to arch/arm/include/asm/arch-sunxi/cpucfg.h > index e2a29cb1818e..b9084b3968cd 100644 > --- a/arch/arm/include/asm/arch-sunxi/cpucfg_sun6i.h > +++ b/arch/arm/include/asm/arch-sunxi/cpucfg.h > @@ -11,33 +11,26 @@ > > #ifndef __ASSEMBLY__ > > +struct sunxi_cpucfg_cpu { > + u32 rst; /* base + 0x0 */ > + u32 ctrl; /* base + 0x4 */ > + u32 status; /* base + 0x8 */ > + u8 res[0x34]; /* base + 0xc */ > +}; Please use the "packed" attribute. Even if you declared your structure in a way that makes sure no padding will be introduced, this also serves as a reminder that this is not your usual memory. Same goes for the other structures in the file. Thanks, M. -- Jazz is not dead. It just smells funny...