RFC: book3e: DCR MMIO for IBM Blue Gene/Q
Jimi Xenidis
jimix at pobox.com
Mon Nov 5 03:32:43 EST 2012
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 = <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;
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
More information about the Linuxppc-dev
mailing list