Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp475784ybh; Wed, 22 Jul 2020 05:33:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyddu9e+n0uPQL3cwjXxwNx3uUTrLfj0tTf1c7W8HbPmWPcE9iGtXWrhRKOim6UEryeqIg9 X-Received: by 2002:aa7:c749:: with SMTP id c9mr30696234eds.107.1595421222489; Wed, 22 Jul 2020 05:33:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595421222; cv=none; d=google.com; s=arc-20160816; b=xvP7gFibkgCso0+vthob5vFPtEu5uFppZeDJCODl6KQ0wEwDNduPxQFNAj8vy3jc+D dl7aRwJSPPD/i0l2VTu0jti7ozHMI6DiJP97X0x+biz1xQwyNp01/AZJ3gdCHH9beEOO MVu2529i8HsLn6w4N10stS1aA2ac4qlFReACtSz7CFF2VF0d3m9l1fisokP2MjvbqEmW bzKU9hK0duXRMpuvN25wmFZJxBsTzvA4vBwyMe2jK7GJE5r88kS83Jal6+VEeXjR+q2v AS2Bj0tl49n9r01HeK65DCi+vrV8fU9pjEhGjD4nWhTo5t33qLSOalyjX/WGckBheX0u JHKw== 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=VDeeFSzCA5q8g3SgO7189jY/45GsdjKIUac8MfTLv1o=; b=yiiHMiJdgY7YoVtn7UsWOu0JozCcp0vaPwPS+L4W+HZhWsxRdrTW0gom/kQSraUV3G YdWWQYxAX9kc+T9Wm4dH3ei7Y1xBE3mU2zwJwGs0+fu+MQIj4Dx5htmXtxZHiKFF3t// f7iuUDRamKmIHitVm7San6mnlO+cWrXkN20bFKDNMmR07kvgt7XLfHGS5ZCY+BHR0A/L kpExelO6Ga18B+nX92KRume335xwNJUMY9ETJehStR9/RTfjDtA6l7K8e9cgxFSgBHmi yDliQ4vIfHGQXRAioxr0ZgRHKE/K6gIJDLRD0yn1U08giT7NPrO7dFQ0RYEw1KeRZl9d IQdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=eBTkJDsE; 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 i26si14325194edv.525.2020.07.22.05.33.19; Wed, 22 Jul 2020 05:33:42 -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=eBTkJDsE; 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 S1732319AbgGVMdK (ORCPT + 99 others); Wed, 22 Jul 2020 08:33:10 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:13957 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1732274AbgGVMdE (ORCPT ); Wed, 22 Jul 2020 08:33:04 -0400 X-UUID: 764e6db159f34b788511e6018696c519-20200722 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=VDeeFSzCA5q8g3SgO7189jY/45GsdjKIUac8MfTLv1o=; b=eBTkJDsEEHPif9vSwga4yO3P7719kylq5A52RiKElcytojiZ+AGVTaflszL7pd7OGqqYk/cZzP5XNuzRnvoOUA1wOsDTgGfCjx7fExZ055l/6r0UlYHqmyrm1sle64mnS2CllCH/wMzTIlI9eN6s5OhqS2fGQIxMM4YoCL1eSdw=; X-UUID: 764e6db159f34b788511e6018696c519-20200722 Received: from mtkcas10.mediatek.inc [(172.21.101.39)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 1451530593; Wed, 22 Jul 2020 20:32:58 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs07n1.mediatek.inc (172.21.101.16) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 22 Jul 2020 20:32:55 +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; Wed, 22 Jul 2020 20:32:54 +0800 From: Qii Wang To: CC: , , , , , , , , , Subject: [PATCH 2/4] i2c: mediatek: Support DMA mask range over 33-bits Date: Wed, 22 Jul 2020 20:31:44 +0800 Message-ID: <1595421106-10017-3-git-send-email-qii.wang@mediatek.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1595421106-10017-1-git-send-email-qii.wang@mediatek.com> References: <1595421106-10017-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 UmVwbGFjZSAnc3VwcG9ydF8zM2JpdHMgd2l0aCAnZG1hX21heF9zdXBwb3J0JyBmb3IgRE1BIG1h c2sNCm9wZXJhdGlvbiwgYW5kIHJlcGxhY2UgJ210a19pMmNfc2V0XzRnX21vZGUnIHdpdGggJ3Vw cGVyXzMyX2JpdHMnLg0KDQpTaWduZWQtb2ZmLWJ5OiBRaWkgV2FuZyA8cWlpLndhbmdAbWVkaWF0 ZWsuY29tPg0KLS0tDQogZHJpdmVycy9p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