linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* RFC: book3e: DCR MMIO for IBM Blue Gene/Q
@ 2012-11-04 16:32 Jimi Xenidis
  2012-11-04 23:51 ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 5+ messages in thread
From: Jimi Xenidis @ 2012-11-04 16:32 UTC (permalink / raw)
  To: Ben Herrenschmidt; +Cc: linuxppc-dev

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?
I'm thinking:
	bgq {
		#address-cells =3D <2>;
		#size-cells =3D <2>;
		...

		dcr {
			reg =3D <0x3ff 0xe0000000 0x0 0x08000000>;
			compatible =3D "ibm,bgq-dcr";
			dcr-controller;
			dcr-access-method =3D "mmio";
			dcr-mmio-stride =3D <??>;
		};
	};

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 =3D of_get_property(dp, "dcr-mmio-stride", NULL);
	stride =3D (p =3D=3D NULL) ? 0x10 : *p;

	/* XXX FIXME: Which property name is to use of the 2 following ? =
*/
	p =3D of_get_property(dp, "dcr-mmio-range", NULL);
	if (p =3D=3D NULL)
		p =3D of_get_property(dp, "dcr-mmio-space", NULL);
	if (p =3D=3D NULL)
		goto done;

I guess my "reg" property is not useful to the code?
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__"

Thoughts?

-jx

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-11-06 11:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-04 16:32 RFC: book3e: DCR MMIO for IBM Blue Gene/Q Jimi Xenidis
2012-11-04 23:51 ` Benjamin Herrenschmidt
2012-11-05  3:23   ` Jimi Xenidis
2012-11-05 15:25     ` Jimi Xenidis
2012-11-06 11:48       ` Benjamin Herrenschmidt

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).