Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5047787ybl; Mon, 9 Dec 2019 22:49:15 -0800 (PST) X-Google-Smtp-Source: APXvYqwHP1tuVBRZxW4Sf+MNooYEtwXK037Y2SCY8WxJJzxwUb/uAjvpIt5/dusIdyxbh1clHo2y X-Received: by 2002:a05:6808:356:: with SMTP id j22mr2823385oie.130.1575960555272; Mon, 09 Dec 2019 22:49:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575960555; cv=none; d=google.com; s=arc-20160816; b=J6PNcUFXfzKgL6rN8T2DmZcFEr28wSLI+KCzbK6zEw0r5Qa/74SJB1nY+TY1KZyPHf V6LGIqYf1FGg2DG50yhGsJL+t6c9eHwwqHMdkmtBKfK7m6A2x7ag5UViaZem13hb3DN/ zsQN+88D7rp/M4ywYtaSkldh2Z0Yl9I3um13bNdA0QcC+sXc/11ZDs+qu8ZdcrevJyD4 VnbFcW9MHaTK/kRm979nrls4MDLM/bl3TdX9lB6rrZLmPGFWvSy1mBbmJFHy6jLIni68 a6x3iO9POePYFbOecukMN79iTStYx3KDPFCpIoW8TzmRv6QljhkQXNfGSuBywSEsnffV 9Z9w== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ai83lkRZuFOgtY+3u7a04aruj+ClqIiFf4wVmnoTgw8=; b=e0P/jeVwRPqg9wBs1nhNlnClkBAo5gpblf5e25kaPRgpTinNlfLcBG94wggcqp0Ey9 AISd0XCgPORO0R8WrG5ICuwOlFTO2zfhaiKb+gCu8mp3+q4yZP4wkB1XEf4LmqMxo7Gr aF7L/gXWwgRP0I0/EOBpVikBDOuqEDzVp2xJctVrtm0Glw6DHZ594mnriK9e0wySBoDX gFCf+72XNsUZ76/5cfXohdXUeUol/aSSCIYWuAxcHxNU39e0C916LlVQFUrptIbgMF3G dvPKK3qXof+vRc4GpzZmO7wW75AydEY35ryFYLjJ6AvzmWF04AgZ5qEfhxaUzqwT5rVQ 0gCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=uMdtqez5; 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=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l84si1375734oig.5.2019.12.09.22.49.02; Mon, 09 Dec 2019 22:49:15 -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; dkim=pass header.i=@mediatek.com header.s=dk header.b=uMdtqez5; 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=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727420AbfLJGr3 (ORCPT + 99 others); Tue, 10 Dec 2019 01:47:29 -0500 Received: from mailgw02.mediatek.com ([210.61.82.184]:5886 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727310AbfLJGrY (ORCPT ); Tue, 10 Dec 2019 01:47:24 -0500 X-UUID: 9cda9c2500d34e9aa6dcd86457821374-20191210 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=ai83lkRZuFOgtY+3u7a04aruj+ClqIiFf4wVmnoTgw8=; b=uMdtqez5pio9GUXxJtc/IVEAaHlFDD9P9HpOSwTkAJGIkuRjnp9YN0gao2zyjc3HYAm/0tlJKkt1yxPb758WllddOy2SRBrTArGzQNL8/1MZ8Ibm86EtIR3hhf8nKCbpWZwNsdYHIuZM5Fd1muPIQSJYOB0JbJNZ3zedII25RBQ=; X-UUID: 9cda9c2500d34e9aa6dcd86457821374-20191210 Received: from mtkexhb01.mediatek.inc [(172.21.101.102)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 647363418; Tue, 10 Dec 2019 14:47:13 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs07n2.mediatek.inc (172.21.101.141) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 10 Dec 2019 14:46:58 +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; Tue, 10 Dec 2019 14:47:17 +0800 From: Weiyi Lu To: Nicolas Boichat , Matthias Brugger , Rob Herring CC: James Liao , Fan Chen , , , , , Weiyi Lu , Yong Wu Subject: [PATCH v9 4/9] soc: mediatek: Add multiple step bus protection control Date: Tue, 10 Dec 2019 14:46:48 +0800 Message-ID: <1575960413-6900-5-git-send-email-weiyi.lu@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty In-Reply-To: <1575960413-6900-1-git-send-email-weiyi.lu@mediatek.com> References: <1575960413-6900-1-git-send-email-weiyi.lu@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Content-Transfer-Encoding: base64 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Qm90aCBNVDgxODMgJiBNVDY3NjUgaGF2ZSBtb3JlIGNvbnRyb2wgc3RlcHMgb2YgYnVzIHByb3Rl Y3Rpb24NCnRoYW4gcHJldmlvdXMgcHJvamVjdC4gQW5kIHRoZXJlIGFkZCBtb3JlIGJ1cyBwcm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