LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* Nokia N900: omap aes is broken
@ 2015-02-18 12:21 Pali Rohár
2015-02-18 21:02 ` Pali Rohár
0 siblings, 1 reply; 10+ messages in thread
From: Pali Rohár @ 2015-02-18 12:21 UTC (permalink / raw)
To: Nishanth Menon, Felipe Balbi, Tony Lindgren, Ivaylo Dimitrov,
Aaro Koskinen, Sebastian Reichel, Pavel Machek
Cc: linux-kernel, linux-omap, linux-crypto
[-- Attachment #1: Type: Text/Plain, Size: 983 bytes --]
Hello,
I tried to test OMAP AES driver on Nokia N900 with special Nokia
bootloader which enable L3 firewall for OMAP AES HW support.
I modified arch/arm/boot/dts/omap34xx-hs.dtsi file and commented
aes line which disable aes support in DT.
Then I booted kernel and loaded omap-aes.ko module. And I got
this output in dmesg:
[ 0.222930] platform 480c5000.aes: Cannot lookup hwmod 'aes'
[ 27.758148] omap-aes 480c5000.aes: _od_fail_runtime_resume:
FIXME: missing hwmod/omap_dev info
[ 27.765960] omap-aes 480c5000.aes: omap_aes_probe: failed to
get_sync(-19)
[ 29.257690] omap-aes 480c5000.aes: initialization failed.
So it looks like some initialization data are missing for Nokia
N900 (omap3430 device).
Can somebody look at it? I have patched 2.6.28 kernel were omap
aes support on this N900 device (with special bootloader) is
working.
Maybe some other data are missing in DT or in hwmod?
--
Pali Rohár
pali.rohar@gmail.com
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Nokia N900: omap aes is broken
2015-02-18 12:21 Nokia N900: omap aes is broken Pali Rohár
@ 2015-02-18 21:02 ` Pali Rohár
2015-02-18 21:27 ` Pali Rohár
0 siblings, 1 reply; 10+ messages in thread
From: Pali Rohár @ 2015-02-18 21:02 UTC (permalink / raw)
To: Tony Lindgren
Cc: Nishanth Menon, Felipe Balbi, Ivaylo Dimitrov, Aaro Koskinen,
Sebastian Reichel, Pavel Machek, linux-kernel, linux-omap,
linux-crypto
[-- Attachment #1: Type: Text/Plain, Size: 1882 bytes --]
On Wednesday 18 February 2015 13:21:03 Pali Rohár wrote:
> Hello,
>
> I tried to test OMAP AES driver on Nokia N900 with special
> Nokia bootloader which enable L3 firewall for OMAP AES HW
> support.
>
> I modified arch/arm/boot/dts/omap34xx-hs.dtsi file and
> commented aes line which disable aes support in DT.
>
> Then I booted kernel and loaded omap-aes.ko module. And I got
> this output in dmesg:
>
> [ 0.222930] platform 480c5000.aes: Cannot lookup hwmod
> 'aes' [ 27.758148] omap-aes 480c5000.aes:
> _od_fail_runtime_resume: FIXME: missing hwmod/omap_dev info
> [ 27.765960] omap-aes 480c5000.aes: omap_aes_probe: failed
> to get_sync(-19)
> [ 29.257690] omap-aes 480c5000.aes: initialization failed.
>
> So it looks like some initialization data are missing for
> Nokia N900 (omap3430 device).
>
> Can somebody look at it? I have patched 2.6.28 kernel were
> omap aes support on this N900 device (with special
> bootloader) is working.
>
> Maybe some other data are missing in DT or in hwmod?
dma channels are missing in DT. I applied this patch:
diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi
index 01b7111..473d460 100644
--- a/arch/arm/boot/dts/omap3.dtsi
+++ b/arch/arm/boot/dts/omap3.dtsi
@@ -92,6 +92,8 @@
ti,hwmods = "aes";
reg = <0x480c5000 0x50>;
interrupts = <0>;
+ dmas = <&sdma 65 &sdma 66>;
+ dma-names = "tx", "rx";
};
prm: prm@48306000 {
@@ -550,6 +552,8 @@
ti,hwmods = "sham";
reg = <0x480c3000 0x64>;
interrupts = <49>;
+ dmas = <&sdma 96>;
+ dma-names = "rx";
};
smartreflex_core: smartreflex@480cb000 {
and omap-aes driver was successfully loaded. now it is in /proc/crypto
I copied dma names and numbers from file arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
--
Pali Rohár
pali.rohar@gmail.com
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Nokia N900: omap aes is broken
2015-02-18 21:02 ` Pali Rohár
@ 2015-02-18 21:27 ` Pali Rohár
2015-02-24 17:25 ` Tony Lindgren
0 siblings, 1 reply; 10+ messages in thread
From: Pali Rohár @ 2015-02-18 21:27 UTC (permalink / raw)
To: Tony Lindgren
Cc: Nishanth Menon, Felipe Balbi, Ivaylo Dimitrov, Aaro Koskinen,
Sebastian Reichel, Pavel Machek, linux-kernel, linux-omap,
linux-crypto
[-- Attachment #1: Type: Text/Plain, Size: 2749 bytes --]
On Wednesday 18 February 2015 22:02:30 Pali Rohár wrote:
> On Wednesday 18 February 2015 13:21:03 Pali Rohár wrote:
> > Hello,
> >
> > I tried to test OMAP AES driver on Nokia N900 with special
> > Nokia bootloader which enable L3 firewall for OMAP AES HW
> > support.
> >
> > I modified arch/arm/boot/dts/omap34xx-hs.dtsi file and
> > commented aes line which disable aes support in DT.
> >
> > Then I booted kernel and loaded omap-aes.ko module. And I
> > got this output in dmesg:
> >
> > [ 0.222930] platform 480c5000.aes: Cannot lookup hwmod
> > 'aes' [ 27.758148] omap-aes 480c5000.aes:
> > _od_fail_runtime_resume: FIXME: missing hwmod/omap_dev info
> > [ 27.765960] omap-aes 480c5000.aes: omap_aes_probe: failed
> > to get_sync(-19)
> > [ 29.257690] omap-aes 480c5000.aes: initialization failed.
> >
> > So it looks like some initialization data are missing for
> > Nokia N900 (omap3430 device).
> >
> > Can somebody look at it? I have patched 2.6.28 kernel were
> > omap aes support on this N900 device (with special
> > bootloader) is working.
> >
> > Maybe some other data are missing in DT or in hwmod?
>
> dma channels are missing in DT. I applied this patch:
>
> diff --git a/arch/arm/boot/dts/omap3.dtsi
> b/arch/arm/boot/dts/omap3.dtsi index 01b7111..473d460 100644
> --- a/arch/arm/boot/dts/omap3.dtsi
> +++ b/arch/arm/boot/dts/omap3.dtsi
> @@ -92,6 +92,8 @@
> ti,hwmods = "aes";
> reg = <0x480c5000 0x50>;
> interrupts = <0>;
> + dmas = <&sdma 65 &sdma 66>;
> + dma-names = "tx", "rx";
> };
>
> prm: prm@48306000 {
> @@ -550,6 +552,8 @@
> ti,hwmods = "sham";
> reg = <0x480c3000 0x64>;
> interrupts = <49>;
> + dmas = <&sdma 96>;
> + dma-names = "rx";
> };
>
> smartreflex_core: smartreflex@480cb000 {
>
>
> and omap-aes driver was successfully loaded. now it is in
> /proc/crypto
>
> I copied dma names and numbers from file
> arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
And I also needed to apply this patch:
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
index 11468ee..3281f30 100644
--- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
@@ -3938,8 +3938,9 @@ int __init omap3xxx_hwmod_init(void)
if (r < 0)
return r;
- /* Register GP-only hwmod links. */
- if (h_gp && omap_type() == OMAP2_DEVICE_TYPE_GP) {
+// /* Register GP-only hwmod links. */
+// if (h_gp && omap_type() == OMAP2_DEVICE_TYPE_GP) {
+ if (h_gp) {
r = omap_hwmod_register_links(h_gp);
if (r < 0)
return r;
aes hwmod is defined in GP-only hwmod...
--
Pali Rohár
pali.rohar@gmail.com
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Nokia N900: omap aes is broken
2015-02-18 21:27 ` Pali Rohár
@ 2015-02-24 17:25 ` Tony Lindgren
2015-02-24 17:38 ` Pali Rohár
0 siblings, 1 reply; 10+ messages in thread
From: Tony Lindgren @ 2015-02-24 17:25 UTC (permalink / raw)
To: Pali Rohár
Cc: Nishanth Menon, Felipe Balbi, Ivaylo Dimitrov, Aaro Koskinen,
Sebastian Reichel, Pavel Machek, linux-kernel, linux-omap,
linux-crypto
* Pali Rohár <pali.rohar@gmail.com> [150218 16:03]:
> On Wednesday 18 February 2015 22:02:30 Pali Rohár wrote:
> > On Wednesday 18 February 2015 13:21:03 Pali Rohár wrote:
> > > Hello,
> > >
> > > I tried to test OMAP AES driver on Nokia N900 with special
> > > Nokia bootloader which enable L3 firewall for OMAP AES HW
> > > support.
> > >
> > > I modified arch/arm/boot/dts/omap34xx-hs.dtsi file and
> > > commented aes line which disable aes support in DT.
> > >
> > > Then I booted kernel and loaded omap-aes.ko module. And I
> > > got this output in dmesg:
> > >
> > > [ 0.222930] platform 480c5000.aes: Cannot lookup hwmod
> > > 'aes' [ 27.758148] omap-aes 480c5000.aes:
> > > _od_fail_runtime_resume: FIXME: missing hwmod/omap_dev info
> > > [ 27.765960] omap-aes 480c5000.aes: omap_aes_probe: failed
> > > to get_sync(-19)
> > > [ 29.257690] omap-aes 480c5000.aes: initialization failed.
> > >
> > > So it looks like some initialization data are missing for
> > > Nokia N900 (omap3430 device).
> > >
> > > Can somebody look at it? I have patched 2.6.28 kernel were
> > > omap aes support on this N900 device (with special
> > > bootloader) is working.
> > >
> > > Maybe some other data are missing in DT or in hwmod?
> >
> > dma channels are missing in DT. I applied this patch:
> >
> > diff --git a/arch/arm/boot/dts/omap3.dtsi
> > b/arch/arm/boot/dts/omap3.dtsi index 01b7111..473d460 100644
> > --- a/arch/arm/boot/dts/omap3.dtsi
> > +++ b/arch/arm/boot/dts/omap3.dtsi
> > @@ -92,6 +92,8 @@
> > ti,hwmods = "aes";
> > reg = <0x480c5000 0x50>;
> > interrupts = <0>;
> > + dmas = <&sdma 65 &sdma 66>;
> > + dma-names = "tx", "rx";
> > };
> >
> > prm: prm@48306000 {
> > @@ -550,6 +552,8 @@
> > ti,hwmods = "sham";
> > reg = <0x480c3000 0x64>;
> > interrupts = <49>;
> > + dmas = <&sdma 96>;
> > + dma-names = "rx";
> > };
> >
> > smartreflex_core: smartreflex@480cb000 {
> >
> >
> > and omap-aes driver was successfully loaded. now it is in
> > /proc/crypto
> >
> > I copied dma names and numbers from file
> > arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
>
> And I also needed to apply this patch:
>
> diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
> index 11468ee..3281f30 100644
> --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
> +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
> @@ -3938,8 +3938,9 @@ int __init omap3xxx_hwmod_init(void)
> if (r < 0)
> return r;
>
> - /* Register GP-only hwmod links. */
> - if (h_gp && omap_type() == OMAP2_DEVICE_TYPE_GP) {
> +// /* Register GP-only hwmod links. */
> +// if (h_gp && omap_type() == OMAP2_DEVICE_TYPE_GP) {
> + if (h_gp) {
> r = omap_hwmod_register_links(h_gp);
> if (r < 0)
> return r;
>
> aes hwmod is defined in GP-only hwmod...
Doesn't this depend on the bootloader version of n900 to work?
Regards,
Tony
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Nokia N900: omap aes is broken
2015-02-24 17:25 ` Tony Lindgren
@ 2015-02-24 17:38 ` Pali Rohár
2015-02-24 17:37 ` Tony Lindgren
0 siblings, 1 reply; 10+ messages in thread
From: Pali Rohár @ 2015-02-24 17:38 UTC (permalink / raw)
To: Tony Lindgren
Cc: Nishanth Menon, Felipe Balbi, Ivaylo Dimitrov, Aaro Koskinen,
Sebastian Reichel, Pavel Machek, linux-kernel, linux-omap,
linux-crypto
[-- Attachment #1: Type: Text/Plain, Size: 3607 bytes --]
On Tuesday 24 February 2015 18:25:12 Tony Lindgren wrote:
> * Pali Rohár <pali.rohar@gmail.com> [150218 16:03]:
> > On Wednesday 18 February 2015 22:02:30 Pali Rohár wrote:
> > > On Wednesday 18 February 2015 13:21:03 Pali Rohár wrote:
> > > > Hello,
> > > >
> > > > I tried to test OMAP AES driver on Nokia N900 with
> > > > special Nokia bootloader which enable L3 firewall for
> > > > OMAP AES HW support.
> > > >
> > > > I modified arch/arm/boot/dts/omap34xx-hs.dtsi file and
> > > > commented aes line which disable aes support in DT.
> > > >
> > > > Then I booted kernel and loaded omap-aes.ko module. And
> > > > I got this output in dmesg:
> > > >
> > > > [ 0.222930] platform 480c5000.aes: Cannot lookup
> > > > hwmod 'aes' [ 27.758148] omap-aes 480c5000.aes:
> > > > _od_fail_runtime_resume: FIXME: missing hwmod/omap_dev
> > > > info [ 27.765960] omap-aes 480c5000.aes:
> > > > omap_aes_probe: failed to get_sync(-19)
> > > > [ 29.257690] omap-aes 480c5000.aes: initialization
> > > > failed.
> > > >
> > > > So it looks like some initialization data are missing
> > > > for Nokia N900 (omap3430 device).
> > > >
> > > > Can somebody look at it? I have patched 2.6.28 kernel
> > > > were omap aes support on this N900 device (with special
> > > > bootloader) is working.
> > > >
> > > > Maybe some other data are missing in DT or in hwmod?
> > >
> > > dma channels are missing in DT. I applied this patch:
> > >
> > > diff --git a/arch/arm/boot/dts/omap3.dtsi
> > > b/arch/arm/boot/dts/omap3.dtsi index 01b7111..473d460
> > > 100644 --- a/arch/arm/boot/dts/omap3.dtsi
> > > +++ b/arch/arm/boot/dts/omap3.dtsi
> > > @@ -92,6 +92,8 @@
> > >
> > > ti,hwmods = "aes";
> > > reg = <0x480c5000 0x50>;
> > > interrupts = <0>;
> > >
> > > + dmas = <&sdma 65 &sdma 66>;
> > > + dma-names = "tx", "rx";
> > >
> > > };
> > >
> > > prm: prm@48306000 {
> > >
> > > @@ -550,6 +552,8 @@
> > >
> > > ti,hwmods = "sham";
> > > reg = <0x480c3000 0x64>;
> > > interrupts = <49>;
> > >
> > > + dmas = <&sdma 96>;
> > > + dma-names = "rx";
> > >
> > > };
> > >
> > > smartreflex_core: smartreflex@480cb000 {
> > >
> > > and omap-aes driver was successfully loaded. now it is in
> > > /proc/crypto
> > >
> > > I copied dma names and numbers from file
> > > arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
> >
> > And I also needed to apply this patch:
> >
> > diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
> > b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c index
> > 11468ee..3281f30 100644
> > --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
> > +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
> > @@ -3938,8 +3938,9 @@ int __init omap3xxx_hwmod_init(void)
> >
> > if (r < 0)
> >
> > return r;
> >
> > - /* Register GP-only hwmod links. */
> > - if (h_gp && omap_type() == OMAP2_DEVICE_TYPE_GP) {
> > +// /* Register GP-only hwmod links. */
> > +// if (h_gp && omap_type() == OMAP2_DEVICE_TYPE_GP) {
> > + if (h_gp) {
> >
> > r = omap_hwmod_register_links(h_gp);
> > if (r < 0)
> >
> > return r;
> >
> > aes hwmod is defined in GP-only hwmod...
>
> Doesn't this depend on the bootloader version of n900 to work?
>
> Regards,
>
> Tony
Ok, it looks like second patch (omap_hwmod_3xxx_data.c) needs
that aes-enabled bootloader.
But first patch (omap3.dtsi) is needed for proper definitions.
Otherwise omap-aes driver will never work on DT systems.
--
Pali Rohár
pali.rohar@gmail.com
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Nokia N900: omap aes is broken
2015-02-24 17:38 ` Pali Rohár
@ 2015-02-24 17:37 ` Tony Lindgren
2015-02-24 17:49 ` Pali Rohár
2015-02-25 9:50 ` Pavel Machek
0 siblings, 2 replies; 10+ messages in thread
From: Tony Lindgren @ 2015-02-24 17:37 UTC (permalink / raw)
To: Pali Rohár
Cc: Nishanth Menon, Felipe Balbi, Ivaylo Dimitrov, Aaro Koskinen,
Sebastian Reichel, Pavel Machek, linux-kernel, linux-omap,
linux-crypto
* Pali Rohár <pali.rohar@gmail.com> [150224 09:42]:
> On Tuesday 24 February 2015 18:25:12 Tony Lindgren wrote:
> > * Pali Rohár <pali.rohar@gmail.com> [150218 16:03]:
> > > --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
> > > +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
> > > @@ -3938,8 +3938,9 @@ int __init omap3xxx_hwmod_init(void)
> > >
> > > if (r < 0)
> > >
> > > return r;
> > >
> > > - /* Register GP-only hwmod links. */
> > > - if (h_gp && omap_type() == OMAP2_DEVICE_TYPE_GP) {
> > > +// /* Register GP-only hwmod links. */
> > > +// if (h_gp && omap_type() == OMAP2_DEVICE_TYPE_GP) {
> > > + if (h_gp) {
> > >
> > > r = omap_hwmod_register_links(h_gp);
> > > if (r < 0)
> > >
> > > return r;
> > >
> > > aes hwmod is defined in GP-only hwmod...
> >
> > Doesn't this depend on the bootloader version of n900 to work?
> >
> > Regards,
> >
> > Tony
>
> Ok, it looks like second patch (omap_hwmod_3xxx_data.c) needs
> that aes-enabled bootloader.
OK we need some runtime detection somehow for what's enabled..
> But first patch (omap3.dtsi) is needed for proper definitions.
> Otherwise omap-aes driver will never work on DT systems.
Yeah that one makes sense to me, I guess you'll do a proper
fix for that one.
Regards,
Tony
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Nokia N900: omap aes is broken
2015-02-24 17:37 ` Tony Lindgren
@ 2015-02-24 17:49 ` Pali Rohár
2015-02-24 17:50 ` Tony Lindgren
2015-02-25 9:50 ` Pavel Machek
1 sibling, 1 reply; 10+ messages in thread
From: Pali Rohár @ 2015-02-24 17:49 UTC (permalink / raw)
To: Tony Lindgren
Cc: Nishanth Menon, Felipe Balbi, Ivaylo Dimitrov, Aaro Koskinen,
Sebastian Reichel, Pavel Machek, linux-kernel, linux-omap,
linux-crypto
[-- Attachment #1: Type: Text/Plain, Size: 1651 bytes --]
On Tuesday 24 February 2015 18:37:34 Tony Lindgren wrote:
> * Pali Rohár <pali.rohar@gmail.com> [150224 09:42]:
> > On Tuesday 24 February 2015 18:25:12 Tony Lindgren wrote:
> > > * Pali Rohár <pali.rohar@gmail.com> [150218 16:03]:
> > > > --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
> > > > +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
> > > > @@ -3938,8 +3938,9 @@ int __init
> > > > omap3xxx_hwmod_init(void)
> > > >
> > > > if (r < 0)
> > > >
> > > > return r;
> > > >
> > > > - /* Register GP-only hwmod links. */
> > > > - if (h_gp && omap_type() == OMAP2_DEVICE_TYPE_GP) {
> > > > +// /* Register GP-only hwmod links. */
> > > > +// if (h_gp && omap_type() == OMAP2_DEVICE_TYPE_GP) {
> > > > + if (h_gp) {
> > > >
> > > > r = omap_hwmod_register_links(h_gp);
> > > > if (r < 0)
> > > >
> > > > return r;
> > > >
> > > > aes hwmod is defined in GP-only hwmod...
> > >
> > > Doesn't this depend on the bootloader version of n900 to
> > > work?
> > >
> > > Regards,
> > >
> > > Tony
> >
> > Ok, it looks like second patch (omap_hwmod_3xxx_data.c)
> > needs that aes-enabled bootloader.
>
> OK we need some runtime detection somehow for what's enabled..
>
What about checking DT if omap-aes is disabled or not?
> > But first patch (omap3.dtsi) is needed for proper
> > definitions. Otherwise omap-aes driver will never work on
> > DT systems.
>
> Yeah that one makes sense to me, I guess you'll do a proper
> fix for that one.
>
> Regards,
>
> Tony
Yes, I will send patches via correct git format-patch.
--
Pali Rohár
pali.rohar@gmail.com
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Nokia N900: omap aes is broken
2015-02-24 17:49 ` Pali Rohár
@ 2015-02-24 17:50 ` Tony Lindgren
0 siblings, 0 replies; 10+ messages in thread
From: Tony Lindgren @ 2015-02-24 17:50 UTC (permalink / raw)
To: Pali Rohár
Cc: Nishanth Menon, Felipe Balbi, Ivaylo Dimitrov, Aaro Koskinen,
Sebastian Reichel, Pavel Machek, linux-kernel, linux-omap,
linux-crypto
* Pali Rohár <pali.rohar@gmail.com> [150224 09:52]:
> On Tuesday 24 February 2015 18:37:34 Tony Lindgren wrote:
> > * Pali Rohár <pali.rohar@gmail.com> [150224 09:42]:
> > > On Tuesday 24 February 2015 18:25:12 Tony Lindgren wrote:
> > > > * Pali Rohár <pali.rohar@gmail.com> [150218 16:03]:
> > > > > --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
> > > > > +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
> > > > > @@ -3938,8 +3938,9 @@ int __init
> > > > > omap3xxx_hwmod_init(void)
> > > > >
> > > > > if (r < 0)
> > > > >
> > > > > return r;
> > > > >
> > > > > - /* Register GP-only hwmod links. */
> > > > > - if (h_gp && omap_type() == OMAP2_DEVICE_TYPE_GP) {
> > > > > +// /* Register GP-only hwmod links. */
> > > > > +// if (h_gp && omap_type() == OMAP2_DEVICE_TYPE_GP) {
> > > > > + if (h_gp) {
> > > > >
> > > > > r = omap_hwmod_register_links(h_gp);
> > > > > if (r < 0)
> > > > >
> > > > > return r;
> > > > >
> > > > > aes hwmod is defined in GP-only hwmod...
> > > >
> > > > Doesn't this depend on the bootloader version of n900 to
> > > > work?
> > > >
> > > > Regards,
> > > >
> > > > Tony
> > >
> > > Ok, it looks like second patch (omap_hwmod_3xxx_data.c)
> > > needs that aes-enabled bootloader.
> >
> > OK we need some runtime detection somehow for what's enabled..
> >
>
> What about checking DT if omap-aes is disabled or not?
In general that's not a good solution as marking something with
status = "disabled" means the device is completely ignored and
we will never have the struct device entry created for it and
we can never idle it.
But in this case however, it may be the right thing to do if the
secure mode is using that device.
Regards,
Tony
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Nokia N900: omap aes is broken
2015-02-24 17:37 ` Tony Lindgren
2015-02-24 17:49 ` Pali Rohár
@ 2015-02-25 9:50 ` Pavel Machek
2015-02-25 10:18 ` Pali Rohár
1 sibling, 1 reply; 10+ messages in thread
From: Pavel Machek @ 2015-02-25 9:50 UTC (permalink / raw)
To: Tony Lindgren
Cc: Pali Rohár, Nishanth Menon, Felipe Balbi, Ivaylo Dimitrov,
Aaro Koskinen, Sebastian Reichel, linux-kernel, linux-omap,
linux-crypto
On Tue 2015-02-24 09:37:34, Tony Lindgren wrote:
> * Pali Rohár <pali.rohar@gmail.com> [150224 09:42]:
> > On Tuesday 24 February 2015 18:25:12 Tony Lindgren wrote:
> > > * Pali Rohár <pali.rohar@gmail.com> [150218 16:03]:
> > > > --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
> > > > +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
> > > > @@ -3938,8 +3938,9 @@ int __init omap3xxx_hwmod_init(void)
> > > >
> > > > if (r < 0)
> > > >
> > > > return r;
> > > >
> > > > - /* Register GP-only hwmod links. */
> > > > - if (h_gp && omap_type() == OMAP2_DEVICE_TYPE_GP) {
> > > > +// /* Register GP-only hwmod links. */
> > > > +// if (h_gp && omap_type() == OMAP2_DEVICE_TYPE_GP) {
> > > > + if (h_gp) {
> > > >
> > > > r = omap_hwmod_register_links(h_gp);
> > > > if (r < 0)
> > > >
> > > > return r;
> > > >
> > > > aes hwmod is defined in GP-only hwmod...
> > >
> > > Doesn't this depend on the bootloader version of n900 to work?
> > >
> > > Regards,
> > >
> > > Tony
> >
> > Ok, it looks like second patch (omap_hwmod_3xxx_data.c) needs
> > that aes-enabled bootloader.
>
> OK we need some runtime detection somehow for what's enabled..
>
> > But first patch (omap3.dtsi) is needed for proper definitions.
> > Otherwise omap-aes driver will never work on DT systems.
>
> Yeah that one makes sense to me, I guess you'll do a proper
> fix for that one.
If this depends on bootloader... would command line parameter be right
solution here?
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Nokia N900: omap aes is broken
2015-02-25 9:50 ` Pavel Machek
@ 2015-02-25 10:18 ` Pali Rohár
0 siblings, 0 replies; 10+ messages in thread
From: Pali Rohár @ 2015-02-25 10:18 UTC (permalink / raw)
To: Pavel Machek
Cc: Tony Lindgren, Nishanth Menon, Felipe Balbi, Ivaylo Dimitrov,
Aaro Koskinen, Sebastian Reichel, linux-kernel, linux-omap,
linux-crypto
[-- Attachment #1: Type: Text/Plain, Size: 2018 bytes --]
On Wednesday 25 February 2015 10:50:00 Pavel Machek wrote:
> On Tue 2015-02-24 09:37:34, Tony Lindgren wrote:
> > * Pali Rohár <pali.rohar@gmail.com> [150224 09:42]:
> > > On Tuesday 24 February 2015 18:25:12 Tony Lindgren wrote:
> > > > * Pali Rohár <pali.rohar@gmail.com> [150218 16:03]:
> > > > > --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
> > > > > +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
> > > > > @@ -3938,8 +3938,9 @@ int __init
> > > > > omap3xxx_hwmod_init(void)
> > > > >
> > > > > if (r < 0)
> > > > >
> > > > > return r;
> > > > >
> > > > > - /* Register GP-only hwmod links. */
> > > > > - if (h_gp && omap_type() == OMAP2_DEVICE_TYPE_GP) {
> > > > > +// /* Register GP-only hwmod links. */
> > > > > +// if (h_gp && omap_type() == OMAP2_DEVICE_TYPE_GP) {
> > > > > + if (h_gp) {
> > > > >
> > > > > r = omap_hwmod_register_links(h_gp);
> > > > > if (r < 0)
> > > > >
> > > > > return r;
> > > > >
> > > > > aes hwmod is defined in GP-only hwmod...
> > > >
> > > > Doesn't this depend on the bootloader version of n900 to
> > > > work?
> > > >
> > > > Regards,
> > > >
> > > > Tony
> > >
> > > Ok, it looks like second patch (omap_hwmod_3xxx_data.c)
> > > needs that aes-enabled bootloader.
> >
> > OK we need some runtime detection somehow for what's
> > enabled..
> >
> > > But first patch (omap3.dtsi) is needed for proper
> > > definitions. Otherwise omap-aes driver will never work on
> > > DT systems.
> >
> > Yeah that one makes sense to me, I guess you'll do a proper
> > fix for that one.
>
> If this depends on bootloader... would command line parameter
> be right solution here?
> Pavel
Problem is that we need to disable AES in:
* DT file
* hwmod source code
* ... and maybe on other places too ...
So I think it make sense to check if AES is disabled in DT and
add this check to other parts of kernel source code where needed.
--
Pali Rohár
pali.rohar@gmail.com
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2015-02-25 10:18 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-18 12:21 Nokia N900: omap aes is broken Pali Rohár
2015-02-18 21:02 ` Pali Rohár
2015-02-18 21:27 ` Pali Rohár
2015-02-24 17:25 ` Tony Lindgren
2015-02-24 17:38 ` Pali Rohár
2015-02-24 17:37 ` Tony Lindgren
2015-02-24 17:49 ` Pali Rohár
2015-02-24 17:50 ` Tony Lindgren
2015-02-25 9:50 ` Pavel Machek
2015-02-25 10:18 ` Pali Rohár
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).