Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp2891045pxb; Sun, 15 Nov 2020 22:54:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJwJTs0/NYhlQxMfh79zWOFIrdzL/MnJ/TGEA5daPXVmn1vfRmmrrNv4UJYzKBzmRbow9ouE X-Received: by 2002:a05:6402:1f0:: with SMTP id i16mr14274239edy.122.1605509644360; Sun, 15 Nov 2020 22:54:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605509644; cv=none; d=google.com; s=arc-20160816; b=QKTS8DEfeou5e9nIMOdyL3z574TPfYfN1oCKr296LNDiW+/DpBSbsa3eVwPqfB3wgY Omz+rpS+SDdpzuYzCXS6en4rnW3A9B7gjEyjyrzsNSahvQm6UuFP5Ad1d1F0amjTNegr qAENilhCfJm5IKV0Qz3Ub78ZHpX3nv1RN9158QIiQ/NX9965Y6RakQJ/oUnBf/qVckqM 90S0b0z+XlGAE3S23KU8xSq9FKkY4+dZpIwFj880UrsU1mELvf4Zm6EEFOI4LYlMTLUf 9Ix6OzW/CU/zNceQvOyMRVn+sUDsSwaAl6CM8UJDlddsXVV4CU+2a5opSXLQd0zSObec d/Gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=kpu5ch9sO39D8YcjdCBHLVRsoewtIeKbs3FI75AqOMM=; b=MSkMLW/9JyzDBOeKLZJTzJ7Z4hyO5JT20PVWAR26FwrqeZJylapKWt4p2XuoFdgkzE 0eCTR2T7VVZq2mdtm6bqWj9Ge2tiuN2pXeWI0Q1JvyY/BQ5EFVyq1spKZj7oT/IajnLS nQ7ymK3DJN1mDICqvilzbjCmp4Vdm0ltEoCZIwFVbwSJ+4PVUT7UTPyXBHmKIYjzrQa2 cwEMYrh541NxQ1nbixQtMgQrgNcJsVfkrZLnUA4Xgzn7l/VPMhGCfCu0AY0J0lwZ0O4G a/9jrHGcvjkm57dPyT9fxwRP2EWTeEP3WhfxqISRl+7cbF1ymDl7rf5nnydSZeyEU62G nytg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i25si11037364ejy.626.2020.11.15.22.53.42; Sun, 15 Nov 2020 22:54:04 -0800 (PST) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727323AbgKPGvH (ORCPT + 99 others); Mon, 16 Nov 2020 01:51:07 -0500 Received: from mailgw01.mediatek.com ([210.61.82.183]:56429 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727248AbgKPGvG (ORCPT ); Mon, 16 Nov 2020 01:51:06 -0500 X-UUID: 17fb1c7661d740e59a8e28bfec8058c8-20201116 X-UUID: 17fb1c7661d740e59a8e28bfec8058c8-20201116 Received: from mtkcas08.mediatek.inc [(172.21.101.126)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.14 Build 0819 with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1338968127; Mon, 16 Nov 2020 14:50:57 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs02n2.mediatek.inc (172.21.101.101) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 16 Nov 2020 14:50:56 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 16 Nov 2020 14:50:56 +0800 From: Stanley Chu To: , , , , CC: , , , , , , , , , , , , , , , , , Stanley Chu Subject: [PATCH v1 5/9] scsi: ufs-exynos: Use device parameter initialization function Date: Mon, 16 Nov 2020 14:50:50 +0800 Message-ID: <20201116065054.7658-6-stanley.chu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20201116065054.7658-1-stanley.chu@mediatek.com> References: <20201116065054.7658-1-stanley.chu@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: F7C328403594EF3E73E48010B0EA8562DABC4C1AE26A152F8097040FB84C7D3E2000:8 X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use common device parameter initialization function instead of initialziing those parameters by vendor driver itself. Signed-off-by: Stanley Chu --- drivers/scsi/ufs/ufs-exynos.c | 15 +-------------- drivers/scsi/ufs/ufs-exynos.h | 13 ------------- 2 files changed, 1 insertion(+), 27 deletions(-) diff --git a/drivers/scsi/ufs/ufs-exynos.c b/drivers/scsi/ufs/ufs-exynos.c index 5e6b95dbb578..a8770ff14588 100644 --- a/drivers/scsi/ufs/ufs-exynos.c +++ b/drivers/scsi/ufs/ufs-exynos.c @@ -617,20 +617,7 @@ static int exynos_ufs_pre_pwr_mode(struct ufs_hba *hba, goto out; } - - ufs_exynos_cap.tx_lanes = UFS_EXYNOS_LIMIT_NUM_LANES_TX; - ufs_exynos_cap.rx_lanes = UFS_EXYNOS_LIMIT_NUM_LANES_RX; - ufs_exynos_cap.hs_rx_gear = UFS_EXYNOS_LIMIT_HSGEAR_RX; - ufs_exynos_cap.hs_tx_gear = UFS_EXYNOS_LIMIT_HSGEAR_TX; - ufs_exynos_cap.pwm_rx_gear = UFS_EXYNOS_LIMIT_PWMGEAR_RX; - ufs_exynos_cap.pwm_tx_gear = UFS_EXYNOS_LIMIT_PWMGEAR_TX; - ufs_exynos_cap.rx_pwr_pwm = UFS_EXYNOS_LIMIT_RX_PWR_PWM; - ufs_exynos_cap.tx_pwr_pwm = UFS_EXYNOS_LIMIT_TX_PWR_PWM; - ufs_exynos_cap.rx_pwr_hs = UFS_EXYNOS_LIMIT_RX_PWR_HS; - ufs_exynos_cap.tx_pwr_hs = UFS_EXYNOS_LIMIT_TX_PWR_HS; - ufs_exynos_cap.hs_rate = UFS_EXYNOS_LIMIT_HS_RATE; - ufs_exynos_cap.desired_working_mode = - UFS_EXYNOS_LIMIT_DESIRED_MODE; + ufshcd_init_pwr_dev_param(&ufs_exynos_cap); ret = ufshcd_get_pwr_dev_param(&ufs_exynos_cap, dev_max_params, dev_req_params); diff --git a/drivers/scsi/ufs/ufs-exynos.h b/drivers/scsi/ufs/ufs-exynos.h index 76d6e39efb2f..06ee565f7eb0 100644 --- a/drivers/scsi/ufs/ufs-exynos.h +++ b/drivers/scsi/ufs/ufs-exynos.h @@ -90,19 +90,6 @@ struct exynos_ufs; #define SLOW 1 #define FAST 2 -#define UFS_EXYNOS_LIMIT_NUM_LANES_RX 2 -#define UFS_EXYNOS_LIMIT_NUM_LANES_TX 2 -#define UFS_EXYNOS_LIMIT_HSGEAR_RX UFS_HS_G3 -#define UFS_EXYNOS_LIMIT_HSGEAR_TX UFS_HS_G3 -#define UFS_EXYNOS_LIMIT_PWMGEAR_RX UFS_PWM_G4 -#define UFS_EXYNOS_LIMIT_PWMGEAR_TX UFS_PWM_G4 -#define UFS_EXYNOS_LIMIT_RX_PWR_PWM SLOW_MODE -#define UFS_EXYNOS_LIMIT_TX_PWR_PWM SLOW_MODE -#define UFS_EXYNOS_LIMIT_RX_PWR_HS FAST_MODE -#define UFS_EXYNOS_LIMIT_TX_PWR_HS FAST_MODE -#define UFS_EXYNOS_LIMIT_HS_RATE PA_HS_MODE_B -#define UFS_EXYNOS_LIMIT_DESIRED_MODE FAST - #define RX_ADV_FINE_GRAN_SUP_EN 0x1 #define RX_ADV_FINE_GRAN_STEP_VAL 0x3 #define RX_ADV_MIN_ACTV_TIME_CAP 0x9 -- 2.18.0