Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3279086ybt; Mon, 22 Jun 2020 20:58:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyZYJJeR4VFP9z2rJ0G5b9pTw2FUkkxrOR8iTrHGzDL/wXE9nfYEGNnlNzDyF3NvhaIfF00 X-Received: by 2002:aa7:c81a:: with SMTP id a26mr20854575edt.353.1592884721225; Mon, 22 Jun 2020 20:58:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592884721; cv=none; d=google.com; s=arc-20160816; b=d0fICUUFEJ+nq33PN+yWy/oXZRu+NgpmuUDC3Be1GEcxO8rkU5ChXroZ6KRSSYl3tU xaBzJeqmgJplxMbQIZ9up5Sglf+zF4f/iKPyqBG+Zttp2m0Nuocb6stFyS3LdkZ6xC+g iuMp50akHm9yFLIcoZnE6RQf+GRFPBd9l93OFcbbXRfFEkiVtvPY0v8DCHkc7ggi68qQ RSvl//cbjEvWIpmswHjxkJwRf+XUOgQrVfyKrXx7RgBaiRxsi1qswxRy3VqS+IRfz9Sc vqOj7bR8l7ei4Z5jjy5Lk7MNSj9dxoy9XZsm8ZU4LsfZVNjnYDQ/GywcK9p+vdYm0u3I Eedw== 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=KF43edBV+lA+CfxOwJGWkbSz5EUQkswFRcUcLO5gFbI=; b=Qmoe94nwUSwgq5yH7azef/53v3JU+Me+fPSRhJyjEwTLQFaQEFh0VqCwJSc9UkRLpT zZrxxCC//o/55AUwdmTay189n7kp+TZESTUigg0JU8UBuLCZqp8Qja0rofZUmpy3ewew Hqltf/x0j/cUE8vK76npB3G/7GAtBeDV8d9ftYJ3ZXwwMoYtr/zWJNRWHfoRIvm69JGI jc0szu8VlzzD3o2Exb9NKVli324s9sHb7ed1V0pb0E7TrSfSbWAe5M+QCWsl2nv1oxjo aV1wFZHRMN5Otfjgq2abJ4u6KLZpFxWQDOcm398EjBEGES0GQF/vk9cpZ1O6WfNiVOJ9 w+Qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=OUJkaonI; 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 h14si1823250edr.586.2020.06.22.20.58.17; Mon, 22 Jun 2020 20:58:41 -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=OUJkaonI; 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 S1731932AbgFWDxH (ORCPT + 99 others); Mon, 22 Jun 2020 23:53:07 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:56934 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731203AbgFWDxF (ORCPT ); Mon, 22 Jun 2020 23:53:05 -0400 Received: from epcas1p2.samsung.com (unknown [182.195.41.46]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20200623035302epoutp04823363b8e15c8d7322098a5ed45659d5~bD_f4hQnF3181131811epoutp04B for ; Tue, 23 Jun 2020 03:53:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20200623035302epoutp04823363b8e15c8d7322098a5ed45659d5~bD_f4hQnF3181131811epoutp04B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1592884382; bh=KF43edBV+lA+CfxOwJGWkbSz5EUQkswFRcUcLO5gFbI=; h=Subject:Reply-To:From:To:CC:In-Reply-To:Date:References:From; b=OUJkaonIQO/Dky75CrLAqrOc+AY8dzBjEqcNmabdGT62kSLdMfOz8D+HJAo3rQJ6T Kmmgtxf83Z6YUmUVceZPx9UEKIZ3xu3waDM3LEmWyKS+Nu2GeSqRGDPMK4Ep7vRLA2 GxU1+XNiT+YkobTvyr2le5JAZUAamUL+6ASCkxUE= Received: from epcpadp2 (unknown [182.195.40.12]) by epcas1p4.samsung.com (KnoxPortal) with ESMTP id 20200623035301epcas1p4267c1a6deafc472c64fbdcd71af3b181~bD_fdHh5B1000210002epcas1p45; Tue, 23 Jun 2020 03:53:01 +0000 (GMT) Mime-Version: 1.0 Subject: [RFC PATCH v3 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" , "stanley.chu@mediatek.com" , "cang@codeaurora.org" , "huobean@gmail.com" , "bvanassche@acm.org" , "tomas.winkler@intel.com" , ALIM AKHTAR CC: "linux-scsi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , 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.21592879582091.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.01592884381695.JavaMail.epsvc@epcpadp2> Date: Tue, 23 Jun 2020 12:50:46 +0900 X-CMS-MailID: 20200623035046epcms2p546ed073e94a5ab53202feaa48bafd59f 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: 20200623010201epcms2p11aebdf1fbc719b409968cba997507114 References: <963815509.21592879582091.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; base-commit: 3145550a7f8b08356c8ff29feaa6c56aca12901d -- 2.17.1