From: Arnd Bergmann <arnd@arndb.de>
To: linuxppc-dev@lists.ozlabs.org
Cc: g r1x <gr1xmail@gmail.com>, David Gibson <david@gibson.dropbear.id.au>
Subject: Re: How to access DCR registers in powerpc440gx? Got err when use macro def in Linux kernel
Date: Mon, 14 Sep 2009 14:59:43 +0200 [thread overview]
Message-ID: <200909141459.43371.arnd@arndb.de> (raw)
In-Reply-To: <20090911053106.GB11840@yookeroo.seuss>
On Friday 11 September 2009, David Gibson wrote:
> On Fri, Sep 11, 2009 at 12:14:55PM +0800, g r1x wrote:
> > Now, I'm writing a DMA driver on powerpc
> > 440gx platform(2.6.26.5), as the only way to set up DMA Controller is
> > to access it's dcr registers with 'mfdcr' and 'mtdcr'.
> >
> > I've found some dma code in Linux kernel 2.6.26.5, so I copy the code
> > u wrote to my driver module directory, and include them, but when I
> > compile my driver, gcc complains following err messages:
>
> In current kernels we have some DCR macros that use a big table of
> pre-generated instructions in order to allow accesses to runtime
> computed DCR numbers. But either they didn't exist in 2.6.26, or they
> have a different name, I don't remember.
The portable way to access DCRs is the API from asm/dcr.h, using dcr_map(),
dcr_read() and dcr_write().
Arnd <><
prev parent reply other threads:[~2009-09-14 13:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-10 17:24 How to access DCR registers in powerpc440gx? Got err when use macro def in Linux kernel g r1x
2009-09-11 4:14 ` g r1x
2009-09-11 5:31 ` David Gibson
2009-09-14 12:59 ` Arnd Bergmann [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=200909141459.43371.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=david@gibson.dropbear.id.au \
--cc=gr1xmail@gmail.com \
--cc=linuxppc-dev@lists.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 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.