From patchwork Thu Dec 14 14:02:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gilad Ben-Yossef X-Patchwork-Id: 121956 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp6843809qgn; Thu, 14 Dec 2017 06:03:11 -0800 (PST) X-Google-Smtp-Source: ACJfBov1KBtvLw3jSD0vHS9ZyypESKrgHKXGMrD3tHbXZvyUaJlK1u4FeZzblXBmUEMJJkH0LgeY X-Received: by 10.98.135.138 with SMTP id i132mr9594389pfe.130.1513260191746; Thu, 14 Dec 2017 06:03:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513260191; cv=none; d=google.com; s=arc-20160816; b=yRRLZs0m6Np8VSLSF+pynUxY6Wl+2rdQBAcfefro3IIPoW+UtHr7Lwi9KkMJz3qenT XLai78BWh3mWewpts0J1eklShy44LfKSf4nnN/nyPsiMmICsHm4/SUhz4757pVpCA8A3 VgS7VyXk/WQGUfhtF/p4V2Y1I1LIIGQO/LeoYzpLPTwm71hMdOtkvis1RK5LpQ9+K15h mYVt/5+akxYjXhcfJvXZ7dx6PRkk7Rto4SNW6CPBqtquoAmnVs02trkbmJBZkgtkqBnx WcTu0KfOgTNPwPsSfvsMp2+2SX8N1nEHTXcciJPIiZHk9cz5AS2hBKVP/ZcCM7zntUt8 2G2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=iI0KuVRi51j0eUutF+G6OK6lTReNDvXEhDmbJkIyIC8=; b=rmkpvm5LmTORjkIsn5Y0hIAC3NBSJ66NWHmtniNL7ovxSe5DolnlNKqENEKIicxxAG ft3uyItGbyzhG6p+nZmlQBmzD6xDMVEaVmixge3jBwx8FluFd3Wjr5b3qjNcymHh35qr EfMBi9xwVhsmzvj7hrJhK0/ya1iMx7bz5+1+70t2/uzjLlsCVSoVTI8Rns2LE+/vmSlk RKZ2+BXpWcUoZRB8AqSpM+CQqqsvz4qAmJB1cC86btEgSYRp3C6s2614VKyFfEwq3p4m +WjxAw07gDsAWFPjFh9avDw3FaoEI2Qx9zBT6GlEJ4Q/j5OlrB7KdQU373XSrZPqR09q A7RQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v4si3183358plb.791.2017.12.14.06.03.11; Thu, 14 Dec 2017 06:03:11 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752607AbdLNODI (ORCPT + 20 others); Thu, 14 Dec 2017 09:03:08 -0500 Received: from foss.arm.com ([217.140.101.70]:42150 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751042AbdLNODE (ORCPT ); Thu, 14 Dec 2017 09:03:04 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id DFAEE1435; Thu, 14 Dec 2017 06:03:03 -0800 (PST) Received: from sugar.kfn.arm.com (unknown [10.45.48.196]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2A97C3F246; Thu, 14 Dec 2017 06:03:01 -0800 (PST) From: Gilad Ben-Yossef To: Greg Kroah-Hartman Cc: Ofir Drang , linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, driverdev-devel@linuxdriverproject.org, devel@driverdev.osuosl.org Subject: [PATCH 01/10] staging: ccree: drop ifdef CONFIG_OF in code Date: Thu, 14 Dec 2017 14:02:38 +0000 Message-Id: <1513260170-26346-2-git-send-email-gilad@benyossef.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1513260170-26346-1-git-send-email-gilad@benyossef.com> References: <1513260170-26346-1-git-send-email-gilad@benyossef.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As we already depend on CONFIG_OF via Kconfig no need to support conditional build without it. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_driver.c | 4 ---- 1 file changed, 4 deletions(-) -- 2.7.4 diff --git a/drivers/staging/ccree/ssi_driver.c b/drivers/staging/ccree/ssi_driver.c index 28cfbb4..fbf0338 100644 --- a/drivers/staging/ccree/ssi_driver.c +++ b/drivers/staging/ccree/ssi_driver.c @@ -512,20 +512,16 @@ static const struct dev_pm_ops arm_cc7x_driver_pm = { #define CC_DRIVER_RUNTIME_PM NULL #endif -#ifdef CONFIG_OF static const struct of_device_id arm_cc7x_dev_of_match[] = { {.compatible = "arm,cryptocell-712-ree"}, {} }; MODULE_DEVICE_TABLE(of, arm_cc7x_dev_of_match); -#endif static struct platform_driver cc7x_driver = { .driver = { .name = "cc7xree", -#ifdef CONFIG_OF .of_match_table = arm_cc7x_dev_of_match, -#endif .pm = CC_DRIVER_RUNTIME_PM, }, .probe = cc7x_probe, From patchwork Thu Dec 14 14:02:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gilad Ben-Yossef X-Patchwork-Id: 121957 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp6843933qgn; Thu, 14 Dec 2017 06:03:15 -0800 (PST) X-Google-Smtp-Source: ACJfBosxrhi5iRuj13uxh9jcf0V/uutZtWxFLT8vmt3KTaRHXCkDqEdRC0LTyk1Qo5dcDk9Hdjj3 X-Received: by 10.84.252.143 with SMTP id y15mr9844356pll.138.1513260195514; Thu, 14 Dec 2017 06:03:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513260195; cv=none; d=google.com; s=arc-20160816; b=zE/WZw0lnKijWjZt6XybyWvlcfT7B5LiRGtTwNfZPQluvKa/OpBzwb7zR/NjroEuaS UTzJNDTIbWDIg+XRE5trq5dahqHvCZeX71lktMeNYuHFbO6RUlEuyLVU/IXbm5SvVCz7 goEqF6tJch7VnKgoYKVGTWdND1zdmao3yFVcak4pp2ZhxGIslpOgfPBLTGJN2Zq7KuCS H30XshM4k2vj3Bzc6yPX0veMZVmISiiZ+pml49YOaSpgjo0DkngizNUuLYgL3h05rsi4 7T0e0eKkA5De0mW2ITKuKslYrzUQyh6v+KT2Eqbcrdb5BKaKLz5pTbG56ogy05S4u5AE 4ChQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=yHNPnfJIH6nfXAeT2ybow+unLJ75NGYvYnf0NCV55is=; b=g6S2Je0mJEeiarU3yeCGSZH8k8E/2L+d3ZSG1PAL3qakDGmk23Nu8gTXS/C1zknEqV m8fjWS7rzj+qGKpSYrARCJ7VD1HaqiLjDQ0tcxHjUs+AGBCVNOdqP8gOl27lwGQNjdiN ojYC1ZSH/WNN0N0dGGYwI+tJBlG3NnQv7fBD26Ddib6KLpHIapy47qVuvz1SCG3XU5sq 4dZndlo3GiZr7B0mHGzStPqRNghrzzYzT8AyIVud9JJxT0PFL/jtZzrK+Q2VHBPnXcxP MDECLbf2E04NxJsxAjF9XZ/cMJkzb7eQBdznenkmU9G6H+6IBohZG07GhvSwdsz4dmmY ckkg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v4si3183358plb.791.2017.12.14.06.03.15; Thu, 14 Dec 2017 06:03:15 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752653AbdLNODM (ORCPT + 20 others); Thu, 14 Dec 2017 09:03:12 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:42158 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751042AbdLNODJ (ORCPT ); Thu, 14 Dec 2017 09:03:09 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 33CB61435; Thu, 14 Dec 2017 06:03:09 -0800 (PST) Received: from sugar.kfn.arm.com (unknown [10.45.48.196]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 72C863F246; Thu, 14 Dec 2017 06:03:07 -0800 (PST) From: Gilad Ben-Yossef To: Greg Kroah-Hartman Cc: Ofir Drang , linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, driverdev-devel@linuxdriverproject.org, devel@driverdev.osuosl.org Subject: [PATCH 02/10] staging: ccree: clean up PM registration Date: Thu, 14 Dec 2017 14:02:39 +0000 Message-Id: <1513260170-26346-3-git-send-email-gilad@benyossef.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1513260170-26346-1-git-send-email-gilad@benyossef.com> References: <1513260170-26346-1-git-send-email-gilad@benyossef.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Clean up power management registration. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_driver.c | 16 +++------------- drivers/staging/ccree/ssi_pm.c | 4 ++++ drivers/staging/ccree/ssi_pm.h | 3 +++ 3 files changed, 10 insertions(+), 13 deletions(-) -- 2.7.4 diff --git a/drivers/staging/ccree/ssi_driver.c b/drivers/staging/ccree/ssi_driver.c index fbf0338..ad02d92 100644 --- a/drivers/staging/ccree/ssi_driver.c +++ b/drivers/staging/ccree/ssi_driver.c @@ -500,18 +500,6 @@ static int cc7x_remove(struct platform_device *plat_dev) return 0; } -#if defined(CONFIG_PM) -static const struct dev_pm_ops arm_cc7x_driver_pm = { - SET_RUNTIME_PM_OPS(cc_pm_suspend, cc_pm_resume, NULL) -}; -#endif - -#if defined(CONFIG_PM) -#define CC_DRIVER_RUNTIME_PM (&arm_cc7x_driver_pm) -#else -#define CC_DRIVER_RUNTIME_PM NULL -#endif - static const struct of_device_id arm_cc7x_dev_of_match[] = { {.compatible = "arm,cryptocell-712-ree"}, {} @@ -522,7 +510,9 @@ static struct platform_driver cc7x_driver = { .driver = { .name = "cc7xree", .of_match_table = arm_cc7x_dev_of_match, - .pm = CC_DRIVER_RUNTIME_PM, +#ifdef CONFIG_PM + .pm = &ccree_pm, +#endif }, .probe = cc7x_probe, .remove = cc7x_remove, diff --git a/drivers/staging/ccree/ssi_pm.c b/drivers/staging/ccree/ssi_pm.c index 3c4892b..0db935d 100644 --- a/drivers/staging/ccree/ssi_pm.c +++ b/drivers/staging/ccree/ssi_pm.c @@ -34,6 +34,10 @@ #define POWER_DOWN_ENABLE 0x01 #define POWER_DOWN_DISABLE 0x00 +const struct dev_pm_ops ccree_pm = { + SET_RUNTIME_PM_OPS(cc_pm_suspend, cc_pm_resume, NULL) +}; + int cc_pm_suspend(struct device *dev) { struct cc_drvdata *drvdata = dev_get_drvdata(dev); diff --git a/drivers/staging/ccree/ssi_pm.h b/drivers/staging/ccree/ssi_pm.h index a5f2b1b..91140a3 100644 --- a/drivers/staging/ccree/ssi_pm.h +++ b/drivers/staging/ccree/ssi_pm.h @@ -30,6 +30,9 @@ int cc_pm_init(struct cc_drvdata *drvdata); void cc_pm_fini(struct cc_drvdata *drvdata); #if defined(CONFIG_PM) + +extern const struct dev_pm_ops ccree_pm; + int cc_pm_suspend(struct device *dev); int cc_pm_resume(struct device *dev); From patchwork Thu Dec 14 14:02:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gilad Ben-Yossef X-Patchwork-Id: 121958 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp6844096qgn; Thu, 14 Dec 2017 06:03:21 -0800 (PST) X-Google-Smtp-Source: ACJfBouSdpJx6b+ZRu9iWx6bUWlR+VMFZWhOPWgNn2A4sU4Y8PBQmrlZFB55eiiRmP8i3uZG5Xn7 X-Received: by 10.98.208.67 with SMTP id p64mr9741766pfg.111.1513260201508; Thu, 14 Dec 2017 06:03:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513260201; cv=none; d=google.com; s=arc-20160816; b=iokYjYiM2EsaaWrpE+gcDcjW1DfcnuB80Jsolma3uJwOD8APrmTb1rvGDlqUmGWdm+ mLAkfGHFa8tt4cBr5ZRswgL38B9qn/zX2/fWZuvV/b3xYWZgD9Fvd29gU8+6OqE2sujz VxdC/o/zorjLb0wwEWmAHIka0lxLV8WizOjEAfGxqgKcGQR72V4WPr4x6cWLJjHx3Lfi fAXv8U9g3zz2YdS45lURI3Ellsz7j9DzlKEvmGzOOUmajRjTpQ7xASOvfSPljQUw+Fvh C6/4iVDmnvcYvAz1qGDrUuAlLLrA8WIdu5EoD7voH++0CF2GZA7iHFLh8CHc/Lm55aYq RbLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=jJ05ZIppRdbKvXlZPW4Y6tgfVqj4GRXfN2jJ1YPqLwg=; b=KDdLZOJAFNZ4Wcos9dqDG7cqse6w15f0/zsBGO131iJmO+yPse0INPh4Y0fXpFf/Hn QOmchj/R+ExKPBBaMvfDudV6TST5A12PNa7JYbSlzY0Mifa0e7fku8UeP0EEjOrS8WcR gx/sDIVAfpLlscCCL/aJkFiM208a8Gz40+ymM4FSiX8m9RSz7tDAo7KZJFZVCWNL7VN4 q3ds+s8uwT0hLfaQ17WFk7OvDE+bywQOl87GnUmISdvL4Oe6sYVDW4mmUONeKIhMzeon b2O0wTO2UkUWWcsFdvfj2xvt2XeIH9sLm0V+bAiSmruH9cK5oQeUU7wnc+Sm9Ugxqdn8 G0Ww== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x125si2932339pgb.138.2017.12.14.06.03.21; Thu, 14 Dec 2017 06:03:21 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752700AbdLNODR (ORCPT + 20 others); Thu, 14 Dec 2017 09:03:17 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:42170 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752547AbdLNODP (ORCPT ); Thu, 14 Dec 2017 09:03:15 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B8A311435; Thu, 14 Dec 2017 06:03:14 -0800 (PST) Received: from sugar.kfn.arm.com (unknown [10.45.48.196]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 069143F246; Thu, 14 Dec 2017 06:03:12 -0800 (PST) From: Gilad Ben-Yossef To: Greg Kroah-Hartman Cc: Ofir Drang , linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, driverdev-devel@linuxdriverproject.org, devel@driverdev.osuosl.org Subject: [PATCH 03/10] staging: ccree: add explicit module init/exit func Date: Thu, 14 Dec 2017 14:02:40 +0000 Message-Id: <1513260170-26346-4-git-send-email-gilad@benyossef.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1513260170-26346-1-git-send-email-gilad@benyossef.com> References: <1513260170-26346-1-git-send-email-gilad@benyossef.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We need to do a module global scope init/exit operation to support the debugfs interface we are about to introduce in the next patch, so wean the module of the boiler plate saving macro as it will no longer be sufficient. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_driver.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) -- 2.7.4 diff --git a/drivers/staging/ccree/ssi_driver.c b/drivers/staging/ccree/ssi_driver.c index ad02d92..5427c7f 100644 --- a/drivers/staging/ccree/ssi_driver.c +++ b/drivers/staging/ccree/ssi_driver.c @@ -517,7 +517,18 @@ static struct platform_driver cc7x_driver = { .probe = cc7x_probe, .remove = cc7x_remove, }; -module_platform_driver(cc7x_driver); + +static int __init ccree_init(void) +{ + return platform_driver_register(&cc7x_driver); +} +module_init(ccree_init); + +static void __exit ccree_exit(void) +{ + platform_driver_unregister(&cc7x_driver); +} +module_exit(ccree_exit); /* Module description */ MODULE_DESCRIPTION("ARM TrustZone CryptoCell REE Driver"); From patchwork Thu Dec 14 14:02:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gilad Ben-Yossef X-Patchwork-Id: 121959 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp6844387qgn; Thu, 14 Dec 2017 06:03:32 -0800 (PST) X-Google-Smtp-Source: ACJfBotRF84ivNBNFg8L0tMzqbl/xv16zxfA6hkoX9Gy8CQd5q2LzYaMTgB9oJUuaNQ+YSbWbip0 X-Received: by 10.99.126.11 with SMTP id z11mr8723796pgc.281.1513260212175; Thu, 14 Dec 2017 06:03:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513260212; cv=none; d=google.com; s=arc-20160816; b=GgVaFlHtn90KvOELs3XronmCOR6gJmWPxlAm5LEBRzPdN0dk9clA5to2BfrNtef5x4 U0qNMdvmF9X+sih1vD1Y6EUpwyaMQpbuHkdq09XJkaD8kfQb3c+s+HZxnGYYy8+91Z0l L9riOerHfpCBxkx2WXH3DotVa5UACtfEQYITPIMojYpke7zFGolliJxP4TeqqbtGy2cc 3GR/7m4sGzVjQU8NXTiPPDfqcGC+EyJV4IEx8YiE+jQ/1x84grwrHPKNEgaVi2M5mHip ExI6JyvuuWsjockRNPCmTk7juBj/jtH2cUr9uA8WQhhGydmHJ4bveOrJdMf2j4g1L0Y1 hoNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=a8LiogsHW0lb79CkuO6OBK/gSMaeBtfX8Q4GOvwbtbk=; b=jKOcJJ/jAGUzWN1OjEGKuhRegOn1UrOdIkX0nZglhkvl06z+jxlueSV2Cs5CEmEwYC 2Wt2gOezGa4NW78G1LFtcwiKHvSii4YhKKqTUzgPKsVnt3DjfK/D4dPUJSYwRCJWu6Ra jMz6FnlvIj0O4m4KVq5jwNAF5DCuBtpvttVzpX8shGhdhukxoO2nkK72gD0WnSZiwcP+ OBDgdVD7AaKmQO1haUwq3KEMNtT2UcmdGv7H3sekAwtrJSaqYQJh13QkD69ilvBvcvn1 Tb9djcQ1zB2caTJ1tdib87Y36gw8/T/5uht7EdIfpMChtwnIpHHMsRkea++k9swOtQ/5 gGtQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n17si3295613pfi.256.2017.12.14.06.03.31; Thu, 14 Dec 2017 06:03:32 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752760AbdLNOD3 (ORCPT + 20 others); Thu, 14 Dec 2017 09:03:29 -0500 Received: from foss.arm.com ([217.140.101.70]:42190 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752547AbdLNODZ (ORCPT ); Thu, 14 Dec 2017 09:03:25 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 9100E1435; Thu, 14 Dec 2017 06:03:25 -0800 (PST) Received: from sugar.kfn.arm.com (unknown [10.45.48.196]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D4FFA3F246; Thu, 14 Dec 2017 06:03:23 -0800 (PST) From: Gilad Ben-Yossef To: Greg Kroah-Hartman Cc: Ofir Drang , linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, driverdev-devel@linuxdriverproject.org, devel@driverdev.osuosl.org Subject: [PATCH 05/10] staging: ccree: remove CC_IRQ_DELAY dead code Date: Thu, 14 Dec 2017 14:02:42 +0000 Message-Id: <1513260170-26346-6-git-send-email-gilad@benyossef.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1513260170-26346-1-git-send-email-gilad@benyossef.com> References: <1513260170-26346-1-git-send-email-gilad@benyossef.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Remove dead code from older version which is not supported in current hardware. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_config.h | 1 - drivers/staging/ccree/ssi_driver.c | 11 ----------- 2 files changed, 12 deletions(-) -- 2.7.4 diff --git a/drivers/staging/ccree/ssi_config.h b/drivers/staging/ccree/ssi_config.h index 15725cc..e809103 100644 --- a/drivers/staging/ccree/ssi_config.h +++ b/drivers/staging/ccree/ssi_config.h @@ -28,7 +28,6 @@ //#define CC_DUMP_DESCS // #define CC_DUMP_BYTES // #define CC_DEBUG -//#define CC_IRQ_DELAY 100000 /* was 32 bit, but for juno's sake it was enlarged to 48 bit */ #define DMA_BIT_MASK_LEN 48 diff --git a/drivers/staging/ccree/ssi_driver.c b/drivers/staging/ccree/ssi_driver.c index 14705dc..6158794 100644 --- a/drivers/staging/ccree/ssi_driver.c +++ b/drivers/staging/ccree/ssi_driver.c @@ -171,17 +171,6 @@ int init_cc_regs(struct cc_drvdata *drvdata, bool is_probe) CC_GPR0_IRQ_MASK)); cc_iowrite(drvdata, CC_REG(HOST_IMR), val); -#ifdef CC_HOST_IRQ_TIMER_INIT_VAL_REG_OFFSET -#ifdef CC_IRQ_DELAY - /* Set CC IRQ delay */ - cc_iowrite(drvdata, CC_REG(HOST_IRQ_TIMER_INIT_VAL), CC_IRQ_DELAY); -#endif - if (cc_ioread(drvdata, CC_REG(HOST_IRQ_TIMER_INIT_VAL)) > 0) { - dev_dbg(dev, "irq_delay=%d CC cycles\n", - cc_ioread(drvdata, CC_REG(HOST_IRQ_TIMER_INIT_VAL))); - } -#endif - cache_params = (drvdata->coherent ? CC_COHERENT_CACHE_PARAMS : 0x0); val = cc_ioread(drvdata, CC_REG(AXIM_CACHE_PARAMS)); From patchwork Thu Dec 14 14:02:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gilad Ben-Yossef X-Patchwork-Id: 121960 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp6844539qgn; Thu, 14 Dec 2017 06:03:38 -0800 (PST) X-Google-Smtp-Source: ACJfBour3Zg6oQWFMUtNjrC+GV3y1kl1mosoV3NJMk4pTAGw82kKlHgI80MFOLbWg5qAhLx7BWpt X-Received: by 10.101.90.199 with SMTP id d7mr8503209pgt.265.1513260218031; Thu, 14 Dec 2017 06:03:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513260218; cv=none; d=google.com; s=arc-20160816; b=PZ03T821q1eJA6t6firBO034RZtfWhDswIrYsESdCJo2PqokTpa2AU5npHZnhWjuOc I6FWQFGZycA8QfsEJgzQdDIzYbNLf0DsMh1Wb4zV7z02K7YJLoK3kqVbjdnK6izAztQE IjUeP09f356gz8glGQgrIRR43ApwpAfkqyjaG7ouqB75W70uzd/nXagpjRrVbrtnmxkl zUTU0ow0WwDdm2L1smRjLW7BnC1Ls2kO2AarjOK7SyZzdztm0aiBX3pqSkWdH4OFgpPK g19/giJ9YPLM2fm6J9GOr7LB4fJaISWP009+53haNSY9zzd05iLv1f/3gVZD8IZ54fPe 2Uaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=jMqWUWLB+gr6pWmM2ogU3C+K9FR8w7+k3zhdv64N+uk=; b=GIEezx7NAElwrJ6RU+A1AZxlY0PmigeM3Gr3/u49ZpIFsP3kIfY7dL3V0qPZelVz+L jz9OLdhixq+Q0QxQKMKcQsXY6RN65PT4CZ7u6HL+1Ioh/NMfLRmokZHMrMzwZ4/NrQw4 6XzVUS4XZE2QvFxUPaS1p/t6BHL9Y5CnjM4aNPHEZG0RTjacQIZ5kCXuaWqsvkE6soem poJ2W3og4GIPOTCk8Xn0Pw8f9W9wx+FVAlt0xUe7xoIsmU4BgUcHgybzylMdr66VntSG NfLJgOp/+T3ZhpPB0h+k9qB5EKooRoYq5m+Ft04zJKoG1KzbRX0FWNg9go6i6BQbvpo/ 50fw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r1si2928886pgp.308.2017.12.14.06.03.37; Thu, 14 Dec 2017 06:03:38 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752888AbdLNODe (ORCPT + 20 others); Thu, 14 Dec 2017 09:03:34 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:42198 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752547AbdLNODa (ORCPT ); Thu, 14 Dec 2017 09:03:30 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 849351435; Thu, 14 Dec 2017 06:03:30 -0800 (PST) Received: from sugar.kfn.arm.com (unknown [10.45.48.196]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C277F3F246; Thu, 14 Dec 2017 06:03:28 -0800 (PST) From: Gilad Ben-Yossef To: Greg Kroah-Hartman Cc: Ofir Drang , linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, driverdev-devel@linuxdriverproject.org, devel@driverdev.osuosl.org Subject: [PATCH 06/10] staging: ccree: remove useless debug code Date: Thu, 14 Dec 2017 14:02:43 +0000 Message-Id: <1513260170-26346-7-git-send-email-gilad@benyossef.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1513260170-26346-1-git-send-email-gilad@benyossef.com> References: <1513260170-26346-1-git-send-email-gilad@benyossef.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Remove a bunch of useless debug code ifdef'ed out Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_aead.c | 45 --------------------------------- drivers/staging/ccree/ssi_config.h | 3 --- drivers/staging/ccree/ssi_driver.c | 13 ---------- drivers/staging/ccree/ssi_request_mgr.c | 23 ----------------- 4 files changed, 84 deletions(-) -- 2.7.4 diff --git a/drivers/staging/ccree/ssi_aead.c b/drivers/staging/ccree/ssi_aead.c index dde6797..ce26e68 100644 --- a/drivers/staging/ccree/ssi_aead.c +++ b/drivers/staging/ccree/ssi_aead.c @@ -1834,51 +1834,6 @@ static int cc_gcm(struct aead_request *req, struct cc_hw_desc desc[], return 0; } -#ifdef CC_DEBUG -static void cc_dump_gcm(const char *title, struct aead_request *req) -{ - struct crypto_aead *tfm = crypto_aead_reqtfm(req); - struct cc_aead_ctx *ctx = crypto_aead_ctx(tfm); - struct aead_req_ctx *req_ctx = aead_request_ctx(req); - - if (ctx->cipher_mode != DRV_CIPHER_GCTR) - return; - - if (title) { - dev_dbg(dev, "----------------------------------------------------------------------------------"); - dev_dbg(dev, "%s\n", title); - } - - dev_dbg(dev, "cipher_mode %d, authsize %d, enc_keylen %d, assoclen %d, cryptlen %d\n", - ctx->cipher_mode, ctx->authsize, ctx->enc_keylen, - req->assoclen, req_ctx->cryptlen); - - if (ctx->enckey) - dump_byte_array("mac key", ctx->enckey, 16); - - dump_byte_array("req->iv", req->iv, AES_BLOCK_SIZE); - - dump_byte_array("gcm_iv_inc1", req_ctx->gcm_iv_inc1, AES_BLOCK_SIZE); - - dump_byte_array("gcm_iv_inc2", req_ctx->gcm_iv_inc2, AES_BLOCK_SIZE); - - dump_byte_array("hkey", req_ctx->hkey, AES_BLOCK_SIZE); - - dump_byte_array("mac_buf", req_ctx->mac_buf, AES_BLOCK_SIZE); - - dump_byte_array("gcm_len_block", req_ctx->gcm_len_block.len_a, - AES_BLOCK_SIZE); - - if (req->src && req->cryptlen) - dump_byte_array("req->src", sg_virt(req->src), - req->cryptlen + req->assoclen); - - if (req->dst) - dump_byte_array("req->dst", sg_virt(req->dst), - req->cryptlen + ctx->authsize + req->assoclen); -} -#endif - static int config_gcm_context(struct aead_request *req) { struct crypto_aead *tfm = crypto_aead_reqtfm(req); diff --git a/drivers/staging/ccree/ssi_config.h b/drivers/staging/ccree/ssi_config.h index e809103..b530974 100644 --- a/drivers/staging/ccree/ssi_config.h +++ b/drivers/staging/ccree/ssi_config.h @@ -23,11 +23,8 @@ #include -//#define FLUSH_CACHE_ALL -//#define COMPLETION_DELAY //#define CC_DUMP_DESCS // #define CC_DUMP_BYTES -// #define CC_DEBUG /* was 32 bit, but for juno's sake it was enlarged to 48 bit */ #define DMA_BIT_MASK_LEN 48 diff --git a/drivers/staging/ccree/ssi_driver.c b/drivers/staging/ccree/ssi_driver.c index 6158794..dbca241 100644 --- a/drivers/staging/ccree/ssi_driver.c +++ b/drivers/staging/ccree/ssi_driver.c @@ -446,19 +446,6 @@ static int cc7x_probe(struct platform_device *plat_dev) { int rc; struct device *dev = &plat_dev->dev; -#if defined(CONFIG_ARM) && defined(CC_DEBUG) - u32 ctr, cacheline_size; - - asm volatile("mrc p15, 0, %0, c0, c0, 1" : "=r" (ctr)); - cacheline_size = 4 << ((ctr >> 16) & 0xf); - dev_dbg(dev, "CP15(L1_CACHE_BYTES) = %u , Kconfig(L1_CACHE_BYTES) = %u\n", - cacheline_size, L1_CACHE_BYTES); - - asm volatile("mrc p15, 0, %0, c0, c0, 0" : "=r" (ctr)); - dev_dbg(dev, "Main ID register (MIDR): Implementer 0x%02X, Arch 0x%01X, Part 0x%03X, Rev r%dp%d\n", - (ctr >> 24), (ctr >> 16) & 0xF, (ctr >> 4) & 0xFFF, - (ctr >> 20) & 0xF, ctr & 0xF); -#endif /* Map registers space */ rc = init_cc_resources(plat_dev); diff --git a/drivers/staging/ccree/ssi_request_mgr.c b/drivers/staging/ccree/ssi_request_mgr.c index 07b9404..f6374b0 100644 --- a/drivers/staging/ccree/ssi_request_mgr.c +++ b/drivers/staging/ccree/ssi_request_mgr.c @@ -20,9 +20,6 @@ #include #include #include -#ifdef FLUSH_CACHE_ALL -#include -#endif #include #include "ssi_driver.h" #include "ssi_buffer_mgr.h" @@ -359,9 +356,6 @@ int send_request(struct cc_drvdata *drvdata, struct cc_crypto_req *cc_req, dev_dbg(dev, "Enqueue request head=%u\n", req_mgr_h->req_queue_head); -#ifdef FLUSH_CACHE_ALL - flush_cache_all(); -#endif /* * We are about to push command to the HW via the command registers * that may refernece hsot memory. We need to issue a memory barrier @@ -493,23 +487,6 @@ static void proc_completions(struct cc_drvdata *drvdata) cc_req = &request_mgr_handle->req_queue[*tail]; -#ifdef FLUSH_CACHE_ALL - flush_cache_all(); -#endif - -#ifdef COMPLETION_DELAY - /* Delay */ - { - u32 axi_err; - int i; - - dev_info(dev, "Delay\n"); - for (i = 0; i < 1000000; i++) - axi_err = cc_ioread(drvdata, - CC_REG(AXIM_MON_ERR)); - } -#endif /* COMPLETION_DELAY */ - if (cc_req->user_cb) cc_req->user_cb(dev, cc_req->user_arg); *tail = (*tail + 1) & (MAX_REQUEST_QUEUE_SIZE - 1); From patchwork Thu Dec 14 14:02:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gilad Ben-Yossef X-Patchwork-Id: 121962 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp6844879qgn; Thu, 14 Dec 2017 06:03:50 -0800 (PST) X-Google-Smtp-Source: ACJfBotRkmggvUh2LOi0xfhuN4l9KJd6xog/Cu53XafY7qS05GwYah2gyggaL9Bbha2V3hfd0Glo X-Received: by 10.101.100.24 with SMTP id a24mr8804229pgv.239.1513260229916; Thu, 14 Dec 2017 06:03:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513260229; cv=none; d=google.com; s=arc-20160816; b=QrBmgLsJAU3RdyZHYo5T3/HrfGtR0WrOnxTV9jKpsLCCk4Wts5LeCEgH6KMygnntm/ 9qHJgj7ucxGJg8XXn2oszPYEB6B443sjOkm8K00L3pcQbm1knqTw9YezlwWaV9t+0MMi r4Q39xnWE9jHaLujfNwhAAdkNZKyB2/Oedy/KbbMzPy8bQnzxVme8xmTIDcOHl4dSReA Umw2KcKkdhImks86EzLLFITQEaTVpGmc68h+USPUEWXVTYXwAj+wBBZtyeMyQnKqhI7N QHe/URjhBYj2d9h0JhVuZopUiG64QiWb3QWnxGEUJeSIbyYhUMyYKmgwUBE+QGVV/BNt fkHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=iGRFGl5sRPQx7tQ7pef0OpQk9CVz/+iKkL8VXJD8If8=; b=SXdwvISQrFniOSJf1Y1ZxRaeH7YDAb6GJgYhrsrszTZSCt/cDk2NjqCFxBm79tFxB9 OtPgk3P9e+96Zb67ZAzqpolQGlu8r6hD0QjfTHPSz3AZvhGaPrT2n15Qz6MO2bgydJzr k1RIRG4Iwtj3BgIJBviDUxL6c0LfPbMocnW7SFij0e6j2kmWLPGqHNQQJXWzFRecogiu M2TVk4PbH7jM+T56j4YhSDdY9IpH4Nzw+h9XMXsWHopmh5EOK+mgS7w4H69uVh0MnijY msacSdfltpMM3oU34+4zQUibN0GpnHMB2wQmnAUbKIgjyPFLiVSIZ4L7LcQttEzgQ6O8 YlRA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m63si3203934pld.467.2017.12.14.06.03.49; Thu, 14 Dec 2017 06:03:49 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753026AbdLNODo (ORCPT + 20 others); Thu, 14 Dec 2017 09:03:44 -0500 Received: from foss.arm.com ([217.140.101.70]:42218 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752986AbdLNODk (ORCPT ); Thu, 14 Dec 2017 09:03:40 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 7FAA01435; Thu, 14 Dec 2017 06:03:40 -0800 (PST) Received: from sugar.kfn.arm.com (unknown [10.45.48.196]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id BBFF33F246; Thu, 14 Dec 2017 06:03:38 -0800 (PST) From: Gilad Ben-Yossef To: Greg Kroah-Hartman Cc: Ofir Drang , linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, driverdev-devel@linuxdriverproject.org, devel@driverdev.osuosl.org Subject: [PATCH 08/10] staging: ccree: remove ssi_config.h Date: Thu, 14 Dec 2017 14:02:45 +0000 Message-Id: <1513260170-26346-9-git-send-email-gilad@benyossef.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1513260170-26346-1-git-send-email-gilad@benyossef.com> References: <1513260170-26346-1-git-send-email-gilad@benyossef.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Now that the only thing left in ssi_config is the maximum DMA mask length we get move that to ssi_driver.h and get rid of the file. All of ccree is now runtime configurable or under Kbuild control. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/cc_debugfs.c | 1 - drivers/staging/ccree/ssi_aead.c | 1 - drivers/staging/ccree/ssi_buffer_mgr.h | 1 - drivers/staging/ccree/ssi_cipher.c | 1 - drivers/staging/ccree/ssi_config.h | 30 ------------------------------ drivers/staging/ccree/ssi_driver.c | 1 - drivers/staging/ccree/ssi_driver.h | 4 +++- drivers/staging/ccree/ssi_fips.c | 1 - drivers/staging/ccree/ssi_hash.c | 1 - drivers/staging/ccree/ssi_ivgen.c | 1 - drivers/staging/ccree/ssi_pm.c | 1 - drivers/staging/ccree/ssi_pm.h | 1 - drivers/staging/ccree/ssi_request_mgr.c | 1 - 13 files changed, 3 insertions(+), 42 deletions(-) delete mode 100644 drivers/staging/ccree/ssi_config.h -- 2.7.4 diff --git a/drivers/staging/ccree/cc_debugfs.c b/drivers/staging/ccree/cc_debugfs.c index 7768a7b..7cd33957 100644 --- a/drivers/staging/ccree/cc_debugfs.c +++ b/drivers/staging/ccree/cc_debugfs.c @@ -17,7 +17,6 @@ #include #include #include -#include "ssi_config.h" #include "ssi_driver.h" #include "cc_crypto_ctx.h" diff --git a/drivers/staging/ccree/ssi_aead.c b/drivers/staging/ccree/ssi_aead.c index ce26e68..1522b00 100644 --- a/drivers/staging/ccree/ssi_aead.c +++ b/drivers/staging/ccree/ssi_aead.c @@ -28,7 +28,6 @@ #include #include #include -#include "ssi_config.h" #include "ssi_driver.h" #include "ssi_buffer_mgr.h" #include "ssi_aead.h" diff --git a/drivers/staging/ccree/ssi_buffer_mgr.h b/drivers/staging/ccree/ssi_buffer_mgr.h index da43354..395c93f 100644 --- a/drivers/staging/ccree/ssi_buffer_mgr.h +++ b/drivers/staging/ccree/ssi_buffer_mgr.h @@ -23,7 +23,6 @@ #include -#include "ssi_config.h" #include "ssi_driver.h" enum cc_req_dma_buf_type { diff --git a/drivers/staging/ccree/ssi_cipher.c b/drivers/staging/ccree/ssi_cipher.c index f940568..86800a7 100644 --- a/drivers/staging/ccree/ssi_cipher.c +++ b/drivers/staging/ccree/ssi_cipher.c @@ -26,7 +26,6 @@ #include #include -#include "ssi_config.h" #include "ssi_driver.h" #include "cc_lli_defs.h" #include "ssi_buffer_mgr.h" diff --git a/drivers/staging/ccree/ssi_config.h b/drivers/staging/ccree/ssi_config.h deleted file mode 100644 index bc90ad0..0000000 --- a/drivers/staging/ccree/ssi_config.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2012-2017 ARM Limited or its affiliates. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, see . - */ - -/* \file ssi_config.h - * Definitions for ARM CryptoCell Linux Crypto Driver - */ - -#ifndef __CC_CONFIG_H__ -#define __CC_CONFIG_H__ - -#include - -/* was 32 bit, but for juno's sake it was enlarged to 48 bit */ -#define DMA_BIT_MASK_LEN 48 - -#endif /*__CC_CONFIG_H__*/ - diff --git a/drivers/staging/ccree/ssi_driver.c b/drivers/staging/ccree/ssi_driver.c index 195fb27..df6d415 100644 --- a/drivers/staging/ccree/ssi_driver.c +++ b/drivers/staging/ccree/ssi_driver.c @@ -59,7 +59,6 @@ #include #include -#include "ssi_config.h" #include "ssi_driver.h" #include "ssi_request_mgr.h" #include "ssi_buffer_mgr.h" diff --git a/drivers/staging/ccree/ssi_driver.h b/drivers/staging/ccree/ssi_driver.h index 12e2a8b..5a56f7a 100644 --- a/drivers/staging/ccree/ssi_driver.h +++ b/drivers/staging/ccree/ssi_driver.h @@ -21,7 +21,6 @@ #ifndef __CC_DRIVER_H__ #define __CC_DRIVER_H__ -#include "ssi_config.h" #ifdef COMP_IN_WQ #include #else @@ -56,6 +55,9 @@ extern bool cc_dump_bytes; #define CC_DEV_NAME_STR "cc715ree" #define CC_COHERENT_CACHE_PARAMS 0xEEE +/* Maximum DMA mask supported by IP */ +#define DMA_BIT_MASK_LEN 48 + #define CC_AXI_IRQ_MASK ((1 << CC_AXIM_CFG_BRESPMASK_BIT_SHIFT) | \ (1 << CC_AXIM_CFG_RRESPMASK_BIT_SHIFT) | \ (1 << CC_AXIM_CFG_INFLTMASK_BIT_SHIFT) | \ diff --git a/drivers/staging/ccree/ssi_fips.c b/drivers/staging/ccree/ssi_fips.c index a1d7782..9ca6857 100644 --- a/drivers/staging/ccree/ssi_fips.c +++ b/drivers/staging/ccree/ssi_fips.c @@ -17,7 +17,6 @@ #include #include -#include "ssi_config.h" #include "ssi_driver.h" #include "ssi_fips.h" diff --git a/drivers/staging/ccree/ssi_hash.c b/drivers/staging/ccree/ssi_hash.c index 0aea404..7f3c22f 100644 --- a/drivers/staging/ccree/ssi_hash.c +++ b/drivers/staging/ccree/ssi_hash.c @@ -23,7 +23,6 @@ #include #include -#include "ssi_config.h" #include "ssi_driver.h" #include "ssi_request_mgr.h" #include "ssi_buffer_mgr.h" diff --git a/drivers/staging/ccree/ssi_ivgen.c b/drivers/staging/ccree/ssi_ivgen.c index 0303c85..d1b8ce0 100644 --- a/drivers/staging/ccree/ssi_ivgen.c +++ b/drivers/staging/ccree/ssi_ivgen.c @@ -16,7 +16,6 @@ #include #include -#include "ssi_config.h" #include "ssi_driver.h" #include "ssi_ivgen.h" #include "ssi_request_mgr.h" diff --git a/drivers/staging/ccree/ssi_pm.c b/drivers/staging/ccree/ssi_pm.c index abc715e..5b80b59 100644 --- a/drivers/staging/ccree/ssi_pm.c +++ b/drivers/staging/ccree/ssi_pm.c @@ -14,7 +14,6 @@ * along with this program; if not, see . */ -#include "ssi_config.h" #include #include #include diff --git a/drivers/staging/ccree/ssi_pm.h b/drivers/staging/ccree/ssi_pm.h index 91140a3..1f601bd 100644 --- a/drivers/staging/ccree/ssi_pm.h +++ b/drivers/staging/ccree/ssi_pm.h @@ -20,7 +20,6 @@ #ifndef __CC_POWER_MGR_H__ #define __CC_POWER_MGR_H__ -#include "ssi_config.h" #include "ssi_driver.h" #define CC_SUSPEND_TIMEOUT 3000 diff --git a/drivers/staging/ccree/ssi_request_mgr.c b/drivers/staging/ccree/ssi_request_mgr.c index 2aa21f8..c57c588 100644 --- a/drivers/staging/ccree/ssi_request_mgr.c +++ b/drivers/staging/ccree/ssi_request_mgr.c @@ -14,7 +14,6 @@ * along with this program; if not, see . */ -#include "ssi_config.h" #include #include #include From patchwork Thu Dec 14 14:02:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gilad Ben-Yossef X-Patchwork-Id: 121964 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp6846140qgn; Thu, 14 Dec 2017 06:04:36 -0800 (PST) X-Google-Smtp-Source: ACJfBouTOETelml8Gv9NPHYknDsdStw5F4AMLkG0X1KF8JQIq99p3f6aaCtmflVVSBCJfn21gkVC X-Received: by 10.98.28.5 with SMTP id c5mr9638673pfc.154.1513260276449; Thu, 14 Dec 2017 06:04:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513260276; cv=none; d=google.com; s=arc-20160816; b=a0UqIMpmWmzj0hpe/HdCP2XEHMnUpeQlnbFjUW1kR6zFA/eVrtMeh+6t8suApJkfhZ vWz7ZnghJx3yEPttDv2siqzv3xbtkLQgotkgbpTt5DFnOXiaMrFBICmUOjs+wlHapmjB LYK7U4Epk3vPJeKzvNHy2tR9rKe7bRW3r1Q0FuiX+BitwexnWSJzwLpr5wmGqr2KXMm0 e7QELvRQ67HMBQePpNLWioNADjmNQYIIA/g2x/VKBV9sIsN9HS6zH/5sg7zK+6jUCv+R RFt11U12HYMWN5kSEZ5SztzD2g349vgCdTnFYfTxYP1KAXHBGgiVnWu2YT5dkxgi5HDe Z/KQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=xkPrFK/EO/+2f2yylc846PSvk4MuOsBlrrapaAeAtXI=; b=sQtEEaR10vh4kZ9wa/vQ7cIlEVIWLBClcvAePgsRQtD5MeDX75umh3DA1KPeNBWMjS s6lBjMOnheFVJIRPSLZKVmBbNT2hu5khoND9BB4YBRLjakOxnd0kYchs8gAfBY9VKlL4 d24QAy0PqhbTbX2kxvjvbKMcky/84I8iejGz+TaT0dJlmSgK+OwhKmcN50hdJmPJQ9d5 aCiQ/NQ8tcyQ1UpAJPw78RsP/fRFOL+9RyGP/m/0RCNfobYlp6gGBONbwimIuAXIuqrU gTG0SRoUZgy0sOlK+ou3l6LLKtn9dWlhNS2GD13VEiao/16zRoG+n3GBazKhsytL6jNA Z0fQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t27si2951488pgn.539.2017.12.14.06.04.35; Thu, 14 Dec 2017 06:04:36 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752498AbdLNOEc (ORCPT + 20 others); Thu, 14 Dec 2017 09:04:32 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:42230 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753050AbdLNODq (ORCPT ); Thu, 14 Dec 2017 09:03:46 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C75BF1435; Thu, 14 Dec 2017 06:03:45 -0800 (PST) Received: from sugar.kfn.arm.com (unknown [10.45.48.196]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id CB91B3F246; Thu, 14 Dec 2017 06:03:43 -0800 (PST) From: Gilad Ben-Yossef To: Greg Kroah-Hartman Cc: Ofir Drang , stable@vger.kernel.org, linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, driverdev-devel@linuxdriverproject.org, devel@driverdev.osuosl.org Subject: [PATCH 09/10] staging: ccree: fix fips event irq handling build Date: Thu, 14 Dec 2017 14:02:46 +0000 Message-Id: <1513260170-26346-10-git-send-email-gilad@benyossef.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1513260170-26346-1-git-send-email-gilad@benyossef.com> References: <1513260170-26346-1-git-send-email-gilad@benyossef.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When moving from internal for kernel FIPS infrastructure the FIPS event irq handling code was left with the old ifdef by mistake. Fix it. Fixes: b7e607bf33a2 ("staging: ccree: move FIPS support to kernel infrastructure") Cc: stable@vger.kernel.org Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4 diff --git a/drivers/staging/ccree/ssi_driver.c b/drivers/staging/ccree/ssi_driver.c index df6d415..56b5d45 100644 --- a/drivers/staging/ccree/ssi_driver.c +++ b/drivers/staging/ccree/ssi_driver.c @@ -123,7 +123,7 @@ static irqreturn_t cc_isr(int irq, void *dev_id) irr &= ~CC_COMP_IRQ_MASK; complete_request(drvdata); } -#ifdef CC_SUPPORT_FIPS +#ifdef CONFIG_CRYPTO_FIPS /* TEE FIPS interrupt */ if (irr & CC_GPR0_IRQ_MASK) { /* Mask interrupt - will be unmasked in Deferred service