Received: by 10.223.176.5 with SMTP id f5csp475461wra; Wed, 7 Feb 2018 02:25:02 -0800 (PST) X-Google-Smtp-Source: AH8x226B7gPkLQxj2msXt147l/Em6u4hqfRDGfL/2WSnWfLNSXphXZyYHXScBFLIAIKihMC3cg8d X-Received: by 2002:a17:902:5914:: with SMTP id o20-v6mr5659766pli.196.1517999102604; Wed, 07 Feb 2018 02:25:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517999102; cv=none; d=google.com; s=arc-20160816; b=DpFcJvm50n+IIhNu70WIap5FF70po2yJoDbnSkT07slowNHtx8a7JHW3x/h6bGdLKk t3lKqVkrTJSlls1jSdlIcfG05ggvJd2jf1Cj9rNeffd+hTJ3tDtWQ5FkIGkqdREGBxUI 8Fvg/jN/4p4miGqBWy4qZ4kQNYvSJuJ438FIVBsdfDnCS08KhEP3endGVEvnrIddQYlm XoZpWT71Np6zK5IhOKe7ZztdwQ+SrGWnCKiioX7/LXrWhOSstDMiDLiQkI4Wy8B3rHbC +jwIt7HnZ30AdYvIEq/ZhLGH6yymZYOQaattslesz4KKo4Yym+vQSeVy/f8iBgv1Tz1O +6gQ== 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:arc-authentication-results; bh=rjzmmmL6v0YMma3DKLJdfZ9hq5xpWkPj2FogtK/n7ZU=; b=JttxpGdgT6oW04f884JGFGwsmd5l3pwJc+VZ82m54pAPLKNjwuQTQEwhTjRmGV+57l HAElN6a9YF807Wqz3/ZZxBCzBcm9d3ZGYgAvvfKlIOv6LsTU9OS4vUxIbWG4ybMUxbVW bwCDQxNzobjIx98CUUYmAabaEZa4uSS2z9hEQLas5FM7uu3P2CpS4CAY8FiaevBZ6QHT PK7IyfTim7/U1hptt38IsdlHE/am8gVZYJvyBThyhmD0L1szTNjVtshQQv7k/RP4m4rb PDw4PCVDlY3fPzIjsME8aS41QQHDaEtD1hU+2FLeLlgtSqSM3G43AIGOamaRmnAUj4Dm uJ4w== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u17-v6si869966plj.646.2018.02.07.02.24.48; Wed, 07 Feb 2018 02:25:02 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753834AbeBGKX0 (ORCPT + 99 others); Wed, 7 Feb 2018 05:23:26 -0500 Received: from mailgw01.mediatek.com ([210.61.82.183]:20976 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1753675AbeBGKW7 (ORCPT ); Wed, 7 Feb 2018 05:22:59 -0500 X-UUID: 4d6d380a69b24900b75664282e1dd341-20180207 Received: from mtkexhb01.mediatek.inc [(172.21.101.102)] by mailgw01.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 726433044; Wed, 07 Feb 2018 18:22:54 +0800 Received: from mtkcas09.mediatek.inc (172.21.101.178) by mtkmbs08n1.mediatek.inc (172.21.101.55) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Wed, 7 Feb 2018 18:22:53 +0800 Received: from mtkswgap22.mediatek.inc (172.21.77.33) by mtkcas09.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1210.3 via Frontend Transport; Wed, 7 Feb 2018 18:22:53 +0800 From: To: , , , CC: , , , , , , Sean Wang Subject: [PATCH v2 3/4] soc: mediatek: avoid hardcoded value with bus_prot_mask Date: Wed, 7 Feb 2018 18:22:49 +0800 Message-ID: X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: 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 From: Sean Wang use a meaningful definition for bus_prot_mask instead of just hardcoded for it. Signed-off-by: Sean Wang --- drivers/soc/mediatek/mtk-scpsys.c | 5 +++-- include/linux/soc/mediatek/infracfg.h | 4 ++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/soc/mediatek/mtk-scpsys.c b/drivers/soc/mediatek/mtk-scpsys.c index 435ce5e..5346f33 100644 --- a/drivers/soc/mediatek/mtk-scpsys.c +++ b/drivers/soc/mediatek/mtk-scpsys.c @@ -518,7 +518,8 @@ static const struct scp_domain_data scp_domain_data_mt2701[] = { .name = "conn", .sta_mask = PWR_STATUS_CONN, .ctl_offs = SPM_CONN_PWR_CON, - .bus_prot_mask = 0x0104, + .bus_prot_mask = MT2701_TOP_AXI_PROT_EN_CONN_M | + MT2701_TOP_AXI_PROT_EN_CONN_S, .clk_id = {CLK_NONE}, .active_wakeup = true, }, @@ -528,7 +529,7 @@ static const struct scp_domain_data scp_domain_data_mt2701[] = { .ctl_offs = SPM_DIS_PWR_CON, .sram_pdn_bits = GENMASK(11, 8), .clk_id = {CLK_MM}, - .bus_prot_mask = 0x0002, + .bus_prot_mask = MT2701_TOP_AXI_PROT_EN_MM_M0, .active_wakeup = true, }, [MT2701_POWER_DOMAIN_MFG] = { diff --git a/include/linux/soc/mediatek/infracfg.h b/include/linux/soc/mediatek/infracfg.h index b0a507d..fd25f01 100644 --- a/include/linux/soc/mediatek/infracfg.h +++ b/include/linux/soc/mediatek/infracfg.h @@ -21,6 +21,10 @@ #define MT8173_TOP_AXI_PROT_EN_MFG_M1 BIT(22) #define MT8173_TOP_AXI_PROT_EN_MFG_SNOOP_OUT BIT(23) +#define MT2701_TOP_AXI_PROT_EN_MM_M0 BIT(1) +#define MT2701_TOP_AXI_PROT_EN_CONN_M BIT(2) +#define MT2701_TOP_AXI_PROT_EN_CONN_S BIT(8) + #define MT7622_TOP_AXI_PROT_EN_ETHSYS (BIT(3) | BIT(17)) #define MT7622_TOP_AXI_PROT_EN_HIF0 (BIT(24) | BIT(25)) #define MT7622_TOP_AXI_PROT_EN_HIF1 (BIT(26) | BIT(27) | \ -- 2.7.4