Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751339AbeAAMHr (ORCPT + 1 other); Mon, 1 Jan 2018 07:07:47 -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 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-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: 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 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) | \ -- 2.7.4