Re: [PATCH] powerpc, 460gt: Add 460gt as compatible in the check for 460ex-compatible crypto

2011-06-28 Thread Josh Boyer
On Fri, Jun 24, 2011 at 04:14:07AM +0200, Segher Boessenkool wrote:
-       if (of_find_compatible_node(NULL, NULL,
amcc,ppc460ex-crypto)) {
+       if (of_find_compatible_node(NULL, NULL,
amcc,ppc460ex-crypto) ||
+           of_find_compatible_node(NULL, NULL,
amcc,ppc460gt-crypto)) {

If the device is actually compatible, the device tree node should
claim
it is, and you do not need this code change.

That was actually my first instinct, however I tried to follow the
current convention in the glacier and canyonlands DTS files, which is
to set every device compatible to 460gt or 460ex, depending on the
processor. Many of the devices are identical between the two, since
they are variations of the same SoC, so which is the preferred method?
Follow the device tree convention and add the compatibility check in
the driver,

That is not the convention.

or alter the device trees? I'll send another patch if it's
the latter.

You say

  compatible = amcc,ppc460gt-crypto, amcc,ppc460ex-crypto;

I went ahead and modified the addition of the node to the glacier DTS
file to do this instead.  I think this specific patch can be dropped.

josh
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH] powerpc, 460gt: Add 460gt as compatible in the check for 460ex-compatible crypto

2011-06-28 Thread Mike Williams
On Tue, Jun 28, 2011 at 7:48 AM, Josh Boyer jwbo...@linux.vnet.ibm.com wrote:
 On Fri, Jun 24, 2011 at 04:14:07AM +0200, Segher Boessenkool wrote:
-       if (of_find_compatible_node(NULL, NULL,
amcc,ppc460ex-crypto)) {
+       if (of_find_compatible_node(NULL, NULL,
amcc,ppc460ex-crypto) ||
+           of_find_compatible_node(NULL, NULL,
amcc,ppc460gt-crypto)) {

If the device is actually compatible, the device tree node should
claim
it is, and you do not need this code change.

That was actually my first instinct, however I tried to follow the
current convention in the glacier and canyonlands DTS files, which is
to set every device compatible to 460gt or 460ex, depending on the
processor. Many of the devices are identical between the two, since
they are variations of the same SoC, so which is the preferred method?
Follow the device tree convention and add the compatibility check in
the driver,

That is not the convention.

or alter the device trees? I'll send another patch if it's
the latter.

You say

  compatible = amcc,ppc460gt-crypto, amcc,ppc460ex-crypto;

 I went ahead and modified the addition of the node to the glacier DTS
 file to do this instead.  I think this specific patch can be dropped.

 josh


Thanks, go ahead and drop it. I got buried here at work with our
fiscal year ending.

Mike
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Fwd: [PATCH] powerpc, 460gt: Add 460gt as compatible in the check for 460ex-compatible crypto

2011-06-23 Thread Mike Williams
On Wed, Jun 22, 2011 at 7:24 PM, Segher Boessenkool
seg...@kernel.crashing.org wrote:
 -       if (of_find_compatible_node(NULL, NULL, amcc,ppc460ex-crypto)) {
 +       if (of_find_compatible_node(NULL, NULL, amcc,ppc460ex-crypto) ||
 +           of_find_compatible_node(NULL, NULL, amcc,ppc460gt-crypto)) {

 If the device is actually compatible, the device tree node should claim
 it is, and you do not need this code change.

That was actually my first instinct, however I tried to follow the
current convention in the glacier and canyonlands DTS files, which is
to set every device compatible to 460gt or 460ex, depending on the
processor. Many of the devices are identical between the two, since
they are variations of the same SoC, so which is the preferred method?
Follow the device tree convention and add the compatibility check in
the driver, or alter the device trees? I'll send another patch if it's
the latter.

Thanks,
Mike



 Segher


___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH] powerpc, 460gt: Add 460gt as compatible in the check for 460ex-compatible crypto

2011-06-23 Thread Segher Boessenkool
-       if (of_find_compatible_node(NULL, NULL, 
amcc,ppc460ex-crypto)) {
+       if (of_find_compatible_node(NULL, NULL, 
amcc,ppc460ex-crypto) ||
+           of_find_compatible_node(NULL, NULL, 
amcc,ppc460gt-crypto)) {


If the device is actually compatible, the device tree node should 
claim

it is, and you do not need this code change.


That was actually my first instinct, however I tried to follow the
current convention in the glacier and canyonlands DTS files, which is
to set every device compatible to 460gt or 460ex, depending on the
processor. Many of the devices are identical between the two, since
they are variations of the same SoC, so which is the preferred method?
Follow the device tree convention and add the compatibility check in
the driver,


That is not the convention.


or alter the device trees? I'll send another patch if it's
the latter.


You say

  compatible = amcc,ppc460gt-crypto, amcc,ppc460ex-crypto;

So, a unique name for the actual device first, followed by the name of
what it is compatible to.  The driver for 460ex-crypto will then work
without any changes, but it can also do some 460gt-specific workarounds
or enhancements; or you could even have a totally separate driver for
the 460gt-crypto (you'll have to arrange for it to be used preferably
then).

You should document this 460gt-crypto binding, btw (a single line in
the 460ex-crypto binding doc will do).


Segher

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


[PATCH] powerpc, 460gt: Add 460gt as compatible in the check for 460ex-compatible crypto

2011-06-22 Thread Mike Williams

Signed-off-by: Mike Williams m...@mikebwilliams.com
---
 drivers/crypto/amcc/crypto4xx_core.c |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/crypto/amcc/crypto4xx_core.c 
b/drivers/crypto/amcc/crypto4xx_core.c
index 1891252..4895be5 100644
--- a/drivers/crypto/amcc/crypto4xx_core.c
+++ b/drivers/crypto/amcc/crypto4xx_core.c
@@ -1161,7 +1161,8 @@ static int __init crypto4xx_probe(struct platform_device 
*ofdev)
if (rc)
return -ENODEV;
 
-   if (of_find_compatible_node(NULL, NULL, amcc,ppc460ex-crypto)) {
+   if (of_find_compatible_node(NULL, NULL, amcc,ppc460ex-crypto) ||
+   of_find_compatible_node(NULL, NULL, amcc,ppc460gt-crypto)) {
mtdcri(SDR0, PPC460EX_SDR0_SRST,
   mfdcri(SDR0, PPC460EX_SDR0_SRST) | PPC460EX_CE_RESET);
mtdcri(SDR0, PPC460EX_SDR0_SRST,
-- 
1.7.3.4

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH] powerpc, 460gt: Add 460gt as compatible in the check for 460ex-compatible crypto

2011-06-22 Thread Segher Boessenkool

-   if (of_find_compatible_node(NULL, NULL, amcc,ppc460ex-crypto)) {
+   if (of_find_compatible_node(NULL, NULL, amcc,ppc460ex-crypto) ||
+   of_find_compatible_node(NULL, NULL, amcc,ppc460gt-crypto)) {


If the device is actually compatible, the device tree node should claim
it is, and you do not need this code change.


Segher

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev