From patchwork Wed Feb 18 21:27:55 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 5847991 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 5461CBF440 for ; Wed, 18 Feb 2015 21:28:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AAD022015E for ; Wed, 18 Feb 2015 21:28:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F1D102010E for ; Wed, 18 Feb 2015 21:28:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753074AbbBRV2B (ORCPT ); Wed, 18 Feb 2015 16:28:01 -0500 Received: from mail-wi0-f178.google.com ([209.85.212.178]:54030 "EHLO mail-wi0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753013AbbBRV16 (ORCPT ); Wed, 18 Feb 2015 16:27:58 -0500 Received: by mail-wi0-f178.google.com with SMTP id em10so5154934wid.5; Wed, 18 Feb 2015 13:27:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:user-agent:cc:references:in-reply-to :mime-version:content-type:content-transfer-encoding:message-id; bh=TC9Of+KQ4lIiJ1MdBt4A4sqhzvJPZRUt/VFOEj/9qlc=; b=nJmaN0e88dpVlmGZtpM5w+qWhHtlOuD94Ez1Dz+0TYtLJrvLsQaIjVRtCdgnZz9Pyb o/kuEPHwJYJTMixzLTsuID4r2mp4zG9el9bjfQzsri/73JLgwRR0BwGCD5EoF/iFvnZA JVPgc68f4HZjY4pGFHMnElvkLp0nY6C+WHuO0eJrGJtdxjokCr4TL2uNe9pyXO8n9Q57 Z2CLhJ4zY/FODc4X/LLnXVF/qYYneifbBzVqUG9cIoqVUmBSkEK5aOVZF46khgpz+Kpq GBG2H2fmvbpYP6sWFog5eEW6SieY5sbAor5HyxP4tSpMO/mNYYnU5BQI4SFoCd6xp20Q LxhQ== X-Received: by 10.194.192.4 with SMTP id hc4mr2505802wjc.59.1424294877196; Wed, 18 Feb 2015 13:27:57 -0800 (PST) Received: from pali-latitude.localnet ([2001:718:1e03:a01::1ca]) by mx.google.com with ESMTPSA id vq9sm34419108wjc.6.2015.02.18.13.27.56 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 18 Feb 2015 13:27:56 -0800 (PST) From: Pali =?utf-8?q?Roh=C3=A1r?= To: Tony Lindgren Subject: Re: Nokia N900: omap aes is broken Date: Wed, 18 Feb 2015 22:27:55 +0100 User-Agent: KMail/1.13.7 (Linux/3.13.0-45-generic; KDE/4.14.2; x86_64; ; ) 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 References: <201502181321.03774@pali> <201502182202.30272@pali> In-Reply-To: <201502182202.30272@pali> MIME-Version: 1.0 Message-Id: <201502182227.55488@pali> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, T_TVD_MIME_EPI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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: aes hwmod is defined in GP-only hwmod... 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;