Received: by 2002:ab2:7407:0:b0:1f4:b336:87c4 with SMTP id e7csp206811lqn; Thu, 11 Apr 2024 20:54:30 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWWS030wFmviVvcAlwtFZJaX4+eAGV/CkoH2UrfE7sdA359/0a4X7nLRu7BOsF20f0HJcEZxOvJjSpfQdMVWk+ciz+q7Qqj4ndz4WyBAQ== X-Google-Smtp-Source: AGHT+IHBr5MyELBhE3c2Eg7SQ07V0W+w1TGe+Q23D8hUlPw31oCblm+UGExs9gXq8p9B/lgrLqzr X-Received: by 2002:a05:6358:7c13:b0:181:6575:1b22 with SMTP id p19-20020a0563587c1300b0018165751b22mr1402364rwf.6.1712894070470; Thu, 11 Apr 2024 20:54:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712894070; cv=pass; d=google.com; s=arc-20160816; b=CYPrYML0irCZCvfchNIDCgPRjS5bjrbXslyblHdOGJCxlg0UtVLTQaMrzdLkGLT6Oz z6E8lEOasv6+pHWgV25kKSWZkzi6JK8R2+swewUbk4DraFWYK1UP3DqOPuJjuyKCAVXE P5ISZZtplAXqzO+uM20sTvRPbDcWxZ/fCx+K1pnHcVQJRrJO9nxFfuTsFMElMM909pOi vDoEUF3fxPAWnD8gYA2bS0E0132b4yvODne0uPs4AVD05WK5RRsNXZqSRrE4F9XG7sWb NirmtxButefndEpVdi3WAX58WYB4+TbJ2kJiwO5024YBkXZkVrh1U/NO30Ndmcv6Wk5o vTYw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=jNuc47l/d9O88OpjU0ua7A2FwM7g1KOoLnm2sfcPXYE=; fh=ZR5ufyR/khE6MCgXY+HTwTbSRvqmC9onsLeBO5RFmgE=; b=ElfsVMyiJ+gYoGb4ABVfXiijbFgWUaJRW1WDwiYkHhMCiZ2V/MxlaFw/5wCry5Vi3m Q8TbKU7Rf1c3zCbxRxilopqEccSg1qOG/tVDc2YpSzI6BUwZUMxhTH2jh3SI71Lfd9RJ /5FO2w1iBGIoD/8UiAixTME4f6yEq1DnlQthjiAJmMkZPKko6USAop6sWxiX+Qez84Fq HvhkodNYxoX0XI0CjIwEjAShcBSMAupeutEXkDx7nIDTSpC1kEUm7m6fDqsSa7p6cV4y +ktAioQvh+xhqbKLK+KGps8uO/ZzbRop26hwyoCLlGPG7rKVOBGuhg7ZJuPuX57H3uqY C+XQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vayavyalabs.com header.s=google header.b=geZMEzvY; arc=pass (i=1 spf=pass spfdomain=vayavyalabs.com dkim=pass dkdomain=vayavyalabs.com dmarc=pass fromdomain=vayavyalabs.com); spf=pass (google.com: domain of linux-crypto+bounces-3491-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-crypto+bounces-3491-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=vayavyalabs.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id l15-20020a170903120f00b001e3cd8839ddsi2452698plh.273.2024.04.11.20.54.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 20:54:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto+bounces-3491-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@vayavyalabs.com header.s=google header.b=geZMEzvY; arc=pass (i=1 spf=pass spfdomain=vayavyalabs.com dkim=pass dkdomain=vayavyalabs.com dmarc=pass fromdomain=vayavyalabs.com); spf=pass (google.com: domain of linux-crypto+bounces-3491-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-crypto+bounces-3491-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=vayavyalabs.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 76FCDB215BE for ; Fri, 12 Apr 2024 03:54:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9155C17BC2; Fri, 12 Apr 2024 03:54:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=vayavyalabs.com header.i=@vayavyalabs.com header.b="geZMEzvY" X-Original-To: linux-crypto@vger.kernel.org Received: from mail-ot1-f46.google.com (mail-ot1-f46.google.com [209.85.210.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AFBB517BA9 for ; Fri, 12 Apr 2024 03:54:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712894062; cv=none; b=Ofa5JpG+Lrjk/36hPwaCVEaNBh6ruVpldH1hHduaV5SdUBs8ZTDVcMZqtUUVST47oKCMb0Xs/HnvA9Ztz3qlhmF5gICaYKT30je3ZeP0Bs617LgFh/LBmx0Pql9bPC5w4Pch6vJk6JTbK23ZKbWxsjHKU8Q62KGqZ7C+cy73e3o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712894062; c=relaxed/simple; bh=9eL7I3HhFKM+kKnUHr40pjdpRnTJwCII4Al/7eM5WwI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=adI47zNGaqmWTMNoSEDP9sB/y56L4W8pnJAtB0FbNsVkNX5W/irV19acdFTVm07BkwVhSv7udcrXVfT7x6ntXqSHy9i3BQ+p+SOcNyNxc9Sm8fN70DDBI1ZMSch5cZmWrMnn+a8g7Y59rLhffErec9y5EsUzFO/FBvAbhlFzaSc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=vayavyalabs.com; spf=pass smtp.mailfrom=vayavyalabs.com; dkim=pass (1024-bit key) header.d=vayavyalabs.com header.i=@vayavyalabs.com header.b=geZMEzvY; arc=none smtp.client-ip=209.85.210.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=vayavyalabs.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=vayavyalabs.com Received: by mail-ot1-f46.google.com with SMTP id 46e09a7af769-6ea163eb437so344167a34.2 for ; Thu, 11 Apr 2024 20:54:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vayavyalabs.com; s=google; t=1712894060; x=1713498860; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=jNuc47l/d9O88OpjU0ua7A2FwM7g1KOoLnm2sfcPXYE=; b=geZMEzvYlXB0UvnqvspLGvc7hSU/a0JI1plmjszHTWSVJRNr3GL2OJCwZM9Ce3meRY okLcVhtIGDVIUAM46E/Als0oRjruUiFi4rj5CmW8sn/qwA0FoYF52nwISF5Jee0O/R1E s8HWsqzn6By/jTB+zK5ZmlkomWN30MmU4oFVg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712894060; x=1713498860; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jNuc47l/d9O88OpjU0ua7A2FwM7g1KOoLnm2sfcPXYE=; b=W5jyNUQDM7xUP2YHF6MncDFnye99S0cLzmcoSaEWM+YtFUWKrBb6ZaAF0z3DeQfx7m pQYHUDo69/8fWkYJwwt0MZAKo6Et2z/Uk+aUArD9FxO6Fx3zhB8GLE5eputKKkbfhJyA xCTKuOdklgLtZV9tVfyCN3R60jZaxDhEGVs6FDZc4R0+g1RNhbLxI6M2dp5uzSDYgzOJ x8IrvpU1nYGoSg2aE9YwIhzF65nvo5udQZPh1qXy6puZWXflELnj5L6k4ky1wDU7ZSuj ShYRXdmOpZucj3kgCWPtQU+bFMC/uTLsCcrQrDC35lugQeX/GsEsUgGo9M3qxkOS4Xiw yvRQ== X-Forwarded-Encrypted: i=1; AJvYcCUtb2vpEzRKtjg+QbD2Ha6dmzD3sw5MfpBwOMkDFY18e2EG6uQlH1YgeJ6DYzsTejI+aAiKm9NwLwr+NGTla6/bKSyssvKdkTVXO0Hf X-Gm-Message-State: AOJu0Yz7pc8M/s9+RzlwInWrPeLXxSzgucZoUun3ksAs1y3ospXqAFkQ FYjDCCPYkAepUpEeHf0VeDiOjTMJWwbcWT5Qh8CMgXCjRz8bkqwk4v8KFCzTzRQ= X-Received: by 2002:a05:6808:218c:b0:3c5:fa59:9957 with SMTP id be12-20020a056808218c00b003c5fa599957mr2118960oib.17.1712894059841; Thu, 11 Apr 2024 20:54:19 -0700 (PDT) Received: from localhost.localdomain ([103.108.57.9]) by smtp.gmail.com with ESMTPSA id a193-20020a6390ca000000b005dc120fa3b2sm1842910pge.18.2024.04.11.20.54.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 20:54:19 -0700 (PDT) From: Pavitrakumar M To: herbert@gondor.apana.org.au, linux-crypto@vger.kernel.org Cc: Ruud.Derwig@synopsys.com, manjunath.hadli@vayavyalabs.com, bhoomikak@vayavyalabs.com, Pavitrakumar M , shwetar Subject: [PATCH v2 2/4] Add SPACC Kconfig and Makefile Date: Fri, 12 Apr 2024 09:23:40 +0530 Message-Id: <20240412035342.1233930-3-pavitrakumarm@vayavyalabs.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240412035342.1233930-1-pavitrakumarm@vayavyalabs.com> References: <20240412035342.1233930-1-pavitrakumarm@vayavyalabs.com> Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Signed-off-by: shwetar Signed-off-by: Pavitrakumar M Acked-by: Ruud Derwig --- drivers/crypto/dwc-spacc/Kconfig | 95 +++++++++++++++++++++++++++++++ drivers/crypto/dwc-spacc/Makefile | 16 ++++++ 2 files changed, 111 insertions(+) create mode 100644 drivers/crypto/dwc-spacc/Kconfig create mode 100644 drivers/crypto/dwc-spacc/Makefile diff --git a/drivers/crypto/dwc-spacc/Kconfig b/drivers/crypto/dwc-spacc/Kconfig new file mode 100644 index 000000000000..9eb41a295f9d --- /dev/null +++ b/drivers/crypto/dwc-spacc/Kconfig @@ -0,0 +1,95 @@ +# SPDX-License-Identifier: GPL-2.0-only + +config CRYPTO_DEV_SPACC + tristate "Support for dw_spacc Security protocol accelerators" + depends on HAS_DMA + default m + + help + This enables support for the HASH/CRYP/AEAD hw accelerator which can be found + on dw_spacc IP. + +config CRYPTO_DEV_SPACC_CIPHER + bool "Enable CIPHER functionality" + depends on CRYPTO_DEV_SPACC + default y + select CRYPTO_SKCIPHER + select CRYPTO_LIB_DES + select CRYPTO_AES + select CRYPTO_CBC + select CRYPTO_ECB + select CRYPTO_CTR + select CRYPTO_XTS + select CRYPTO_CTS + select CRYPTO_OFB + select CRYPTO_CFB + select CRYPTO_SM4_GENERIC + select CRYPTO_CHACHA20 + + help + Say y to enable Cipher functionality of SPACC. + +config CRYPTO_DEV_SPACC_HASH + bool "Enable HASH functionality" + depends on CRYPTO_DEV_SPACC + default y + select CRYPTO_HASH + select CRYPTO_SHA1 + select CRYPTO_MD5 + select CRYPTO_SHA256 + select CRYPTO_SHA512 + select CRYPTO_HMAC + select CRYPTO_SM3 + select CRYPTO_CMAC + select CRYPTO_MICHAEL_MIC + select CRYPTO_XCBC + select CRYPTO_AES + select CRYPTO_SM4_GENERIC + + help + Say y to enable Hash functionality of SPACC. + +config CRYPTO_DEV_SPACC_AEAD + bool "Enable AEAD functionality" + depends on CRYPTO_DEV_SPACC + default y + select CRYPTO_AEAD + select CRYPTO_AUTHENC + select CRYPTO_AES + select CRYPTO_SM4_GENERIC + select CRYPTO_CHACHAPOLY1305 + select CRYPTO_GCM + select CRYPTO_CCM + + help + Say y to enable AEAD functionality of SPACC. + +config CRYPTO_DEV_SPACC_AUTODETECT + bool "Enable Autodetect functionality" + depends on CRYPTO_DEV_SPACC + default y + help + Say y to enable Autodetect functionality + +config CRYPTO_DEV_SPACC_DEBUG_TRACE_IO + bool "Enable Trace MMIO reads/writes stats" + depends on CRYPTO_DEV_SPACC + default n + help + Say y to enable Trace MMIO reads/writes stats. + To Debug and trace IO register read/write opration + +config CRYPTO_DEV_SPACC_DEBUG_TRACE_DDT + bool "Enable Trace DDT entries stats" + default n + depends on CRYPTO_DEV_SPACC + help + Say y to enable Enable Trace DDT entries stats. + To Debug and trace DDT opration + +config CRYPTO_DEV_SPACC_SECURE_MODE + bool "Enable Spacc secure mode stats" + default n + depends on CRYPTO_DEV_SPACC + help + Say y to enable Spacc secure modes stats. diff --git a/drivers/crypto/dwc-spacc/Makefile b/drivers/crypto/dwc-spacc/Makefile new file mode 100644 index 000000000000..bf46c8e13a31 --- /dev/null +++ b/drivers/crypto/dwc-spacc/Makefile @@ -0,0 +1,16 @@ +# SPDX-License-Identifier: GPL-2.0-only +obj-$(CONFIG_CRYPTO_DEV_SPACC) += snps-spacc.o +snps-spacc-objs = spacc_hal.o spacc_core.o \ +spacc_manager.o spacc_interrupt.o spacc_device.o + +ifeq ($(CONFIG_CRYPTO_DEV_SPACC_HASH),y) +snps-spacc-objs += spacc_ahash.o +endif + +ifeq ($(CONFIG_CRYPTO_DEV_SPACC_CIPHER),y) +snps-spacc-objs += spacc_skcipher.o +endif + +ifeq ($(CONFIG_CRYPTO_DEV_SPACC_AEAD),y) +snps-spacc-objs += spacc_aead.o +endif -- 2.25.1