Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp578079ybl; Wed, 28 Aug 2019 02:13:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqzi07/JhOzyH2H+FkFozD3YBOqBGTZCGgWLpZfJLlPxwHgPp1DbB4pMm1bJLAOWfYab9495 X-Received: by 2002:a17:902:a01:: with SMTP id 1mr3352282plo.278.1566983599302; Wed, 28 Aug 2019 02:13:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566983599; cv=none; d=google.com; s=arc-20160816; b=NeFUuGaapIvnGKSukpqNKaZIRAqlR3AndjocwI1zACfoQ8A+6uY273MOZOQWQZ1jrL VY6/cjiqaKkBs91hnfg5iaZ9nHHR+vVRiC3rgcBeVULXdCPyR0CEpnGtTOHf9kW5H8QF eByB0EE3HDytoL09/CUpWEApYXftGtyP3lVh8TRpMWxr1DL5Af4AC/iH42De1H/5nEv+ TBuQ3xTIKMukoP0gJ5vZGdF2k1qPucuByrb9ijk4nmTQU2WO/rBBwWIwqKXRwJDG4EtJ nkxg3QTkKP1qC73KgvpG5Q4i2EDthtSdmDEoIwNHdQ07tWzFrgKJrYuuntQkXYDb7WYF xtHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=RMw2HMZYHmHZVfiTYqn16v+gkkar/SDnhDnH/XnMmd4=; b=f6QAFBXGOt2yyBMemekoUQsl+MlIyr6vaWVZpKpdhHKb9JlOorRLBoxJB/O9baHXPU VDBsjNBWanjy8/QeV6L1KDWCx3ZspZ3kunF4/qaxZ5axvl17TkmEUGBAC2JWeDw/wdYb /I360wEfg8m3eR6kpmW8DV4nMcQpPEfeX2XzymZFxtdlzsI8CC8PSYRNL9LVeKuSc9Cr /u3MfKbcfXlItgMztSJuXGwbIFtCuDotDvvC9MvZ67b22R7nozx5qUxo19Ds9IUB8oLT mYAJ3uVwTd1NIpz9fenCX0Kpc6DWCRDqCRdQKS/27rgkddZRS1lz0aBUz/mX2X7Nn3oc kE5A== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b5si1681737pgq.355.2019.08.28.02.13.03; Wed, 28 Aug 2019 02:13:19 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726738AbfH1JMF (ORCPT + 99 others); Wed, 28 Aug 2019 05:12:05 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:25511 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726408AbfH1JME (ORCPT ); Wed, 28 Aug 2019 05:12:04 -0400 X-UUID: 4c1be4bdcdd8419ca0e2f7c55482f8f8-20190828 X-UUID: 4c1be4bdcdd8419ca0e2f7c55482f8f8-20190828 Received: from mtkcas09.mediatek.inc [(172.21.101.178)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 525857148; Wed, 28 Aug 2019 17:11:58 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs01n1.mediatek.inc (172.21.101.68) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 28 Aug 2019 17:12:04 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Wed, 28 Aug 2019 17:12:04 +0800 From: Weiyi Lu To: Nicolas Boichat , Matthias Brugger , Rob Herring CC: James Liao , Fan Chen , , , , , Weiyi Lu , Yong Wu Subject: [PATCH v7 03/13] soc: mediatek: Refactor polling timeout and documentation Date: Wed, 28 Aug 2019 17:11:36 +0800 Message-ID: <1566983506-26598-4-git-send-email-weiyi.lu@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty In-Reply-To: <1566983506-26598-1-git-send-email-weiyi.lu@mediatek.com> References: <1566983506-26598-1-git-send-email-weiyi.lu@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use USEC_PER_SEC to indicate the polling timeout directly. And add documentation of scp_domain_data. Signed-off-by: Weiyi Lu --- drivers/soc/mediatek/mtk-scpsys.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/soc/mediatek/mtk-scpsys.c b/drivers/soc/mediatek/mtk-scpsys.c index 503222d..e97fc0e 100644 --- a/drivers/soc/mediatek/mtk-scpsys.c +++ b/drivers/soc/mediatek/mtk-scpsys.c @@ -21,7 +21,7 @@ #include #define MTK_POLL_DELAY_US 10 -#define MTK_POLL_TIMEOUT (jiffies_to_usecs(HZ)) +#define MTK_POLL_TIMEOUT USEC_PER_SEC #define MTK_SCPD_ACTIVE_WAKEUP BIT(0) #define MTK_SCPD_FWAIT_SRAM BIT(1) @@ -108,6 +108,17 @@ enum clk_id { #define MAX_CLKS 3 +/** + * struct scp_domain_data - scp domain data for power on/off flow + * @name: The domain name. + * @sta_mask: The mask for power on/off status bit. + * @ctl_offs: The offset for main power control register. + * @sram_pdn_bits: The mask for sram power control bits. + * @sram_pdn_ack_bits: The mask for sram power control acked bits. + * @bus_prot_mask: The mask for single step bus protection. + * @clk_id: The basic clocks required by this power domain. + * @caps: The flag for active wake-up action. + */ struct scp_domain_data { const char *name; u32 sta_mask; -- 1.8.1.1.dirty