Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2149186pxa; Mon, 3 Aug 2020 08:38:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxj1ee+ux+RjD9+nlxyhevBWie093TDnI/EvLWkapH9+P2dIKvb+IyifMUduRS6tt8ngNmW X-Received: by 2002:a50:9e6f:: with SMTP id z102mr16683914ede.300.1596469138861; Mon, 03 Aug 2020 08:38:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596469138; cv=none; d=google.com; s=arc-20160816; b=UEW3TCvrrcu44lTHu4bw9tmE5K9+q4uwQIgFfrGP6kP548p8AX2k5WWe9xTILePAvv EorsxKWt8kAYNyMKj5/JsOLU4Mz3ZozEF74+1HlMQqTSHvkfXxdjXd4cdemgXiwbt8A2 0Y1cJjszOoZBD21Q8QaS0CxqprSPMxGrbrojNk6eoFk74x+4NGFQ3Dj3V94cU+eh/HDu rUCfZkQBmPOiqxt5WUBhQJ14qNfFO2qKvPs5MUpfT8X1wi5QKpJ+aPYpsgLUysq1jBhc A32R6q7Q4wvePofTklQH2O30VR6wl6QD+gSebn8fs6hJo7hwXy6VogWTZib61s6a93wl 6HXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=DpczzwsdVkJSV92Pnu5sTS7zZ+/8U3WWphC0qrUf6cg=; b=rm+XJxFZ5jx4/9z8spJlNJQUu+P6u97dAA1XdXc61ZPCXItVWq0YVPrIEu33m5ZT6U iCoadEY/tiaG36IYWmZ/8GuEjzMoO6pYC08B7D/qvKBE16T0iCNjUhNGb1d46zUhDMRE HVwr6aV6cijyIhJXGjlWkD0sVMggP4U4RlgjFmDWU13d2cmQwwDu+SvAUmz7d9E1vnC2 sh9SkaevYD9196AY5yHD1ghUL7lDznbaM7yyxTisESBIBfqeeuOUk7sKsKcL/81JUpYm psr5jdN37uUOBnm4dAdcselZhkQnDJYTISJhJy6eIxPEGJWFA4E6fuPlatNmiSSt8L92 UF8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="pC/KVE5S"; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k18si10067646ejp.753.2020.08.03.08.38.34; Mon, 03 Aug 2020 08:38:58 -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=@kernel.org header.s=default header.b="pC/KVE5S"; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726925AbgHCPiW (ORCPT + 99 others); Mon, 3 Aug 2020 11:38:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:37028 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725945AbgHCPiW (ORCPT ); Mon, 3 Aug 2020 11:38:22 -0400 Received: from mail-ej1-f41.google.com (mail-ej1-f41.google.com [209.85.218.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9D3422076C; Mon, 3 Aug 2020 15:38:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596469100; bh=VGGeypM3Y8d4rW8Akt3xtmhJwtC3U7dVg9Cx0Njqevg=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=pC/KVE5SCSZWrzVR8rov+RgaeDIeFWUHety8ET9Hg7JeRcy9gSf4G+AQ0onwO00Ew QXaBBP0qFAKninI1M7yRvb3Og9QlNns1KhGmBNS9JE1PykiuedRdGXu1iQrDTY1r3e kQAR4HGgKjBHHfLgTivocZk47DnNmusgrBgdY+/s= Received: by mail-ej1-f41.google.com with SMTP id o18so39081640eje.7; Mon, 03 Aug 2020 08:38:21 -0700 (PDT) X-Gm-Message-State: AOAM531gd7hUqX/aO13XUsU8jFNkJ4zT1l82/S1CfQSiaiXHOg+sJUh+ RvdVpXZ+4o0WnM6Yyb9JvJoIuuaZapyYYAodIQ== X-Received: by 2002:a17:906:f14f:: with SMTP id gw15mr16562338ejb.245.1596469100238; Mon, 03 Aug 2020 08:38:20 -0700 (PDT) MIME-Version: 1.0 References: <1596010690-13178-1-git-send-email-neal.liu@mediatek.com> <1596010690-13178-3-git-send-email-neal.liu@mediatek.com> <1596427546.22971.23.camel@mtkswgap22> In-Reply-To: <1596427546.22971.23.camel@mtkswgap22> From: Chun-Kuang Hu Date: Mon, 3 Aug 2020 23:38:07 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v4 2/2] soc: mediatek: add mtk-devapc driver To: Neal Liu Cc: Chun-Kuang Hu , Rob Herring , Matthias Brugger , devicetree@vger.kernel.org, wsd_upstream , lkml , "moderated list:ARM/Mediatek SoC support" , Linux ARM Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Neal Liu =E6=96=BC 2020=E5=B9=B48=E6=9C=883=E6=97= =A5 =E9=80=B1=E4=B8=80 =E4=B8=8B=E5=8D=8812:05=E5=AF=AB=E9=81=93=EF=BC=9A > > Hi Chun-Kuang, > > On Sun, 2020-08-02 at 07:50 +0800, Chun-Kuang Hu wrote: > > Hi, Neal: > > > > Neal Liu =E6=96=BC 2020=E5=B9=B47=E6=9C=8829=E6= =97=A5 =E9=80=B1=E4=B8=89 =E4=B8=8B=E5=8D=884:29=E5=AF=AB=E9=81=93=EF=BC=9A > > > > > > MediaTek bus fabric provides TrustZone security support and data > > > protection to prevent slaves from being accessed by unexpected > > > masters. > > > The security violation is logged and sent to the processor for > > > further analysis or countermeasures. > > > > > > Any occurrence of security violation would raise an interrupt, and > > > it will be handled by mtk-devapc driver. The violation > > > information is printed in order to find the murderer. > > > > > > Signed-off-by: Neal Liu > > > --- > > > > [snip] > > > > > + > > > +struct mtk_devapc_context { > > > + struct device *dev; > > > + u32 vio_idx_num; > > > + void __iomem *devapc_pd_base; > > > > This is devapc context, so prefix 'devapc' is redundant. > > And, what does 'pd' mean? > > 'pd' means power down. Of course we would also remove it as well. > I suggest to change it as 'infra_base'. This is OK for me. > > > > > Regards, > > Chun-Kuang. > > > > > + struct mtk_devapc_vio_info *vio_info; > > > + const struct mtk_devapc_pd_offset *offset; > > > + const struct mtk_devapc_vio_dbgs *vio_dbgs; > > > +}; > > > + >