From: Grzegorz Bernacki <gjb@semihalf.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 1/3] mpc52xx: Add SPI driver.
Date: Wed, 10 Jun 2009 14:50:49 +0200 [thread overview]
Message-ID: <4A2FAC29.2000304@semihalf.com> (raw)
In-Reply-To: <m2ocsw2uhs.fsf@ohwell.denx.de>
Detlev Zundel wrote:
>> + out8((u32)&spi->brr, 0x77); /* baud rate: IPB clock / 2048 */
>
> Ok, we're actually using the accessor macros, but I fail to see why a
> (u32) cast is needed here - it even actively prevents one of the
> "features" of the macros, namely type checking.
>
> Why exactly are they needed?
Declaration of out8() is in common.h file:
void out8(unsigned int, unsigned char);
so I think that this cast is necessary.
Without it I get warning:
mpc52xx_spi.c:38: warning: passing argument 1 of 'out8' makes integer
from pointer without a cast
regards,
Grzesiek
next prev parent reply other threads:[~2009-06-10 12:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-09 12:14 [U-Boot] [PATCH v2 1/3] mpc52xx: Add SPI driver Grzegorz Bernacki
2009-06-09 12:14 ` [U-Boot] [PATCH v2 2/3] digsy MTC: Add SPI support Grzegorz Bernacki
2009-06-10 11:39 ` Detlev Zundel
2009-06-10 14:03 ` Grzegorz Bernacki
2009-06-09 12:14 ` [U-Boot] [PATCH v2 3/3] digsy MTC: Add 'mtc' command Grzegorz Bernacki
2009-06-10 11:33 ` [U-Boot] [PATCH v2 1/3] mpc52xx: Add SPI driver Detlev Zundel
2009-06-10 12:50 ` Grzegorz Bernacki [this message]
2009-06-10 13:29 ` Wolfgang Denk
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=4A2FAC29.2000304@semihalf.com \
--to=gjb@semihalf.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox