From patchwork Fri Apr 12 03:53:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavitrakumar Managutte X-Patchwork-Id: 788617 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=vayavyalabs.com header.i=@vayavyalabs.com header.b="geZMEzvY" 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-Google-Smtp-Source: AGHT+IG8KFF714bXnnJh+fx9Dym4jpducyt+LMFJe4hGzy660muYdz/asf3idyq1kGhTZrPdspccIQ== 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 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