Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1018729ybh; Wed, 22 Jul 2020 20:44:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJznjBzagc6uwOcocSq7Jba4IPnVFFM0psxJlFnZXswMh4WhBLXw+zgR4o/oFhoqE6h4hEjK X-Received: by 2002:a05:6402:b1a:: with SMTP id bm26mr2338831edb.144.1595475845683; Wed, 22 Jul 2020 20:44:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595475845; cv=none; d=google.com; s=arc-20160816; b=MVpNci4r4raeZ2E/jJcGBVcFMwp38/BL+KZvEULbyxhSlizsxP6wDTM08gVBWRRMRp hs9ZW5IwCLGikVwnGjtYv8U8S3O9le8D7onHNmU+aiSTolDVjS7TzUmk+sovXAmUrOZj MDeNMAgJOUTfjwXikCmT5xFNj3D+4JRCG3YlYZdqfSffj2V4IExTaw2bS2F1nWJ7IJjd XnN1YHup3VVP0W+2/4+PvXVUoRBzBix7CGkYcmUVxxPkDGbTzNxC4qHfQ3W6fgw6/33z djXa8sSbCMtnFv8K1QWBKL2x19kYW7YGIoAqNKsLHcjwg0Ui8NXMEIWhudnZFvB/Uyp4 oczg== 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=SrPkUP8o0qnzmuIeH5BNsY2yvlNKAkq0haYDD/az/v4=; b=tRZhTlJkL94Bhv/IOPwN1avFXyql+MoZ5GL6XH7Zl8aPsskE5Mayslg2PqkgzY1eZq hpV0Z9y94pVOE5biEM04UL9WepOYMDwOE4QwyLHLXCOVthnhqIm1NHv5ODaGf9MvFgcb EMe7ZUPo9eFdv9K83uVBlAU6nvo80CATbGYx1x6IO7ekvOlvVRxHfrb+UcZoQxsmMfZo 2hMgz/iJXW/+i4oOPRzDtggz8Kf+myJsLBjGAUt2eFAzWdGbO19pxfg1HoOJRmbvl9pd sNiim3/PFr9VomA0SkRsMZH9pyOz8EAuasFz1swJoioOYWS6HEAeZf/S1/kYkLmSco+F yUvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=MYReN72H; 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=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d9si1196654ejz.107.2020.07.22.20.43.42; Wed, 22 Jul 2020 20:44:05 -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=@mediatek.com header.s=dk header.b=MYReN72H; 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=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387830AbgGWDke (ORCPT + 99 others); Wed, 22 Jul 2020 23:40:34 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:11888 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S2387761AbgGWDk1 (ORCPT ); Wed, 22 Jul 2020 23:40:27 -0400 X-UUID: 9177e58d825e47298e4fcb6092c962d6-20200723 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=SrPkUP8o0qnzmuIeH5BNsY2yvlNKAkq0haYDD/az/v4=; b=MYReN72H99jSPvijojwikF+OpV7TeHlX5aQ8MK16SvcRn9PkKLVHWZPR/OJt8HHK34e9aFa7VlGSuQjUaQoDQU/AuZy70ctN1/mdyxLyusU3HlkLg2gTjlnqeo1ufR1pwe0GMtscBdEoXBvkrZIMVP0UYXTdKmweaY0FR14qWbI=; X-UUID: 9177e58d825e47298e4fcb6092c962d6-20200723 Received: from mtkexhb02.mediatek.inc [(172.21.101.103)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 1340201786; Thu, 23 Jul 2020 11:40:20 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs05n1.mediatek.inc (172.21.101.15) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 23 Jul 2020 11:40:18 +0800 Received: from mtksdaap41.mediatek.inc (172.21.77.4) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 23 Jul 2020 11:40:15 +0800 From: Hsin-Hsiung Wang To: Rob Herring , Matthias Brugger , Argus Lin CC: Hsin-Hsiung Wang , , , , , srv_heupstream Subject: [PATCH v2 2/4] soc: mediatek: pwrap: add arbiter capability Date: Thu, 23 Jul 2020 11:39:58 +0800 Message-ID: <1595475600-23180-3-git-send-email-hsin-hsiung.wang@mediatek.com> X-Mailer: git-send-email 2.6.4 In-Reply-To: <1595475600-23180-1-git-send-email-hsin-hsiung.wang@mediatek.com> References: <1595475600-23180-1-git-send-email-hsin-hsiung.wang@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 QWRkIGFyYml0ZXIgY2FwYWJpbGl0eSBmb3IgcHdyYXAgZHJpdmVyLg0KVGhpcyBwYXRjaCBpcyBw cmVwYXJpbmcgZm9yIGFkZGluZyBtdDY4NzMvODE5MiBwd3JhcCBzdXBwb3J0Lg0KDQpTaWduZWQt b2Z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