Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3511529pxk; Mon, 28 Sep 2020 21:34:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyGeNFaanR0ZlkwIt9Kqg+UiXit4mzTngtXzvf+genr6noTaHfac2tym0fwwoCfev5g89d5 X-Received: by 2002:a17:906:3955:: with SMTP id g21mr1994462eje.69.1601354080623; Mon, 28 Sep 2020 21:34:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601354080; cv=none; d=google.com; s=arc-20160816; b=F0319ZgBR+v2rFck/BSQcXmhiuoaWXxxDaUIbxVpX1UggPcyXJy+ksZjYF38aRZ5Qd O6s8gmh0or7NnAzvXgfOVCrIDBfklyP+A1GuvoODj4ygA56jyArrFt+EAXn8hvj3sBzs TyvA5NsuIlgshxD1VnrDSmIws1VwK6JFvQOzyMpe6HJtLaEoC51H1cdKzbVGohqC53f1 CtFD2+AEsuPwmHmzbL5tilR3DVhuxahyYLpKYq5nb1UxFxrIlK8xUTKwFrKdIOJLF+Jf tjCVMUcBBSKZ0qzsnvkyWHxkUpup2dNtZKXXLEL98ZZq/b6e8lX3M+GVvDvo11DQN6vo +wBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature; bh=b2qt9IXSglEYTvFdMvrq4iU5cQmuNElICDaA7FuwFIc=; b=n+m29p61Xx00rzQ/UAhf5S1itdme1RuB3dKDIQJ2Z80IwpN08RMWeq2TkE16iomJau qL/ec0JDnG9DswvwDE6MeIdJI0p3wcdspMMmxEmjs4d+FmcUDX8VbENrVQmNFSP9bdBb qPY8bc6MgdzCFK9HNc59k0qPAczim9y+9a/eLJlnkes6KZ/2drBHvftUwZ7uJn0qhfmr s1I+mpCRlv2322gIGLrMKzzeBs1Sj09iowJuWamNvrMdhKGwCelCN/pjHCadAAMQqelt r6vEzqnPOpRX9OPOOABFh3eVE2f+mAGvHvKAC2bUWTIe+/CyODVaKqEZZupXMHCjq+qQ 16AQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=TecinOec; 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 dj21si1861930edb.310.2020.09.28.21.34.07; Mon, 28 Sep 2020 21:34:40 -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=TecinOec; 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 S1725554AbgI2EbF (ORCPT + 99 others); Tue, 29 Sep 2020 00:31:05 -0400 Received: from Mailgw01.mediatek.com ([1.203.163.78]:50421 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725306AbgI2EbF (ORCPT ); Tue, 29 Sep 2020 00:31:05 -0400 X-UUID: 47f11ed42d164e4eb84d09ed5c54a45f-20200929 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:MIME-Version:Content-Type:References:In-Reply-To:Date:CC:To:From:Subject:Message-ID; bh=b2qt9IXSglEYTvFdMvrq4iU5cQmuNElICDaA7FuwFIc=; b=TecinOecVDsx3s3gavg8IqmXhA1ThekN7FTy4kpnrJ4XTfchAkpSloqpYgQKXFuYdiIqK7aigPOeNp9SuVUvz2ZVwHLQMLGGHGfgqft9Y+fkgS8E6pXiVVQMjaXUvwDnDK5SVlH3Q1pD/dsn0DezOrRVaHskqyGkDgdrBnLVxaQ=; X-UUID: 47f11ed42d164e4eb84d09ed5c54a45f-20200929 Received: from mtkcas35.mediatek.inc [(172.27.4.253)] by mailgw01.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1959702591; Tue, 29 Sep 2020 12:30:16 +0800 Received: from MTKCAS36.mediatek.inc (172.27.4.186) by MTKMBS32DR.mediatek.inc (172.27.6.104) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 29 Sep 2020 12:30:15 +0800 Received: from [10.17.3.153] (10.17.3.153) by MTKCAS36.mediatek.inc (172.27.4.170) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Tue, 29 Sep 2020 12:30:14 +0800 Message-ID: <1601353661.29336.41.camel@mhfsdcap03> Subject: Re: [PATCH 7/8] usb: cdnsp: cdns3 Add main part of Cadence USBSSP DRD Driver From: Chunfeng Yun To: Pawel Laszczak CC: , , , , , , , , , , , , Date: Tue, 29 Sep 2020 12:27:41 +0800 In-Reply-To: <20200928122741.17884-8-pawell@cadence.com> References: <20200928122741.17884-1-pawell@cadence.com> <20200928122741.17884-8-pawell@cadence.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 MIME-Version: 1.0 X-TM-SNTS-SMTP: 22ED7498A790F41AD6D7CA993F86AB734BDD0986F5BDB0572137F8D4D1F392592000:8 X-MTK: N Content-Transfer-Encoding: base64 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org T24gTW9uLCAyMDIwLTA5LTI4IGF0IDE0OjI3ICswMjAwLCBQYXdlbCBMYXN6Y3phayB3cm90ZToN Cj4gVGhpcyBwYXRjaCBpbnRyb2R1Y2VzIHRoZSBtYWluIHBhc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