From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753301AbbBXR3a (ORCPT ); Tue, 24 Feb 2015 12:29:30 -0500 Received: from pmta1.delivery3.ore.mailhop.org ([54.191.214.36]:42545 "EHLO pmta1.delivery3.ore.mailhop.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753247AbbBXR32 (ORCPT ); Tue, 24 Feb 2015 12:29:28 -0500 X-Mail-Handler: DuoCircle Outbound SMTP X-Originating-IP: 104.193.169.186 X-Report-Abuse-To: abuse@duocircle.com (see https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information for abuse reporting information) X-MHO-User: U2FsdGVkX19hor5itFmCUNfxlvHAK8O5 Date: Tue, 24 Feb 2015 09:25:12 -0800 From: Tony Lindgren To: Pali =?utf-8?B?Um9ow6Fy?= Cc: Nishanth Menon , Felipe Balbi , Ivaylo Dimitrov , Aaro Koskinen , Sebastian Reichel , Pavel Machek , linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, linux-crypto@vger.kernel.org Subject: Re: Nokia N900: omap aes is broken Message-ID: <20150224172512.GC28244@atomide.com> References: <201502181321.03774@pali> <201502182202.30272@pali> <201502182227.55488@pali> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <201502182227.55488@pali> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Pali Rohár [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