From: "Grant Likely" <grant.likely@secretlab.ca>
To: "David Jander" <david.jander@protonic.nl>
Cc: linuxppc-dev@ozlabs.org, linuxppc-embedded@ozlabs.org
Subject: Re: [PATCH 2/2] Re-added support for FEC on MPC5121 from Freescale LTIB to current head
Date: Thu, 12 Jun 2008 07:54:08 -0600 [thread overview]
Message-ID: <fa686aa40806120654t4100745ay8b132c68b1bbac86@mail.gmail.com> (raw)
In-Reply-To: <200806121345.52293.david.jander@protonic.nl>
On Thu, Jun 12, 2008 at 5:45 AM, David Jander <david.jander@protonic.nl> wrote:
>
>
> /* write */
> -#define CBDW_SC(_cbd, _sc) __cbd_out16(&(_cbd)->cbd_sc, (_sc))
> -#define CBDW_DATLEN(_cbd, _datlen) __cbd_out16(&(_cbd)->cbd_datlen, (_datlen))
> -#define CBDW_BUFADDR(_cbd, _bufaddr) __cbd_out32(&(_cbd)->cbd_bufaddr, (_bufaddr))
> +#define CBDW_SC(_cbd, _sc) __cbd_out16((volatile void __iomem *)&(_cbd)->cbd_sc, (_sc))
> +#define CBDW_DATLEN(_cbd, _datlen) __cbd_out16((volatile void __iomem *)&(_cbd)->cbd_datlen, (_datlen))
> +#define CBDW_BUFADDR(_cbd, _bufaddr) __cbd_out32((volatile void __iomem *)&(_cbd)->cbd_bufaddr, (_bufaddr))
>
> /* read */
> -#define CBDR_SC(_cbd) __cbd_in16(&(_cbd)->cbd_sc)
> -#define CBDR_DATLEN(_cbd) __cbd_in16(&(_cbd)->cbd_datlen)
> -#define CBDR_BUFADDR(_cbd) __cbd_in32(&(_cbd)->cbd_bufaddr)
> +#define CBDR_SC(_cbd) __cbd_in16((volatile void __iomem *)&(_cbd)->cbd_sc)
> +#define CBDR_DATLEN(_cbd) __cbd_in16((volatile void __iomem *)&(_cbd)->cbd_datlen)
> +#define CBDR_BUFADDR(_cbd) __cbd_in32((volatile void __iomem *)&(_cbd)->cbd_bufaddr)
Another comment: This really doesn't look right. The _cbd pointer
passed in should already be tagged with __iomem. Trying to fix it
here is a band-aid and unsafe.
Cheers,
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
next prev parent reply other threads:[~2008-06-12 13:54 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-12 11:44 [PATCH 1/2] Added support for PRTLVT based boards (MPC5121) David Jander
2008-06-12 11:45 ` [PATCH 2/2] Re-added support for FEC on MPC5121 from Freescale LTIB to current head David Jander
2008-06-12 12:12 ` Kumar Gala
2008-06-12 13:36 ` Grant Likely
2008-06-13 9:32 ` David Jander
2008-06-12 13:54 ` Grant Likely [this message]
2008-06-12 14:10 ` [PATCH 1/2] Added support for PRTLVT based boards (MPC5121) Grant Likely
2008-06-13 4:19 ` David Gibson
2008-06-13 5:12 ` Grant Likely
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=fa686aa40806120654t4100745ay8b132c68b1bbac86@mail.gmail.com \
--to=grant.likely@secretlab.ca \
--cc=david.jander@protonic.nl \
--cc=linuxppc-dev@ozlabs.org \
--cc=linuxppc-embedded@ozlabs.org \
/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;
as well as URLs for NNTP newsgroup(s).