From patchwork Mon Jan 1 12:06:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gilad Ben-Yossef X-Patchwork-Id: 123034 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp7794984qgn; Mon, 1 Jan 2018 04:07:50 -0800 (PST) X-Google-Smtp-Source: ACJfBos/QTVBJi4z3ISrwmvTTGclwrE9xTLjEhwzOE1LWrVk2efZb8IlIQhs5dJ0wYmNlJCBoplO X-Received: by 10.98.189.17 with SMTP id a17mr41971232pff.97.1514808470251; Mon, 01 Jan 2018 04:07:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1514808470; cv=none; d=google.com; s=arc-20160816; b=P9wUCiu81zLgb1UiQ+gkr29Bjer3iec19rZ7MOwMBv5dBB+9P/KfmchA2V0S5HYHgu OsufTRptR0GZDJDnPw3EFUCw56nh/x75aRNIQ2EZ3RGUoeypxqjmH+2KZtP5GhkWjobu UDW8+oOXEXz0Gputlr0MaCzC4pXVxb/5eSYZUa2ySSASISZPDpgsBlDv7j8OLWbH1tDt e0VzxhedXyC5rCoKNUiaN9XmCrrbodPYYPuk8IGDmV0ycPJp+iiBJNiB2MK7BW0GvGCJ FiF0g4j1O58CcuI5zQFQv/9TnUHLqKuRxLt3LgCoexbIlx+GuSrcno2uMGD+ACRmOhPR xt+A== 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=I3YKRngtJumcybbflEv+IPe9jgM506GpeVUCpl+NIIs=; b=jHVztT/jCFLHp1BmH6ZvR0kdczSP9OyYQXhWKm/vf0e0f7V1WYIhYx2bD/DliEJTtE 8M5dsHidSPKMyiuvI9+C6SnJAazHQjydE8Oaoi35PrveWJtz/LaAkjhzSavz+hkl0iuU I20JoNtdHzoedf8hUbNyB2yxjbJXVgacCPU7z7d7T9ExBnXzONd93JKxfwPVsDkLBc4i 3tq+EuIH9qiGOt5jaupsx/iQv2WYC3u8j4VMEEYlJLH4sI8Y1iM2w3sbyxVLlSl47FZh TOTdx1pB2R0arSBlp2359irrrbrVyWkDXit3Vf9EyTxganTtAm3idUtCOpcLbBJN/osk 4uaA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-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 d62si29039204pgc.703.2018.01.01.04.07.50; Mon, 01 Jan 2018 04:07:50 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-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-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751326AbeAAMHq (ORCPT + 1 other); Mon, 1 Jan 2018 07:07:46 -0500 Received: from foss.arm.com ([217.140.101.70]:59050 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750819AbeAAMHp (ORCPT ); Mon, 1 Jan 2018 07:07:45 -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 D87FD80D; Mon, 1 Jan 2018 04:07:44 -0800 (PST) Received: from sugar.kfn.arm.com (unknown [10.45.48.158]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 363F53F41F; Mon, 1 Jan 2018 04:07:42 -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/26] staging: ccree: fold reg common defines into driver Date: Mon, 1 Jan 2018 12:06:30 +0000 Message-Id: <1514808421-21993-4-git-send-email-gilad@benyossef.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1514808421-21993-1-git-send-email-gilad@benyossef.com> References: <1514808421-21993-1-git-send-email-gilad@benyossef.com> Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Fold the 2 macro defined in dx_reg_common.h into the file they are used in and delete the file. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/cc_crypto_ctx.h | 4 ++-- drivers/staging/ccree/dx_reg_common.h | 13 ------------- drivers/staging/ccree/ssi_driver.h | 5 +++-- 3 files changed, 5 insertions(+), 17 deletions(-) delete mode 100644 drivers/staging/ccree/dx_reg_common.h -- 2.7.4 diff --git a/drivers/staging/ccree/cc_crypto_ctx.h b/drivers/staging/ccree/cc_crypto_ctx.h index e556177..396829e 100644 --- a/drivers/staging/ccree/cc_crypto_ctx.h +++ b/drivers/staging/ccree/cc_crypto_ctx.h @@ -8,7 +8,7 @@ /* context size */ #ifndef CC_CTX_SIZE_LOG2 -#if (CC_SUPPORT_SHA > 256) +#if (CC_DEV_SHA_MAX > 256) #define CC_CTX_SIZE_LOG2 8 #else #define CC_CTX_SIZE_LOG2 7 @@ -59,7 +59,7 @@ #define CC_SHA384_BLOCK_SIZE 128 #define CC_SHA512_BLOCK_SIZE 128 -#if (CC_SUPPORT_SHA > 256) +#if (CC_DEV_SHA_MAX > 256) #define CC_DIGEST_SIZE_MAX CC_SHA512_DIGEST_SIZE #define CC_HASH_BLOCK_SIZE_MAX CC_SHA512_BLOCK_SIZE /*1024b*/ #else /* Only up to SHA256 */ diff --git a/drivers/staging/ccree/dx_reg_common.h b/drivers/staging/ccree/dx_reg_common.h deleted file mode 100644 index 6898bf3..0000000 --- a/drivers/staging/ccree/dx_reg_common.h +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -// Copyright (C) 2012-2017 ARM Limited or its affiliates. - -#ifndef __CC_REG_COMMON_H__ -#define __CC_REG_COMMON_H__ - -#define CC_DEV_SIGNATURE 0xDCC71200UL - -#define CC_HW_VERSION 0xef840015UL - -#define CC_DEV_SHA_MAX 512 - -#endif /*__CC_REG_COMMON_H__*/ diff --git a/drivers/staging/ccree/ssi_driver.h b/drivers/staging/ccree/ssi_driver.h index bf3aec8..fae070c 100644 --- a/drivers/staging/ccree/ssi_driver.h +++ b/drivers/staging/ccree/ssi_driver.h @@ -27,8 +27,7 @@ /* Registers definitions from shared/hw/ree_include */ #include "dx_host.h" -#include "dx_reg_common.h" -#define CC_SUPPORT_SHA CC_DEV_SHA_MAX +#define CC_DEV_SHA_MAX 512 #include "cc_crypto_ctx.h" #include "cc_hw_queue_defs.h" #include "ssi_sram_mgr.h" @@ -44,6 +43,8 @@ extern bool cc_dump_bytes; /* Maximum DMA mask supported by IP */ #define DMA_BIT_MASK_LEN 48 +#define CC_DEV_SIGNATURE 0xDCC71200UL + #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) | \