From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Griffin Date: Wed, 29 Jul 2015 22:07:40 +0100 Subject: [U-Boot] [PATCH v2 2/6] ARM: hi6220: Add register and bitfield definition header files. In-Reply-To: References: <1436371040-26620-1-git-send-email-peter.griffin@linaro.org> <1436371040-26620-3-git-send-email-peter.griffin@linaro.org> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Simon, On 18 July 2015 at 15:37, Simon Glass wrote: > Hi Peter, > > On 8 July 2015 at 09:57, Peter Griffin wrote: > > This patch adds the header files which will be used in the subsquent > > board / drivers to enable support for hi6220 hikey board. > > > > Signed-off-by: Peter Griffin > > --- > > arch/arm/include/asm/arch-hi6220/hi6220.h | 324 > +++++++++++++++++++ > > .../include/asm/arch-hi6220/hi6220_regs_alwayson.h | 349 > +++++++++++++++++++++ > > 2 files changed, 673 insertions(+) > > create mode 100644 arch/arm/include/asm/arch-hi6220/hi6220.h > > create mode 100644 > arch/arm/include/asm/arch-hi6220/hi6220_regs_alwayson.h > > > > diff --git a/arch/arm/include/asm/arch-hi6220/hi6220.h > b/arch/arm/include/asm/arch-hi6220/hi6220.h > > new file mode 100644 > > index 0000000..3ddec91 > > --- /dev/null > > +++ b/arch/arm/include/asm/arch-hi6220/hi6220.h > > @@ -0,0 +1,324 @@ > > +/* > > + * (C) Copyright 2015 Linaro > > + * Peter Griffin > > + * > > + * SPDX-License-Identifier: GPL-2.0+ > > + */ > > + > > +#ifndef __HI6220_H__ > > +#define __HI6220_H__ > > + > > +#include "hi6220_regs_alwayson.h" > > + > > +#define HI6220_MMC0_BASE 0xF723D000 > > +#define HI6220_MMC1_BASE 0xF723E000 > > + > > +#define HI6220_PMUSSI_BASE 0xF8000000 > > + > > +#define HI6220_PERI_BASE 0xF7030000 > > + > > +#define PERI_SC_PERIPH_CTRL1 (HI6220_PERI_BASE + > 0x000) > > + > > I think you should have: > > struct peri_sc_regs { > u32 ctrl1; > u32 ctrl2; > ... > }; > > U-Boot uses structs for I/O access. > Phew...I've converted it over to structs for register access. It actually took quite a long time to do, but it all works again now :) So it will be using structs for I/O access in V3. regards, Peter.