Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1868769ybt; Thu, 2 Jul 2020 16:26:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwpJBF4OzgZW5SVyzxovyleS4sI8zeqMnK9ythR3UJiWTxxvpgTJes552zVvk0Sgp7/XCtn X-Received: by 2002:a17:906:488b:: with SMTP id v11mr30985625ejq.173.1593732388754; Thu, 02 Jul 2020 16:26:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593732388; cv=none; d=google.com; s=arc-20160816; b=rdMGmWkUO682Mt9skCgtXc7/OHsc0OByoO4Gfi4uTd1OgTWCbxGNs0iFgSvgckBYcU 3QmeOW/ej23LaF9CcCEAHO3ImlKDAoTERsiJIpdrBC/ZUtolSzg6jUILkicu0VVFn2f+ u5xsNyYyILqg1lJN0RibxaanIf2t8yaNFkYaezYfD0DsgyesBEQnJJtFQ0fC/0qgWdFd O0LdiAHXXdraaFniKih64jKw719ASY+tGjFWMdn3lLxRjFh+Xg5beRqyzwznuTJzJVV/ L/PJanmpPraZ1ZkB/8/648qcOLk8fQX6b54JeGb5hasE4JwuL8GWOPq2xtJjMXL9HgOd N7kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:content-transfer-encoding:date :message-id:in-reply-to:cc:to:from:reply-to:subject:mime-version :dkim-signature:dkim-filter; bh=Ef6z+BYrVNvEtpfdpNOMBycjh5kFbQ9tKidtwH6Adw4=; b=OqBtc6WYU7xdvppE9yGuNgZohNwMD9ClZcrGrC8XQXmYp+ugs961UVVx4uRQVJsn9e LU4ecbktxN0U7ASCDjhAZyGqjvnZWosuCibM06+yQelRJSKPoSQlI8mgSTVcUB8gck4w JwgJOzqcKxwj507IbGcI9aNOv6vZxLYTJ2wcM65h5Cxvrc2mGkWXLX+tzG/BhIkAy9gu a6n8ddy3lY6JmiVD+HTlbD91DbQTzdOpuKlChUvdaKk8DOQXK3RGhGnUoAL6zNFgMz8E LytHiS/scPcGLAcLCMYgBIWRCeK/y59NxzawqmIWa+166v+vDa2T5om1FYJdiJhC2XZM /T2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=BmP2SKNQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r12si6604664edo.320.2020.07.02.16.26.05; Thu, 02 Jul 2020 16:26:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=BmP2SKNQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726340AbgGBXZI (ORCPT + 99 others); Thu, 2 Jul 2020 19:25:08 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:42973 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726298AbgGBXZG (ORCPT ); Thu, 2 Jul 2020 19:25:06 -0400 Received: from epcas1p4.samsung.com (unknown [182.195.41.48]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20200702232502epoutp016f547bb79bed5b44d3d0f1bf3bd6ae4b~eExXMdWMp2434524345epoutp01f for ; Thu, 2 Jul 2020 23:25:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20200702232502epoutp016f547bb79bed5b44d3d0f1bf3bd6ae4b~eExXMdWMp2434524345epoutp01f DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1593732302; bh=Ef6z+BYrVNvEtpfdpNOMBycjh5kFbQ9tKidtwH6Adw4=; h=Subject:Reply-To:From:To:CC:In-Reply-To:Date:References:From; b=BmP2SKNQJMSPbGlgd5vyS1MrmR1dGyuEo0Sfrnk0LNu4AaKD/PcET8ngkbweqE9XO tQRgAP0J5CuVD7f5Qq/KimNGzO4nhr+44HP+Ajr/7jGzwQxY4Xs36A5S1kmuYuKcaT OtGAunpC1qSYjvQCHhPXH5AePxQGpBPJjFKKwUJE= Received: from epcpadp1 (unknown [182.195.40.11]) by epcas1p1.samsung.com (KnoxPortal) with ESMTP id 20200702232502epcas1p1b2b6e60309b0a556c674d45a8cf975bc~eExWxg31j1764017640epcas1p1t; Thu, 2 Jul 2020 23:25:02 +0000 (GMT) Mime-Version: 1.0 Subject: [PATCH v5 1/5] scsi: ufs: Add UFS feature related parameter Reply-To: daejun7.park@samsung.com From: Daejun Park To: Daejun Park , "avri.altman@wdc.com" , "jejb@linux.ibm.com" , "martin.petersen@oracle.com" , "asutoshd@codeaurora.org" , "beanhuo@micron.com" , "stanley.chu@mediatek.com" , "cang@codeaurora.org" , "bvanassche@acm.org" , "tomas.winkler@intel.com" CC: "linux-scsi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , ALIM AKHTAR , Sang-yoon Oh , Sung-Jun Park , yongmyung lee , Jinyoung CHOI , Adel Choi , BoRam Shin X-Priority: 3 X-Content-Kind-Code: NORMAL In-Reply-To: <963815509.21593732182531.JavaMail.epsvc@epcpadp2> X-CPGS-Detection: blocking_info_exchange X-Drm-Type: N,general X-Msg-Generator: Mail X-Msg-Type: PERSONAL X-Reply-Demand: N Message-ID: <231786897.01593732302018.JavaMail.epsvc@epcpadp1> Date: Fri, 03 Jul 2020 08:23:54 +0900 X-CMS-MailID: 20200702232354epcms2p21b1f24b5fbe1d5a0926422c11021106b Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: AUTO_CONFIDENTIAL X-CPGSPASS: Y X-CPGSPASS: Y X-Hop-Count: 3 X-CMS-RootMailID: 20200702231936epcms2p81557f83504ef1c1e81bfc81a0143a5b4 References: <963815509.21593732182531.JavaMail.epsvc@epcpadp2> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is a patch for parameters to be used for UFS features layer and HPB module. Signed-off-by: Daejun Park --- drivers/scsi/ufs/ufs.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/scsi/ufs/ufs.h b/drivers/scsi/ufs/ufs.h index f8ab16f30fdc..ae557b8d3eba 100644 --- a/drivers/scsi/ufs/ufs.h +++ b/drivers/scsi/ufs/ufs.h @@ -122,6 +122,7 @@ enum flag_idn { QUERY_FLAG_IDN_WB_EN = 0x0E, QUERY_FLAG_IDN_WB_BUFF_FLUSH_EN = 0x0F, QUERY_FLAG_IDN_WB_BUFF_FLUSH_DURING_HIBERN8 = 0x10, + QUERY_FLAG_IDN_HPB_RESET = 0x11, }; /* Attribute idn for Query requests */ @@ -195,6 +196,9 @@ enum unit_desc_param { UNIT_DESC_PARAM_PHY_MEM_RSRC_CNT = 0x18, UNIT_DESC_PARAM_CTX_CAPABILITIES = 0x20, UNIT_DESC_PARAM_LARGE_UNIT_SIZE_M1 = 0x22, + UNIT_DESC_HPB_LU_MAX_ACTIVE_REGIONS = 0x23, + UNIT_DESC_HPB_LU_PIN_REGION_START_OFFSET = 0x25, + UNIT_DESC_HPB_LU_NUM_PIN_REGIONS = 0x27, UNIT_DESC_PARAM_WB_BUF_ALLOC_UNITS = 0x29, }; @@ -235,6 +239,8 @@ enum device_desc_param { DEVICE_DESC_PARAM_PSA_MAX_DATA = 0x25, DEVICE_DESC_PARAM_PSA_TMT = 0x29, DEVICE_DESC_PARAM_PRDCT_REV = 0x2A, + DEVICE_DESC_PARAM_HPB_VER = 0x40, + DEVICE_DESC_PARAM_HPB_CONTROL = 0x42, DEVICE_DESC_PARAM_EXT_UFS_FEATURE_SUP = 0x4F, DEVICE_DESC_PARAM_WB_PRESRV_USRSPC_EN = 0x53, DEVICE_DESC_PARAM_WB_TYPE = 0x54, @@ -283,6 +289,10 @@ enum geometry_desc_param { GEOMETRY_DESC_PARAM_ENM4_MAX_NUM_UNITS = 0x3E, GEOMETRY_DESC_PARAM_ENM4_CAP_ADJ_FCTR = 0x42, GEOMETRY_DESC_PARAM_OPT_LOG_BLK_SIZE = 0x44, + GEOMETRY_DESC_HPB_REGION_SIZE = 0x48, + GEOMETRY_DESC_HPB_NUMBER_LU = 0x49, + GEOMETRY_DESC_HPB_SUBREGION_SIZE = 0x4A, + GEOMETRY_DESC_HPB_DEVICE_MAX_ACTIVE_REGIONS = 0x4B, GEOMETRY_DESC_PARAM_WB_MAX_ALLOC_UNITS = 0x4F, GEOMETRY_DESC_PARAM_WB_MAX_WB_LUNS = 0x53, GEOMETRY_DESC_PARAM_WB_BUFF_CAP_ADJ = 0x54, @@ -327,6 +337,7 @@ enum { /* Possible values for dExtendedUFSFeaturesSupport */ enum { + UFS_DEV_HPB_SUPPORT = BIT(7), UFS_DEV_WRITE_BOOSTER_SUP = BIT(8), }; @@ -537,6 +548,7 @@ struct ufs_dev_info { u8 *model; u16 wspecversion; u32 clk_gating_wait_us; + u8 b_ufs_feature_sup; u32 d_ext_ufs_feature_sup; u8 b_wb_buffer_type; u32 d_wb_alloc_units; -- 2.17.1