From patchwork Tue Jun 13 09:28:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Reichel X-Patchwork-Id: 9783495 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 61B3960212 for ; Tue, 13 Jun 2017 09:30:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 55F5C2856B for ; Tue, 13 Jun 2017 09:30:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4A49E2860D; Tue, 13 Jun 2017 09:30:32 +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 D62692856B for ; Tue, 13 Jun 2017 09:30:31 +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=zpzdxh1gKM6mNPXCNf3pDsIYgNT6th0rupBhe9SiElE=; b=AHhGgm4QQ0Jyj3qTMq0kPdrpWl wkTVlof2+BLDWBlEz0SkbFplsb2RcOB0dIlfsONgM2pN5NqqS4sYJ0Yj2aqH0M1KRsCiD2BBhwfPC w76aUHTIcU9FE9USDO9RiOM8XYjp4Yksxs4DXwmmKSz8+3kIm4kPJAp2EVFMeAiDIEToVyNE3fSx8 /NmgZr7sIKqJvuxZoOxFHse5GeYJjzx0xvN5IauA+0GUhV4EhyhLRCF1UUrcqVJ+u08U53syR9Iz5 4y1m7Q2HQlY3guoLjwmu+sqdPnlMj+eavDul1COGOnkdKk9e5rhtEPATN6hkKNud4l5Fq03XQMTOF HfwxkpYw==; 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 1dKi9e-00005u-1s; Tue, 13 Jun 2017 09:30:30 +0000 Received: from bhuna.collabora.co.uk ([46.235.227.227]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dKi8v-00062J-LW for linux-arm-kernel@lists.infradead.org; Tue, 13 Jun 2017 09:29:48 +0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: sre) with ESMTPSA id 3C16726BA49 From: Sebastian Reichel To: Sebastian Reichel , Tony Lindgren , Paul Walmsley , Tero Kristo , =?UTF-8?q?Beno=C3=AEt=20Cousson?= Subject: [PATCHv2 5/5] ARM: OMAP4: hwmod data: add des Date: Tue, 13 Jun 2017 11:28:47 +0200 Message-Id: <20170613092847.16732-6-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_022946_398522_1314F027 X-CRM114-Status: UNSURE ( 9.13 ) X-CRM114-Notice: Please train this message. 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: Joel Fernandes , Russell King , linux-kernel@vger.kernel.org, Sebastian Reichel , linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.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 fixes the following error during kernel boot: platform 480a5000.des: Cannot lookup hwmod 'des' Unfortunately the DES module is only documented partly in the OMAP4430 TRM. I found an old patch from Joel, which I took over and updated for currently mainline. Signed-off-by: Joel Fernandes Signed-off-by: Sebastian Reichel --- arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 37 ++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c index 3d58eaef387e..6353e8df9b76 100644 --- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c @@ -1014,6 +1014,42 @@ static struct omap_hwmod_ocp_if omap44xx_l3_main_2__aes2 = { }; /* + * 'des' class for DES3DES module + */ +static struct omap_hwmod_class_sysconfig omap44xx_des_sysc = { + .rev_offs = 0x30, + .sysc_offs = 0x34, + .syss_offs = 0x38, + .sysc_flags = SYSS_HAS_RESET_STATUS, +}; + +static struct omap_hwmod_class omap44xx_des_hwmod_class = { + .name = "des", + .sysc = &omap44xx_des_sysc, +}; + +static struct omap_hwmod omap44xx_des_hwmod = { + .name = "des", + .class = &omap44xx_des_hwmod_class, + .clkdm_name = "l4_secure_clkdm", + .main_clk = "l3_div_ck", + .prcm = { + .omap4 = { + .context_offs = OMAP4_RM_L4SEC_DES3DES_CONTEXT_OFFSET, + .clkctrl_offs = OMAP4_CM_L4SEC_DES3DES_CLKCTRL_OFFSET, + .modulemode = MODULEMODE_SWCTRL, + }, + }, +}; + +struct omap_hwmod_ocp_if omap44xx_l3_main_2__des = { + .master = &omap44xx_l3_main_2_hwmod, + .slave = &omap44xx_des_hwmod, + .clk = "l3_div_ck", + .user = OCP_USER_MPU | OCP_USER_SDMA, +}; + +/* * 'fdif' class * face detection hw accelerator module */ @@ -4856,6 +4892,7 @@ static struct omap_hwmod_ocp_if *omap44xx_hwmod_ocp_ifs[] __initdata = { &omap44xx_mpu__emif2, &omap44xx_l3_main_2__aes1, &omap44xx_l3_main_2__aes2, + &omap44xx_l3_main_2__des, NULL, };