Received: by 2002:ab2:3c46:0:b0:1f5:f2ab:c469 with SMTP id x6csp44505lqf; Thu, 25 Apr 2024 21:27:02 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWrQDckoJBQlpBNq2rsdoXLBRiTAkpn7QjqNgASby8AQh8DqJ9SXfmIwN3CgTto829RJGdBnhNQo4V/dYfIyOb5z44hmJv5iNWBIgpxAw== X-Google-Smtp-Source: AGHT+IE+zLHmEOxHTySEZXWYEBrm+wbmcQTo19OraDGhshSf7hP7ZRkSDGkaLoQ9lceJ1OysNUWm X-Received: by 2002:a17:906:e2c3:b0:a55:b520:766 with SMTP id gr3-20020a170906e2c300b00a55b5200766mr987918ejb.0.1714105622067; Thu, 25 Apr 2024 21:27:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714105622; cv=pass; d=google.com; s=arc-20160816; b=TlXPKKugQQp7y6lZLSSqYAq2C7kh6bjkx0vSGjWmkU393NLJdLSYU5uN6Y4NldU2+K biiZqgKDM1ZPz76rsyJotCa62quGRduKRJmNfPRbiF/LQ/edkfOrIY8Jd6iSlWthRDwm kctH5wrxxZGWIJIoBn1iRoZj0uaCUHDRD40OFD6ATBA9YKpcE7f2LbyIxpf3Zm5UAIaC P39Z2d1VpihnHkeEBNXL3+cBJRgf696JwIO1XZ8gxMUWxlsAHBWEij+McMegDdWku6As JYaxFNtPtmiX2PVKkavSWHdEXikqqNYB0pQNzEuyqHfW9zzYqxWo4lVVDiq+fK9SEz2H c1PA== 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=nKXMlIDnwfkcREXFrl0APrg+ZnLGK8H1w+N4Rwn2rOA=; fh=rCqeCuhrdc2y/0f7G4Bs0uh6LyhSeG5icg4EJPFnI1k=; b=ddKYTiNaYjiiEqDyw6L1TeMDWKt8dmybChTw7AvOYkjruT68dLbgbngFlxz/T6FcW3 9ys3qaK4WTqWlMQWShAbOJwXiSDnr/9PnDsFhSR96SSD/sa9byCfrPRfYL6C63ykUYoq Ja6wyO09mrXwVmFBj+HgiQ3YmSwsg2Ll5tWIoh3qHDUZtDUYx9z1cZDB0mzoaqrcf7Ek dLqJBrWLMInBflDSm0ugtoj9guQyG2hWCrcaB7qR4wmUnMnmUKWvgf8YDDPx2j3jEI9u ux4Lz8+wEP15wAXj9duu0owy3pBeNuyVZBlqfIN6gbtHDX+l28vUAbNlTtwOfzbHJ4lg vD8A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vayavyalabs.com header.s=google header.b="G8/Lz5RX"; 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-3860-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-crypto+bounces-3860-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=vayavyalabs.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id o10-20020a1709061d4a00b00a588fa6df0bsi2886553ejh.383.2024.04.25.21.27.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Apr 2024 21:27:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto+bounces-3860-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@vayavyalabs.com header.s=google header.b="G8/Lz5RX"; 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-3860-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-crypto+bounces-3860-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 5220A1F22BD0 for ; Fri, 26 Apr 2024 04:26:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E6A988175E; Fri, 26 Apr 2024 04:26:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=vayavyalabs.com header.i=@vayavyalabs.com header.b="G8/Lz5RX" X-Original-To: linux-crypto@vger.kernel.org Received: from mail-pg1-f182.google.com (mail-pg1-f182.google.com [209.85.215.182]) (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 5CB4277F15 for ; Fri, 26 Apr 2024 04:26:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714105611; cv=none; b=QUbRdf28TK3OYX0ELD523dFce9q0DeQjcaRUTDDNf7PHxT07QQvRFc846HT6lfHn89DZYTCAE8/TUdv4aM7H1rNEIQMPP5Mq1mB9AmPdOhMy7AQSNgYzJKlupZqpRKjFCVFb4UYm/2gAJljD38hz5HLpMs2nqZ4ln8Me/PhLumk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714105611; c=relaxed/simple; bh=+8P1w6aUSIAPhLIEYHoxnk8MIUtXaOEofQD45EECveE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=m+8Y3mtn4Su+/r8XEgQlLrH1CniuIjUVnIXPTSsWFmKfshTkQfMz8XKI+HYilA2d2qcAbB8GxyQZAsT+US+tW3MFUQGFZSszmBkDC/wpm1csqx5cW4xPViAhWfLn/IlMHvNTBIiSWz4z5Ih3jZgYLeC1AbSAhB1qUfqaKSWoCmM= 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=G8/Lz5RX; arc=none smtp.client-ip=209.85.215.182 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-pg1-f182.google.com with SMTP id 41be03b00d2f7-5f7fc45fe1bso1366851a12.0 for ; Thu, 25 Apr 2024 21:26:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vayavyalabs.com; s=google; t=1714105609; x=1714710409; 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=nKXMlIDnwfkcREXFrl0APrg+ZnLGK8H1w+N4Rwn2rOA=; b=G8/Lz5RXsuJzTYU5gzCwF/2C/Z4EL3U7xyuUs6IVRuiPc7vDEUTJPKplz9CsMsJPY/ WF6ninpnkAWp2J58J6uCwi2aRPcgUy/9mpURv6lTF7smmxdhEQfUvhcPLqVCMRvmYtGe hXloY3H0wTjH4Iz6SnkC36I6L4whZ5Ohmkw9k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714105609; x=1714710409; 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=nKXMlIDnwfkcREXFrl0APrg+ZnLGK8H1w+N4Rwn2rOA=; b=dlKbbtLGCfHAFRnDXhA4Dxafepx8oihhUr0Bq91lctJQsU7M5hs6ucUuUZtBiYACuY ygBBDk7GIqGAyVs3+prV548cv8P7VnzkALm0fse0JmpVOkbmPK9pWHUcqrzjjTuiRymr ng4PJX7L5nq+O9h4SatZaotRD3h3O+5lvrS4IXaxHPyvfUosKEj+zz/u9O1BgwVfJPdB /8ffaPwWEmn7R0oenbqZg4VQdTBzYRO1bRV34IfvTIOa2TmDy6z15miUypKSPn/wLDOj sdzZkZroYQkcBK5ODebKtsJKYNUOkzEr06FVrYanuhkcXbgtB9EHqQwC530Wzn0/Sx03 woFQ== X-Forwarded-Encrypted: i=1; AJvYcCU7yF4QUSiBCE79TIKK6rB5FM1Zk1NamO+BOST/WvPEm/5AvbAZUdC3Bgo/ZFD+DGsLUBvjiZpTnyA/HQyBE5MmpjrjMS+sVLWMvUtz X-Gm-Message-State: AOJu0YyEfiIeRm0AZLTnTPwJbZyffh/O13KHtO4/1508+PsyiZ934n9e /g7JmNLyHTHworJxCKV8AzI4ixewotGiRk+Xzkr0r8sfrx1RuSlYK7O/9yKmhIVxegh1jJjX38H N X-Received: by 2002:a05:6a21:271c:b0:1a3:63fa:f760 with SMTP id rm28-20020a056a21271c00b001a363faf760mr1818458pzb.14.1714105609637; Thu, 25 Apr 2024 21:26:49 -0700 (PDT) Received: from localhost.localdomain ([103.108.57.9]) by smtp.gmail.com with ESMTPSA id t12-20020a17090a5d8c00b002a474e2d7d8sm15500291pji.15.2024.04.25.21.26.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Apr 2024 21:26:49 -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 Subject: [PATCH v3 5/7] Add SPAcc Kconfig and Makefile Date: Fri, 26 Apr 2024 09:55:42 +0530 Message-Id: <20240426042544.3545690-6-pavitrakumarm@vayavyalabs.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240426042544.3545690-1-pavitrakumarm@vayavyalabs.com> References: <20240426042544.3545690-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 --- 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 0000000000000..9eb41a295f9df --- /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 0000000000000..bf46c8e13a317 --- /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