Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp806102pxa; Wed, 5 Aug 2020 13:14:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxn3BbGa03itdDX4YzBSMMi4js7JjiTTqwjSlhZUr41vOaNIYdIBRhmNbO8C2VLdJnZKjlA X-Received: by 2002:aa7:d350:: with SMTP id m16mr955534edr.169.1596658456580; Wed, 05 Aug 2020 13:14:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596658456; cv=none; d=google.com; s=arc-20160816; b=r9BOLx4lLla4iPZBuQH2UEK5RkPF8FRIGP2sllDcDVOtNTzGDQRRQQOIveG3Wkuc6W +XqbgtHDPSK+4eUkulWTxi8pWDRaw3F9dx/kA8rsBLFTX0T2bt7+YtjgAY9pgwIoh5Iq TTdUBd4kY/U57Ik1RCjsS0NmYXJ+w8YZehraTHLRDNaAQjoqPfGv1PeMG6HEbqfyxpWB 3xpoSPWk3uyJje/l5humis4ViyXcm4UDkf77I0tbXo6N/YEpj+YB073Okm/KwQ+4XVcV auViM7OAdArjMq2LYeEJu1NLZkDRyTDwMYtXjZgLTKb8i6oZnRbHwj2H+Db/C4ex4+SP Js+Q== 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=tWETgV80oKa12y7OJg8hJVWC3udr9qgCf1OmDSZNG+A=; b=ruNliGTX1uTVaaMEkcLFYWTDpsAqjz4C8fblE+in+ny4oXz7zwjAQSM8Vh/OB/3LpL CQKLLtuAwO6mZqDABhjR8Yjf7v5PEQiJMI7jRm0FsKI1ZLbNkH9aJMjH84S/VUJuZwkd TOBTVpLk6uU5MvirTPoMqCig0hk+8Jg1eaoFZaZ80sHBvvsxxvUjPNk/IzHceP5/0mKF OEHcESyE6lp02gjljxLPwB5J1s10DeWzUNHSXK5KXa0SSbFgQXWogKKimzxPpyE6TP4j qRpdYbIZeGlvAkGYSA4QrEViboGlN9qtA4Xaig918GbM7ReOS4K14TxZL52bZjGjYt6q w8UA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=mLoon+iK; 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 l30si1706956ede.434.2020.08.05.13.13.53; Wed, 05 Aug 2020 13:14:16 -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=mLoon+iK; 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 S1729602AbgHEUNq (ORCPT + 99 others); Wed, 5 Aug 2020 16:13:46 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:7990 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726776AbgHEQX1 (ORCPT ); Wed, 5 Aug 2020 12:23:27 -0400 X-UUID: 6e8e03a222d84d94b4a41ae4b8735427-20200805 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=tWETgV80oKa12y7OJg8hJVWC3udr9qgCf1OmDSZNG+A=; b=mLoon+iKJYOusow8i9mVk1uE6o8v6dFKOMBJGQjvP+D4Uw6UwG0pY0nKHax0pOdRdRoR0u0qPjYzxYrOq8b9WWaOUlyPQsdEs+a34g1GIXvvepB6/kvhAiCUTW6X9jEPeqnZmWlwjfTu0ho7uAJGfspt1jtu4xFunyvikQaPmL8=; X-UUID: 6e8e03a222d84d94b4a41ae4b8735427-20200805 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 1964303194; Wed, 05 Aug 2020 18:53:21 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs07n2.mediatek.inc (172.21.101.141) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 5 Aug 2020 18:53:17 +0800 Received: from localhost.localdomain (10.17.3.153) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 5 Aug 2020 18:53:18 +0800 From: Qii Wang To: CC: , , , , , , , Subject: [PATCH v3 2/4] i2c: mediatek: Add access to more than 8GB dram in i2c driver Date: Wed, 5 Aug 2020 18:52:20 +0800 Message-ID: <1596624742-14727-3-git-send-email-qii.wang@mediatek.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1596624742-14727-1-git-send-email-qii.wang@mediatek.com> References: <1596624742-14727-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 IG10a19pMmNfc2V0XzRnX21vZGUuDQoNClJldmlld2VkLWJ5OiBZaW5nam9lIENoZ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