Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp784631ybb; Wed, 25 Mar 2020 09:31:34 -0700 (PDT) X-Google-Smtp-Source: ADFU+vumiBeZ+2vrZlZ9ayc35xV8G46sWsTpBFm2tzQyjAwrEW4CpNDZ74DyyP3yuqrWrS3awb79 X-Received: by 2002:aca:1303:: with SMTP id e3mr994566oii.36.1585153894168; Wed, 25 Mar 2020 09:31:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585153894; cv=none; d=google.com; s=arc-20160816; b=QXM6SPKubBYjXifoXX7QQO1+SBiG3mmKjiYLPQnOXSZXOlzfntKPROcakSClq4mAts 7eB55cDUthi773U8cLzHepGH3TGQb4HBiVwpUGU4iDDSm2F9un7RgsyEq4JrrAv/UlgC jhE5rOMPzBPg/9InuwoUXs9Gy/TCdQTFxA1YWWlKCcWWW24P9sQStkLT4f6sxqch2G3v iJtCqrMXl5TbSRd1foq2tEk0Mk685Ci4+919oQVt/zPXMFAtAd9qj1Pi4kYpH0O//MDD UcKxt9W/CSU4WCCqdn7SL/Wwi9/7ChrtBBlBw2sILkRdhlH9P6VvpCm0NmWBDMh1kpct KwPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type:content-language :thread-index:content-transfer-encoding:mime-version:message-id:date :subject:in-reply-to:cc:to:from:dkim-signature:dkim-filter; bh=Jjid3OCbf405YB87bLFZtPVycg3uhmaHWUs/g5VJJ6o=; b=EXH131rVAz5Gg9utJpkfjTFRHNbDRK8VxYh6R+Y2I71hlqDmHCLrF9C+d0rLUGg/vy hTJjIExk819rqpJKE3KAQCCD4HlqU8HHROcr6gO5jnxA+GhqI77j9nKD9vM87dnJWhsc Bf/hiE36egNU3PwIsUBzpe0PzDIAmrc7kH8F7YXY5q+gVwniRlNkCeIe94TJx60xtUPQ bLopYtGKWWsjisdnJVGJ+iQKZhwdzZ94ywxFCP8RF7/+i1VWkn4gUfWmdHgnsAbNqo1U 3rE1nde2uNIsgddi5NqY3iFjy+6VRovbIQRmVo/G1IuvI+PK3xzCJSxp3Zhky6YlacTf G9JA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=dtJhSVng; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id i6si4373oia.100.2020.03.25.09.31.20; Wed, 25 Mar 2020 09:31:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=dtJhSVng; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1728035AbgCYQar (ORCPT + 99 others); Wed, 25 Mar 2020 12:30:47 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:17986 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727901AbgCYQaq (ORCPT ); Wed, 25 Mar 2020 12:30:46 -0400 Received: from epcas5p2.samsung.com (unknown [182.195.41.40]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20200325163043epoutp027bbd19c68a2464221210e85a047fc76e~-mQWmj0rN1594015940epoutp02j for ; Wed, 25 Mar 2020 16:30:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20200325163043epoutp027bbd19c68a2464221210e85a047fc76e~-mQWmj0rN1594015940epoutp02j DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1585153843; bh=Jjid3OCbf405YB87bLFZtPVycg3uhmaHWUs/g5VJJ6o=; h=From:To:Cc:In-Reply-To:Subject:Date:References:From; b=dtJhSVngi3l9NjEsi0h0YOJ4cIW28aUohWkSm7yKxPXdJ8Q7b7x86W9bK8q7t3kBy E24sdUyngiWb8+/tsMSmTgZWRRuasboiJDSZr3Wi53bT0nPdbBbONOLECv03N3MFRg lqiDbYTYUHZPO2+dw+LisyhqoSbjAHtN7zevo7Bg= Received: from epsmges5p2new.samsung.com (unknown [182.195.42.74]) by epcas5p4.samsung.com (KnoxPortal) with ESMTP id 20200325163042epcas5p490063c18b7538d1328925e36189482ea~-mQWHQaXG0752507525epcas5p4C; Wed, 25 Mar 2020 16:30:42 +0000 (GMT) Received: from epcas5p2.samsung.com ( [182.195.41.40]) by epsmges5p2new.samsung.com (Symantec Messaging Gateway) with SMTP id C8.C7.04778.2378B7E5; Thu, 26 Mar 2020 01:30:42 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas5p3.samsung.com (KnoxPortal) with ESMTPA id 20200325163042epcas5p370e8e189e6a49f1f50cf5a68b52ab99e~-mQVZsL361415414154epcas5p3t; Wed, 25 Mar 2020 16:30:42 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20200325163042epsmtrp1c75f9412873cb3f7e4cfa973ceae2ae1~-mQVYxR4d2393323933epsmtrp19; Wed, 25 Mar 2020 16:30:42 +0000 (GMT) X-AuditID: b6c32a4a-33bff700000012aa-b1-5e7b87328ab7 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 9D.FB.04024.1378B7E5; Thu, 26 Mar 2020 01:30:41 +0900 (KST) Received: from alimakhtar02 (unknown [107.108.234.165]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20200325163038epsmtip228d90d395f59346c5ee1c4bc0a1d66fa~-mQSd_lDM3252832528epsmtip2c; Wed, 25 Mar 2020 16:30:38 +0000 (GMT) From: "Alim Akhtar" To: "'Avri Altman'" , , , Cc: , , , , , , , In-Reply-To: Subject: RE: [PATCH v3 4/5] scsi: ufs-exynos: add UFS host support for Exynos SoCs Date: Wed, 25 Mar 2020 22:00:36 +0530 Message-ID: <000001d602c2$b9a15f80$2ce41e80$@samsung.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQG8Fm24XBW91IxNCpc3FyucYAw+uQGZ6IyRAhOVxEQCiTgOcqhboVgA Content-Language: en-in X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrIKsWRmVeSWpSXmKPExsWy7bCmhq5Re3Wcwer5hhYvf15ls/i0fhmr xfwj51gtzp/fwG5xc8tRFotNj6+xWlzeNYfNYsb5fUwW3dd3sFksP/6PyaJ17xF2i6VbbzI6 8Hhc7utl8ti0qpPNY/OSeo+Wk/tZPD4+vcXi0bdlFaPH501yHu0HupkCOKK4bFJSczLLUov0 7RK4MlZOEy54JFExce9hxgbGOUJdjJwcEgImEj/nHGPqYuTiEBLYzSjx5e99KOcTo8Th5gus EM43RokDV2+wwLQ0dV1kArGFBPYyShxfbwZR9IZR4s6xm2BFbAK6EjsWt7GB2CICtRKLJ3eA TWIGGftt72SwIk6BWIkZB2+wg9jCAiESbbd/gDWwCKhKvPnaxwpi8wpYSny52cYOYQtKnJz5 BKyXWUBbYtnC18wQFylI/Hy6jBVimZvE7T3H2SBqxCWO/uyBqlnGLrGkWwzCdpH49+QSK4Qt LPHq+BZ2CFtK4mU/yC4OIDtbomeXMUS4RmLpvGNQz9tLHLgyhwWkhFlAU2L9Ln2ITXwSvb+f MEF08kp0tEFDV1Wi+d1VqE5piYnd3VBLPSR+LjzDOIFRcRaSv2Yh+WsWkvtnISx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ip+Wgnb+k4kJu3/vj+4/GFcKce9 Cqu/3t/8/+omtwSdaWs58/VR6F/N9a6eex8WXcoK0vn5f93fhZrF5zqkmn13iu44n6Gj2s+e P0ky5X9o5wGviKV3Fqh+YeKLWp7x/WH4gz8frgrmO22J93jvv/yngI/JSSWW4oxEQy3mouJE AIp7gdjMAgAA X-CMS-MailID: 20200325163042epcas5p370e8e189e6a49f1f50cf5a68b52ab99e X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" CMS-TYPE: 105P X-CMS-RootMailID: 20200319150710epcas5p11411da0ec2d56b403b80a206ce38a92b References: <20200319150031.11024-1-alim.akhtar@samsung.com> <20200319150031.11024-5-alim.akhtar@samsung.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Avri Thanks for review, see my comment inline below > -----Original Message----- > From: Avri Altman > Sent: 22 March 2020 17:54 > To: Alim Akhtar ; robh+dt=40kernel.org; > devicetree=40vger.kernel.org; linux-scsi=40vger.kernel.org > Cc: krzk=40kernel.org; martin.petersen=40oracle.com; kwmad.kim=40samsung.= com; > stanley.chu=40mediatek.com; cang=40codeaurora.org; linux-samsung- > soc=40vger.kernel.org; linux-arm-kernel=40lists.infradead.org; linux- > kernel=40vger.kernel.org > Subject: RE: =5BPATCH v3 4/5=5D scsi: ufs-exynos: add UFS host support fo= r Exynos > SoCs >=20 > > +static int exynos7_ufs_pre_link(struct exynos_ufs *ufs) =7B > > + struct ufs_hba *hba =3D ufs->hba; > > + u32 val =3D ufs->drv_data->uic_attr->pa_dbg_option_suite; > Can pa_dbg_option_suite be replaced by a macro? >=20 Going forward, I have plan to add multiple Samsung/Exynos SoC variants, whi= ch will have its own drv_data. For that reason I kept it. Let me have a relook on this. > > + exynos_ufs_disable_ov_tm(hba); > > + > > + ufshcd_dme_set(hba, UIC_ARG_MIB(PA_DBG_OPTION_SUITE_DYN), > > 0xf); > > + ufshcd_dme_set(hba, UIC_ARG_MIB(PA_DBG_OPTION_SUITE_DYN), > > 0xf); > A typo? Set PA_DBG_OPTION_SUITE_DYN twice? >=20 Ack, will change > > +=23define PWR_MODE_STR_LEN 64 > > +static int exynos_ufs_post_pwr_mode(struct ufs_hba *hba, > > + struct ufs_pa_layer_attr *pwr_max, > > + struct ufs_pa_layer_attr *pwr_req) =7B > > + struct exynos_ufs *ufs =3D ufshcd_get_variant(hba); > > + struct phy *generic_phy =3D ufs->phy; > > + struct uic_pwr_mode *pwr =3D &ufs->pwr_act; > > + char pwr_str=5BPWR_MODE_STR_LEN=5D =3D =22=22; > Un-needed complication IMO - all those snprintf that is. >=20 You mean pwr_str initialization is not needed here? > > + > > +static void exynos_ufs_fit_aggr_timeout(struct exynos_ufs *ufs) =7B > > + const u8 cntr_div =3D 40; > Can be replaced by a macro? >=20 Sure, will change. > > +struct exynos_ufs_drv_data exynos_ufs_drvs =3D =7B > > + > > + .compatible =3D =22samsung,exynos7-ufs=22, > > + .uic_attr =3D &exynos7_uic_attr, > > + .quirks =3D UFSHCD_QUIRK_PRDT_BYTE_GRAN =7C > > + UFSHCI_QUIRK_BROKEN_REQ_LIST_CLR =7C > > + UFSHCI_QUIRK_BROKEN_HCE =7C > > + UFSHCI_QUIRK_SKIP_RESET_INTR_AGGR, > > + .opts =3D EXYNOS_UFS_OPT_HAS_APB_CLK_CTRL =7C > > + EXYNOS_UFS_OPT_BROKEN_AUTO_CLK_CTRL = =7C > > + EXYNOS_UFS_OPT_BROKEN_RX_SEL_IDX, > In what way opts are different from quirks? >=20 Similar to quirks, but only specific to controller local control, like rela= ted to APB interface and clock control. These doesn't need a change in common ufshcd core. So kept as opts. Will fix your comments and submit v4 soon. Thanks. >=20 > Thanks, > Avri