From patchwork Thu Apr 4 12:25:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Griffin X-Patchwork-Id: 13617858 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B15E9CD1299 for ; Thu, 4 Apr 2024 13:34:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=EqtpOy38T/CI9Txdml3ydJP+//yhfAsE7nMILpszNmw=; b=InIcKJYOEkrsm0 BypFB/kI2VxtWuk4jS7YD8Nhqhf+sE9YGr54kKF89+fVuiepBFqCoscK60oSOy1JEL3mQKOVdf77w JUmrPiVYP7TXZyubCQx/Pb0vsM9CjZ1FpFBmHPekw+xXWzQPxjSILGrPNU+GHy/cduWkV9rdsW2Dc lwS76c2/5apTEshPiVtutjzdLxIA5pUiCXbPmgesv4L+GVP3wMR8dlTOYCDE8eJEj6CT+n6QsO7KD 4fmF3+/mDYVraEWTClmvRRDuNEFsNDD7yzNf0mHOK9zw+VcPrJ6qe+mHeCLnioA77fJjwSFrB2OAm KKOMIdGepFV8sdo9Yjnw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rsNEk-00000002pKN-3NcC; Thu, 04 Apr 2024 13:34:38 +0000 Received: from mail-wm1-f48.google.com ([209.85.128.48]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rsMBg-00000002bDj-1gxj for linux-arm-kernel@lists.infradead.org; Thu, 04 Apr 2024 12:27:28 +0000 Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-415446af364so12400145e9.0 for ; Thu, 04 Apr 2024 05:27:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1712233641; x=1712838441; darn=lists.infradead.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=iyUUQp6WOxRvluHXSIvI5EfrW3GeehtIyQz6Nkgdpu8=; b=wTupl8+q46RkAwTsYcpgpT0J5v8aZeWIQtrDhMBtk3XcgNXjU7J6ZtXhzVqz3wPnmR 1dbvm4cYmLnqwBEdGoblRQKmKY+V0ZwGmG7Fn2zroqdSgNuWYGMM0LxRhPUGanKig+RM vX0QmYGicFI8dPI0v4LV5ATD1KAQxym1Jja+DEo8HU6ct8hhZX3b2L9yJDYXAhwD/MaC tiupDE8ehwaCwEDYKFr51BXLFoAcJTCy8gWf7i5wrPcTrvl33T48DHtZsCODhiNZoJOS E87EW60xXs6th0rBo2mUfGqgXW14Y7j25dWGmM9kXp1BK71UToqZPkt6GGxlGs11tkRO GlUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712233641; x=1712838441; 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=iyUUQp6WOxRvluHXSIvI5EfrW3GeehtIyQz6Nkgdpu8=; b=xNYrjKIHr475knchOgZHfk0SfbBEqXexrCZxuFQOa+8I3jfRKesrJs5XUZ26MnYcou eUgnpIsFtoAW9e8yBSlxH8f7WVm8xTBVTyLQDBe2f+GRILS2towFVR8/mrf8zHI5xrW8 cIhvAYXQ1+MGrb4US2tB1/C8EDA55XLguYbWNgRIdBCFtawrrX6obZNiwqSGZ8hM37JN ePixTLc/qbIjOUjnq/hoNV92uzRyqZ7AKlqbFdGXudZU9G/fRkFTywFTEyMcq9+aqQ2h TOpuNDqnl2Hrm2sOk1PZNprs0c5H/m0nh8+YXQkwmmwJ3NIa8fQ9UgA9xxOWnbD59pSz a2/A== X-Forwarded-Encrypted: i=1; AJvYcCWHI5hbj1TjznQxiMOZ9JkQ93Yaqxkl172cMDjEWkhPz+wOvtP/NUR2TYVT+I94fHsWkkOyt57XaZvruAyVkha2GV8DS4Y5ZQpNr8X1OMaZgDteGDU= X-Gm-Message-State: AOJu0Yy0/pckpGKJ8Fe74UryA77LhvjOQmnfbGIyoavbulaptYEThL5y h5RGnVChhK+Xu3A6DTOep0HdCHSPKCQLAWRBZTCC8oZZUyn5LsXRdPTo94GKeio= X-Google-Smtp-Source: AGHT+IEMnaWns3sPAMJ91nDBk0kRT98vdLD6EXIhsFu+f4lEueXgTLnJxBfN0OJHTHTi8CWqnrfg8Q== X-Received: by 2002:a05:600c:1f84:b0:415:6cd7:9967 with SMTP id je4-20020a05600c1f8400b004156cd79967mr4750373wmb.10.1712233641601; Thu, 04 Apr 2024 05:27:21 -0700 (PDT) Received: from gpeter-l.roam.corp.google.com ([148.252.128.204]) by smtp.gmail.com with ESMTPSA id bu14-20020a056000078e00b003434b41c83fsm12106303wrb.81.2024.04.04.05.27.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 05:27:20 -0700 (PDT) From: Peter Griffin To: mturquette@baylibre.com, sboyd@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, vkoul@kernel.org, kishon@kernel.org, alim.akhtar@samsung.com, avri.altman@wdc.com, bvanassche@acm.org, s.nawrocki@samsung.com, cw00.choi@samsung.com, jejb@linux.ibm.com, martin.petersen@oracle.com, chanho61.park@samsung.com, ebiggers@kernel.org Cc: linux-scsi@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-clk@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, tudor.ambarus@linaro.org, andre.draszik@linaro.org, saravanak@google.com, willmcvicker@google.com, Peter Griffin Subject: [PATCH 12/17] scsi: ufs: host: ufs-exynos: Add EXYNOS_UFS_OPT_UFSPR_SECURE option Date: Thu, 4 Apr 2024 13:25:54 +0100 Message-ID: <20240404122559.898930-13-peter.griffin@linaro.org> X-Mailer: git-send-email 2.44.0.478.gd926399ef9-goog In-Reply-To: <20240404122559.898930-1-peter.griffin@linaro.org> References: <20240404122559.898930-1-peter.griffin@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240404_052724_569486_5E07F6E3 X-CRM114-Status: GOOD ( 12.54 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This option is intended to be set on platforms whose ufspr registers are only accessible via smc call (such as gs101). Signed-off-by: Peter Griffin Acked-by: Krzysztof Kozlowski Tested-by: Will McVicker --- drivers/ufs/host/ufs-exynos.c | 4 +++- drivers/ufs/host/ufs-exynos.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/ufs/host/ufs-exynos.c b/drivers/ufs/host/ufs-exynos.c index 734d40f99e31..7b68229f6264 100644 --- a/drivers/ufs/host/ufs-exynos.c +++ b/drivers/ufs/host/ufs-exynos.c @@ -1186,7 +1186,9 @@ static int exynos_ufs_init(struct ufs_hba *hba) if (ret) goto out; exynos_ufs_specify_phy_time_attr(ufs); - exynos_ufs_config_smu(ufs); + + if (!(ufs->opts & EXYNOS_UFS_OPT_UFSPR_SECURE)) + exynos_ufs_config_smu(ufs); return 0; out: diff --git a/drivers/ufs/host/ufs-exynos.h b/drivers/ufs/host/ufs-exynos.h index a4bd6646d7f1..0fc21b6bbfcd 100644 --- a/drivers/ufs/host/ufs-exynos.h +++ b/drivers/ufs/host/ufs-exynos.h @@ -221,6 +221,7 @@ struct exynos_ufs { #define EXYNOS_UFS_OPT_BROKEN_RX_SEL_IDX BIT(3) #define EXYNOS_UFS_OPT_USE_SW_HIBERN8_TIMER BIT(4) #define EXYNOS_UFS_OPT_SKIP_CONFIG_PHY_ATTR BIT(5) +#define EXYNOS_UFS_OPT_UFSPR_SECURE BIT(6) }; #define for_each_ufs_rx_lane(ufs, i) \