From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vipin Kumar Date: Wed, 12 Dec 2012 16:45:02 +0530 Subject: [U-Boot] [PATCH resend] spi/arm-pl022: Add support for ARM PL022 spi controller In-Reply-To: <50C8660E.4060800@st.com> References: <5a15a3f113b47952564abf488d65ae23f9bd6d79.1354776865.git.vipin.kumar@st.com> <50C859F5.6020907@denx.de> <50C85D3C.3050104@st.com> <50C8660E.4060800@st.com> Message-ID: <50C86736.5010206@st.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 12/12/2012 4:40 PM, Armando VISCONTI wrote: >>>> + >>>> +/* SSP registers mapping */ >>>> +#define SSP_CR0 0x000 >>>> +#define SSP_CR1 0x004 >>>> +#define SSP_DR 0x008 >>>> +#define SSP_SR 0x00C >>>> +#define SSP_CPSR 0x010 >>>> +#define SSP_IMSC 0x014 >>>> +#define SSP_RIS 0x018 >>>> +#define SSP_MIS 0x01C >>>> +#define SSP_ICR 0x020 >>>> +#define SSP_DMACR 0x024 >>>> +#define SSP_ITCR 0x080 >>>> +#define SSP_ITIP 0x084 >>>> +#define SSP_ITOP 0x088 >>>> +#define SSP_TDR 0x08C >>> >>> Please use C-structs instead to access the registers. >>> >> >> May be this patch is a ripped version from linux. That's why >> Thanks. I will do this in v2 >> > > Yes, > I took this part from the linux pl022 driver. > > Never understood which way (C-struct or defines) is preferable > and why... > U-boot uses the structure way(I do not exactly understand why) and the kernel code uses both ways I would change it to use the structure > Rgds, > Arm > > Vipin