All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH resend] spi/arm-pl022: Add support for ARM PL022 spi controller
Date: Wed, 12 Dec 2012 12:29:00 +0100	[thread overview]
Message-ID: <50C86A7C.5050403@denx.de> (raw)
In-Reply-To: <50C8660E.4060800@st.com>

On 12/12/2012 12:10 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 is here more strict than Linux here. Using C-struct's enables
type-checking. So thats the preferred way.

Thanks,
Stefan

      parent reply	other threads:[~2012-12-12 11:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-06  6:56 [U-Boot] [PATCH resend] spi/arm-pl022: Add support for ARM PL022 spi controller Vipin Kumar
2012-12-06  8:05 ` Stefan Roese
2012-12-12 10:00   ` Vipin Kumar
2012-12-12 10:18 ` Stefan Roese
2012-12-12 10:32   ` Vipin Kumar
2012-12-12 11:10     ` Armando Visconti
2012-12-12 11:15       ` Vipin Kumar
2012-12-12 11:29       ` Stefan Roese [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50C86A7C.5050403@denx.de \
    --to=sr@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.