From: Stefan Roese <sr@denx.de>
To: linuxppc-dev@ozlabs.org
Cc: linux-raid@vger.kernel.org
Subject: Re: [PATCH] [PPC32] ADMA support for PPC 440SPe processors.
Date: Fri, 16 Mar 2007 13:44:01 +0100 [thread overview]
Message-ID: <200703161344.02510.sr@denx.de> (raw)
In-Reply-To: <1174033758.6861.41.camel@localhost.localdomain>
On Friday 16 March 2007 09:29, Benjamin Herrenschmidt wrote:
> > + /*
> > + * Map registers
> > + */
> > + i2o_reg = (i2o_regs_t *)ioremap64(I2O_MMAP_BASE, I2O_MMAP_SIZE);
> > + dma_reg0 = (dma_regs_t *)ioremap64(DMA0_MMAP_BASE, DMA_MMAP_SIZE);
> > + dma_reg1 = (dma_regs_t *)ioremap64(DMA1_MMAP_BASE, DMA_MMAP_SIZE);
> > + xor_reg = (xor_regs_t *)ioremap64(XOR_MMAP_BASE,XOR_MMAP_SIZE);
>
> You should test the result of these. Also, the move to arch/powerpc here
> as well will cleanup as ioremap will always take 64 bits resource_size_t
> (can't you make that working on arch/ppc too and use normal ioremap
> there as well ?).
It's quite easy: Just configure CONFIG_RESOURCES_64BIT and you can use
the "normal" ioremap(). Wolfgang, please give it a try. It already works on
the Katmai and Taishan.
> > + /*
> > + * Configure h/w
> > + */
> > +
> > + /* Reset I2O/DMA */
> > + mtdcr(DCRN_SDR0_CFGADDR, 0x200);
> > + mtdcr(DCRN_SDR0_CFGDATA, 0x10000);
> > + mtdcr(DCRN_SDR0_CFGADDR, 0x200);
> > + mtdcr(DCRN_SDR0_CFGDATA, 0x0);
>
> The above could use some symbolic constants... Is this the only piece of
> code to access the SDR0 indirect config registers ? If not, then some
> global locking is needed as well.
Please add
#define DCRN_SDR0_SRST0 0x200
#define SDR0_SRST_I2ODMA (0x80000000 > 15)
to include/asm-ppc/ppc44x.h
and then use
SDR_WRITE(DCRN_SDR0_SRST0, SDR0_SRST_I2ODMA);
SDR_WRITE(DCRN_SDR0_SRST0, 0);
here.
Best regards,
Stefan
=====================================================================
DENX Software Engineering GmbH, HRB 165235 Munich, CEO: Wolfgang Denk
Office: Kirchenstr. 5, D-82194 Groebenzell, Germany
=====================================================================
next prev parent reply other threads:[~2007-03-16 12:41 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-15 23:29 [PATCH] [PPC32] ADMA support for PPC 440SPe processors Wolfgang Denk
2007-03-16 5:27 ` Paul Mackerras
2007-03-16 5:55 ` Dan Williams
2007-03-16 10:16 ` Wolfgang Denk
2007-03-16 16:33 ` Dan Williams
2007-03-16 8:29 ` Benjamin Herrenschmidt
2007-03-16 10:23 ` Wolfgang Denk
2007-03-16 12:44 ` Stefan Roese [this message]
2007-03-16 16:57 ` Dan Williams
2007-03-16 18:00 ` Dan Williams
2007-03-17 8:09 ` Stefan Roese
2007-03-17 18:17 ` Dan Williams
2007-03-17 18:43 ` Stefan Roese
2007-03-17 19:09 ` Dan Williams
2007-03-19 16:13 ` Benjamin Herrenschmidt
2007-03-20 3:06 ` Michael Ellerman
2007-03-20 5:39 ` Stefan Roese
2007-03-21 14:10 ` Segher Boessenkool
2007-03-21 19:55 ` Benjamin Herrenschmidt
2007-03-21 20:03 ` Segher Boessenkool
2007-03-22 11:38 ` Christoph Hellwig
2007-03-22 12:36 ` Segher Boessenkool
2007-03-22 13:20 ` Geert Uytterhoeven
2007-03-22 13:38 ` Segher Boessenkool
2007-03-17 8:57 ` Yuri Tikhonov
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=200703161344.02510.sr@denx.de \
--to=sr@denx.de \
--cc=linux-raid@vger.kernel.org \
--cc=linuxppc-dev@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).