Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp262354ybg; Tue, 28 Jul 2020 05:32:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy6qu0r0/IE4v4h2hiefe3RdV/m2JRmc6Ab7pdJ4sEFqnJh2xo2NQPorYWoIrBNGPWS9Wex X-Received: by 2002:aa7:d7d7:: with SMTP id e23mr9555657eds.347.1595939561312; Tue, 28 Jul 2020 05:32:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595939561; cv=none; d=google.com; s=arc-20160816; b=tNup60Jcgdp8Ic8lx3d58LEYdYni7GzK0R6spbcg3BLWymv4o+7vO3L1d9XimkcdHH 4E+fcWjDN55zn0fAGlS08JdjRjI2/WJSgq4ijoMjYQDTmfpasZDPySRBDTnnuNvFH8Jt tL3f2k9iuCTxgjwt1/J3zjVYK03nl3oT4R22AihmT9XU2ajp91D2L3v6Ft11YLKcD65L 6EI5OypmAK3Mlj2N9BgKQYYi3qSttCQuQdVKTXChFD7vOVddjA9xi06HQ0Ap1WQV3YbR rSyEpl/6fBiarv7nWDoffgcOfBOpktxXJzx7jHfAQh0+5hxqgMCCviNDp/+eKsRrkcuB laPA== 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=5uP+aIDy6VjZk5zmzE0452gd7yHiCSfjQ3mMWdIPP5M=; b=DdsUIG33cff7fdAyIMLk+lYt+QKnOO2fmFj9RaxM4FdY6yGCeTVzsfvj8IxfX8GjG/ PKXR/H5iGXqzi9ZKou7lc5+QFnIqKcrEPBY8dbrZBneflGJyN2SGCoHHVeJK7JZTpyiX 10CJK8Sd4Z2S3q4m1WKkfRtkmQUI7A9uYnsak+9MzzbYaMqdONMLWP3EgDrepPozkLVL O2eKOPGZEhf3uP4wtU487ltSlOGY81b7kIO68vxUibeYJRbI72+M1bSXbqbdzyWkm/eK Flm94uxoYLhHtVb9GR8dxkkHD/vhCrUbKh5zLZNdYq3qkKVpGXgQNXjPK11MO1UZrEHE pIKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=fg4+0vcA; 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 la26si6927092ejb.587.2020.07.28.05.32.18; Tue, 28 Jul 2020 05:32:41 -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=fg4+0vcA; 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 S1729666AbgG1Mbk (ORCPT + 99 others); Tue, 28 Jul 2020 08:31:40 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:62291 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1729572AbgG1Mbj (ORCPT ); Tue, 28 Jul 2020 08:31:39 -0400 X-UUID: 8172566aff294e9b95a7a799b2dc42f4-20200728 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=5uP+aIDy6VjZk5zmzE0452gd7yHiCSfjQ3mMWdIPP5M=; b=fg4+0vcAwpzrqgxR8nh5RH64spNHJ54OLwzNcRJ5HIoUP4VnJ3ba1jCJ6hWiCQ969xBvKNt7P9IEQ+ESFMizxHR9+1kemXgmDDMqY9NGt4Cqb9C56Na2Is19H+j+5z5PMVtUHQWJNcwRxmp6E9ogEix4ByliwuDFTkqZIMjeLAo=; X-UUID: 8172566aff294e9b95a7a799b2dc42f4-20200728 Received: from mtkcas06.mediatek.inc [(172.21.101.30)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 698996252; Tue, 28 Jul 2020 20:31:34 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs07n2.mediatek.inc (172.21.101.141) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 28 Jul 2020 20:31:30 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Tue, 28 Jul 2020 20:31:30 +0800 From: Qii Wang To: CC: , , , , , , , , , Subject: [PATCH v2 2/4] i2c: mediatek: Add access to more than 8GB dram in i2c driver Date: Tue, 28 Jul 2020 20:30:44 +0800 Message-ID: <1595939446-5484-3-git-send-email-qii.wang@mediatek.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1595939446-5484-1-git-send-email-qii.wang@mediatek.com> References: <1595939446-5484-1-git-send-email-qii.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 TmV3ZXIgTVRLIGNoaXAgc3VwcG9ydCBtb3JlIHRoYW4gOEdCIG9mIGRyYW0uIFJlcGxhY2Ugc3Vw cG9ydF8zM2JpdHMNCndpdGggbW9yZSBnZW5lcmFsIGRtYV9tYXhfc3VwcG9ydCBhbmQgcmVtb3Zl IG10a19pMmNfc2V0XzRnX21vZGUuDQoNClNpZ25lZC1vZmYtYnk6I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