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: 9783485 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 92F0960212 for ; Tue, 13 Jun 2017 09:30:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 87BD828591 for ; Tue, 13 Jun 2017 09:30:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7C30228683; Tue, 13 Jun 2017 09:30:01 +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=-6.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 75FF428591 for ; Tue, 13 Jun 2017 09:30:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752483AbdFMJ3E (ORCPT ); Tue, 13 Jun 2017 05:29:04 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:35377 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752525AbdFMJ3D (ORCPT ); Tue, 13 Jun 2017 05:29:03 -0400 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?= Cc: Russell King , linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Sebastian Reichel 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> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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, };