From patchwork Tue Jun 13 09:28:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Reichel X-Patchwork-Id: 9783487 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9B28060212 for ; Tue, 13 Jun 2017 09:30:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8E8C528591 for ; Tue, 13 Jun 2017 09:30:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 80C222867B; Tue, 13 Jun 2017 09:30:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id ADB1928640 for ; Tue, 13 Jun 2017 09:29:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=7V9cKqVM2z6qHw2rQeEij7g1JgcZYZMGXGtptvf4NBI=; b=Lf8ixkgsdExqJux9JanHOLdI6o ippO+/qbsFINQeRgyhranMd7AY84GUEkFm4063Zr0dGPQ5j3TD/vPOS7XZRfiduV5aBvULnW4y8Bn 7ZBz8wBQHH3egWckIhYcMUcsf62tTenSLNuCxbYoWGuY5krSrXwxJ+9MQ2yQG4/DN9LtTsMloympx 9gSWYX0ZWJKO/h2OY06dzg0qYNVo9PJn79G8RgbZpag+LchUeckMTj1nYkW5d9ku3Zp9MNSizh0LR vkb5gSW1Ns/pvw+tuK8aRtVRFbpj178akOFzn1L06SmKCW6B7Tp/GhTsaJ7F7ssAdQvTlSIBtdtfY 0I8oCq9A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dKi97-0006ik-PO; Tue, 13 Jun 2017 09:29:57 +0000 Received: from bhuna.collabora.co.uk ([2a00:1098:0:82:1000:25:2eeb:e3e3]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dKi8W-00060s-H9 for linux-arm-kernel@lists.infradead.org; Tue, 13 Jun 2017 09:29:28 +0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: sre) with ESMTPSA id E731C26BA48 From: Sebastian Reichel To: Sebastian Reichel , Tony Lindgren , Paul Walmsley , Tero Kristo , =?UTF-8?q?Beno=C3=AEt=20Cousson?= Subject: [RFCv2 4/5] ARM: OMAP4: hwmod data: add aes2 Date: Tue, 13 Jun 2017 11:28:46 +0200 Message-Id: <20170613092847.16732-5-sebastian.reichel@collabora.co.uk> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170613092847.16732-1-sebastian.reichel@collabora.co.uk> References: <20170613092847.16732-1-sebastian.reichel@collabora.co.uk> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170613_022920_873001_E71BA314 X-CRM114-Status: GOOD ( 10.74 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sebastian Reichel , linux-omap@vger.kernel.org, Russell King , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This adds the hwmod entry for the second AES module available on OMAP4. Signed-off-by: Sebastian Reichel --- Hi, This module is currently missing from DT and the public TRM does not provide enough information for me to add it (the memory area for the crypto cores is "reserved"). Adding it without the DT entry results in the following error during boot: [ 0.456085] omap_hwmod: aes2: no dt node [ 0.460205] ------------[ cut here ]------------ [ 0.464996] WARNING: CPU: 0 PID: 1 at arch/arm/mach-omap2/omap_hwmod.c:2359 _init.constprop.19+0x1e4/0x4cc [ 0.475036] omap_hwmod: aes2: doesn't have mpu register target base [ 0.481536] Modules linked in: [ 0.484710] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.12.0-rc4-00030-gcc9206ecc9d9-dirty #421 [ 0.493743] Hardware name: Generic OMAP4 (Flattened Device Tree) [ 0.499969] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 0.507995] [] (show_stack) from [] (dump_stack+0xac/0xe0) [ 0.515502] [] (dump_stack) from [] (__warn+0xd8/0x104) [ 0.522735] [] (__warn) from [] (warn_slowpath_fmt+0x34/0x44) [ 0.530487] [] (warn_slowpath_fmt) from [] (_init.constprop.19+0x1e4/0x4cc) [ 0.539489] [] (_init.constprop.19) from [] (__omap_hwmod_setup_all+0x3c/0x100) [ 0.548889] [] (__omap_hwmod_setup_all) from [] (do_one_initcall+0x3c/0x170) [ 0.557983] [] (do_one_initcall) from [] (kernel_init_freeable+0x210/0x2dc) [ 0.567016] [] (kernel_init_freeable) from [] (kernel_init+0x8/0x114) [ 0.575500] [] (kernel_init) from [] (ret_from_fork+0x14/0x24) [ 0.583374] ---[ end trace 7e68b72794b10f28 ]--- -- Sebastian --- arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c index 0aff064d6469..3d58eaef387e 100644 --- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c @@ -992,6 +992,27 @@ static struct omap_hwmod_ocp_if omap44xx_l3_main_2__aes1 = { .user = OCP_USER_MPU | OCP_USER_SDMA, }; +static struct omap_hwmod omap44xx_aes2_hwmod = { + .name = "aes2", + .class = &omap44xx_aes_hwmod_class, + .clkdm_name = "l4_secure_clkdm", + .main_clk = "l3_div_ck", + .prcm = { + .omap4 = { + .context_offs = OMAP4_RM_L4SEC_AES2_CONTEXT_OFFSET, + .clkctrl_offs = OMAP4_CM_L4SEC_AES2_CLKCTRL_OFFSET, + .modulemode = MODULEMODE_SWCTRL, + }, + }, +}; + +static struct omap_hwmod_ocp_if omap44xx_l3_main_2__aes2 = { + .master = &omap44xx_l4_per_hwmod, + .slave = &omap44xx_aes2_hwmod, + .clk = "l3_div_ck", + .user = OCP_USER_MPU | OCP_USER_SDMA, +}; + /* * 'fdif' class * face detection hw accelerator module @@ -4834,6 +4855,7 @@ static struct omap_hwmod_ocp_if *omap44xx_hwmod_ocp_ifs[] __initdata = { &omap44xx_mpu__emif1, &omap44xx_mpu__emif2, &omap44xx_l3_main_2__aes1, + &omap44xx_l3_main_2__aes2, NULL, };