* [PATCH] powerpc, 460gt: Add 460gt as compatible in the check for 460ex-compatible crypto
@ 2011-06-22 19:30 Mike Williams
2011-06-22 23:24 ` Segher Boessenkool
0 siblings, 1 reply; 6+ messages in thread
From: Mike Williams @ 2011-06-22 19:30 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Mike Williams
Signed-off-by: Mike Williams <mike@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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] powerpc, 460gt: Add 460gt as compatible in the check for 460ex-compatible crypto
2011-06-22 19:30 [PATCH] powerpc, 460gt: Add 460gt as compatible in the check for 460ex-compatible crypto Mike Williams
@ 2011-06-22 23:24 ` Segher Boessenkool
[not found] ` <BANLkTikKNqEoQxGA642h14eOUjZ3hGZaQw@mail.gmail.com>
0 siblings, 1 reply; 6+ messages in thread
From: Segher Boessenkool @ 2011-06-22 23:24 UTC (permalink / raw)
To: Mike Williams; +Cc: linuxppc-dev
> - 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Fwd: [PATCH] powerpc, 460gt: Add 460gt as compatible in the check for 460ex-compatible crypto
[not found] ` <BANLkTikKNqEoQxGA642h14eOUjZ3hGZaQw@mail.gmail.com>
@ 2011-06-23 14:21 ` Mike Williams
2011-06-24 2:14 ` Segher Boessenkool
0 siblings, 1 reply; 6+ messages in thread
From: Mike Williams @ 2011-06-23 14:21 UTC (permalink / raw)
To: linuxppc-dev
On Wed, Jun 22, 2011 at 7:24 PM, Segher Boessenkool
<segher@kernel.crashing.org> wrote:
>> - =A0 =A0 =A0 if (of_find_compatible_node(NULL, NULL, "amcc,ppc460ex-cry=
pto")) {
>> + =A0 =A0 =A0 if (of_find_compatible_node(NULL, NULL, "amcc,ppc460ex-cry=
pto") ||
>> + =A0 =A0 =A0 =A0 =A0 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
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] powerpc, 460gt: Add 460gt as compatible in the check for 460ex-compatible crypto
2011-06-23 14:21 ` Fwd: " Mike Williams
@ 2011-06-24 2:14 ` Segher Boessenkool
2011-06-28 11:48 ` Josh Boyer
0 siblings, 1 reply; 6+ messages in thread
From: Segher Boessenkool @ 2011-06-24 2:14 UTC (permalink / raw)
To: Mike Williams; +Cc: linuxppc-dev
>>> - =A0 =A0 =A0 if (of_find_compatible_node(NULL, NULL,=20
>>> "amcc,ppc460ex-crypto")) {
>>> + =A0 =A0 =A0 if (of_find_compatible_node(NULL, NULL,=20
>>> "amcc,ppc460ex-crypto") ||
>>> + =A0 =A0 =A0 =A0 =A0 of_find_compatible_node(NULL, NULL,=20
>>> "amcc,ppc460gt-crypto")) {
>>
>> If the device is actually compatible, the device tree node should=20
>> 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 =3D "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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] powerpc, 460gt: Add 460gt as compatible in the check for 460ex-compatible crypto
2011-06-24 2:14 ` Segher Boessenkool
@ 2011-06-28 11:48 ` Josh Boyer
2011-06-28 12:14 ` Mike Williams
0 siblings, 1 reply; 6+ messages in thread
From: Josh Boyer @ 2011-06-28 11:48 UTC (permalink / raw)
To: Segher Boessenkool; +Cc: Mike Williams, linuxppc-dev
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] powerpc, 460gt: Add 460gt as compatible in the check for 460ex-compatible crypto
2011-06-28 11:48 ` Josh Boyer
@ 2011-06-28 12:14 ` Mike Williams
0 siblings, 0 replies; 6+ messages in thread
From: Mike Williams @ 2011-06-28 12:14 UTC (permalink / raw)
To: linuxppc-dev
On Tue, Jun 28, 2011 at 7:48 AM, Josh Boyer <jwboyer@linux.vnet.ibm.com> wr=
ote:
> On Fri, Jun 24, 2011 at 04:14:07AM +0200, Segher Boessenkool wrote:
>>>>>- =A0 =A0 =A0 if (of_find_compatible_node(NULL, NULL,
>>>>>"amcc,ppc460ex-crypto")) {
>>>>>+ =A0 =A0 =A0 if (of_find_compatible_node(NULL, NULL,
>>>>>"amcc,ppc460ex-crypto") ||
>>>>>+ =A0 =A0 =A0 =A0 =A0 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
>>
>> =A0compatible =3D "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. =A0I 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
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-06-28 12:14 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-22 19:30 [PATCH] powerpc, 460gt: Add 460gt as compatible in the check for 460ex-compatible crypto Mike Williams
2011-06-22 23:24 ` Segher Boessenkool
[not found] ` <BANLkTikKNqEoQxGA642h14eOUjZ3hGZaQw@mail.gmail.com>
2011-06-23 14:21 ` Fwd: " Mike Williams
2011-06-24 2:14 ` Segher Boessenkool
2011-06-28 11:48 ` Josh Boyer
2011-06-28 12:14 ` Mike Williams
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).