linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Jimi Xenidis <jimix@pobox.com>
Cc: linuxppc-dev <linuxppc-dev@lists.ozlabs.org>
Subject: Re: RFC: book3e: DCR MMIO for IBM Blue Gene/Q
Date: Mon, 05 Nov 2012 10:51:02 +1100	[thread overview]
Message-ID: <1352073062.12271.268.camel@pasglop> (raw)
In-Reply-To: <020B0706-E2BD-4A6C-8644-D235278655ED@pobox.com>

On Sun, 2012-11-04 at 10:32 -0600, Jimi Xenidis wrote:
> I want to use the stuff in arch/platform/sysdev/dcr.c and I have a couple of questions:
> 1) anyone have a good devtree binding for this?

Not really, I think the cell stuff was the last we looked at this.

> I'm thinking:
> 	bgq {
> 		#address-cells = <2>;
> 		#size-cells = <2>;
> 		...
> 
> 		dcr {
> 			reg = <0x3ff 0xe0000000 0x0 0x08000000>;
> 			compatible = "ibm,bgq-dcr";
> 			dcr-controller;
> 			dcr-access-method = "mmio";
> 			dcr-mmio-stride = <??>;
> 		};
> 	};
> 
> I'm not sure what stride I will use since I have yet to figure out the DCR numbering in play at the moment, which will be painful.
> Also, some clarity to the following would be nice:
> 	/* Stride is not properly defined yet, default to 0x10 for Axon */
> 	p = of_get_property(dp, "dcr-mmio-stride", NULL);
> 	stride = (p == NULL) ? 0x10 : *p;
>
> 	/* XXX FIXME: Which property name is to use of the 2 following ? */
> 	p = of_get_property(dp, "dcr-mmio-range", NULL);
> 	if (p == NULL)
> 		p = of_get_property(dp, "dcr-mmio-space", NULL);
> 	if (p == NULL)
> 		goto done;

Not sure what SLOF did back then. dcr-mmio-range sounds better to me.

> I guess my "reg" property is not useful to the code?

Right, unless the DCR "bridge" has some registers of its own. It's also
handy to have as a "standard" way of representing the memory used by the
DCR bridge, tho that does mean duplication... but then it allows you to
have a nice unit address.

> Is there a preference over dcr-mmio-range/space or in the absence of these to we should use "reg"?
> 
> 2) I need 64 bit reads and writes
> My intention is to have dcr_{read,write}_generic_{mmio,native} take an unsigned long for value all the way down.
> For the native case, this would make is similar to mtspr and mfspr.
> For the MMIO case, the selected in/out size would be based on "#ifdef __powerpc64__"

As long as it doesn't break Axon...

Cheers,
Ben.

> Thoughts?
> 
> -jx
> 

  reply	other threads:[~2012-11-04 23:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-04 16:32 RFC: book3e: DCR MMIO for IBM Blue Gene/Q Jimi Xenidis
2012-11-04 23:51 ` Benjamin Herrenschmidt [this message]
2012-11-05  3:23   ` Jimi Xenidis
2012-11-05 15:25     ` Jimi Xenidis
2012-11-06 11:48       ` Benjamin Herrenschmidt

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=1352073062.12271.268.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=jimix@pobox.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 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).