Received: by 2002:a05:7412:bc1a:b0:d7:7d3a:4fe2 with SMTP id ki26csp728596rdb; Sat, 19 Aug 2023 23:30:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFac2SV6tUV8ziFLG2F+H4cLC+XZnDp3h4NaFsxr474sjLjOumvsXamIrJfPB2l0Y5ORZBQ X-Received: by 2002:a81:4e4c:0:b0:57a:6bf0:2100 with SMTP id c73-20020a814e4c000000b0057a6bf02100mr4323216ywb.1.1692513026872; Sat, 19 Aug 2023 23:30:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692513026; cv=none; d=google.com; s=arc-20160816; b=SX4b+qvb9MS2k2GjuJddz/PC3hud8S03ed4Ut6KvWVkGdKnkSV/2WGD/lJeWN1MfYx jFb9MQo54ZJ80YKoJ0oUAPnsAsalAR6EgreBFbDO/QHq3IPNjQ7V/JWXWfWhtD41VrRj wuVWrw0Bqy+txheRskvrR6M9Ej/KdV9xVposvD22mTd/CmQSn85srfJ+tgFo9Jk27Wvc Vh3xW0+vYt0EIrqP5brEXYH1CkuJ24ZeGRSYT4uStuZl/9+OyfEysrVkmbQs1z9fS5Y3 77TUiPYYwt7xRIgVuKSg9/NQ3xL4KmsouGRIa9hUFkplEy2O9vOIyBOdHV/myPGDSGqB NZAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:authenticated-by; bh=MYsYXIYrdwSPdEmBly8ovbh8eHWNh6uI6HLp8oQNELc=; fh=9qiDkV/VUqVSDJJqF8HVSWkGvMk8d61YMYEOKxTAzD8=; b=j08SGhDblQANQaPNVi/GzMIWsXBFyWweWqqq8A+Owk68pQfBGyzGjqaPZkWF/KTidV Ocn7zZCm7yIq5kCio4G/HC3CYuyKFtxZ7ahdcXjEDdraR/GadCnb3BmzA0si0eiOWfw3 qMLl7paoQ0MyYffC7Qo4hlFlX+brPgPF0w5PjZt8hYkpOeRw8oLmbFFKPuWFjcofsZ1Y FTIoaJ7yFLfs16zfD0n/fX7QQSKjXO31TUZkPvC2UFuc6hgJMOlaPs4UqqQdCpQzE7hG mjFTdZMkY3gnxmhGjXqw9CWkbh04UsquxejiYux0Q8njOnyhtxuBkwn8IrWZWk850OPy sxSA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id az1-20020a056a02004100b005659b757791si4851722pgb.384.2023.08.19.23.30.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Aug 2023 23:30:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0FC042BEB86; Sat, 19 Aug 2023 11:48:53 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1358265AbjHRHoK (ORCPT + 99 others); Fri, 18 Aug 2023 03:44:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44658 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1358224AbjHRHnp (ORCPT ); Fri, 18 Aug 2023 03:43:45 -0400 Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C961030FE; Fri, 18 Aug 2023 00:43:42 -0700 (PDT) Authenticated-By: X-SpamFilter-By: ArmorX SpamTrap 5.77 with qID 37I7h6uqD013379, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtexh36505.realtek.com.tw[172.21.6.25]) by rtits2.realtek.com.tw (8.15.2/2.81/5.90) with ESMTPS id 37I7h6uqD013379 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 18 Aug 2023 15:43:06 +0800 Received: from RTEXMBS03.realtek.com.tw (172.21.6.96) by RTEXH36505.realtek.com.tw (172.21.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.32; Fri, 18 Aug 2023 15:43:26 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXMBS03.realtek.com.tw (172.21.6.96) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.7; Fri, 18 Aug 2023 15:43:26 +0800 Received: from RTEXMBS04.realtek.com.tw ([fe80::e138:e7f1:4709:ff4d]) by RTEXMBS04.realtek.com.tw ([fe80::e138:e7f1:4709:ff4d%5]) with mapi id 15.01.2375.007; Fri, 18 Aug 2023 15:43:26 +0800 From: =?utf-8?B?U3RhbmxleSBDaGFuZ1vmmIzogrLlvrdd?= To: Thinh Nguyen CC: Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Conor Dooley , "linux-usb@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH v4 1/2] usb: dwc3: add Realtek DHC RTD SoC dwc3 glue layer driver Thread-Topic: [PATCH v4 1/2] usb: dwc3: add Realtek DHC RTD SoC dwc3 glue layer driver Thread-Index: AQHZz16JBD32PXlY/Uy8zvoBgYO/Fq/us6MAgADJ/UA= Date: Fri, 18 Aug 2023 07:43:26 +0000 Message-ID: <8b4f8ba8685c43df9f297fefcc53edb1@realtek.com> References: <20230815095452.4146-1-stanley_chang@realtek.com> <20230818003752.3ghaw4vprnqs6s2f@synopsys.com> In-Reply-To: <20230818003752.3ghaw4vprnqs6s2f@synopsys.com> Accept-Language: zh-TW, en-US Content-Language: zh-TW X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.21.190.159] x-kse-serverinfo: RTEXMBS03.realtek.com.tw, 9 x-kse-antispam-interceptor-info: fallback x-kse-antivirus-interceptor-info: fallback Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-KSE-AntiSpam-Interceptor-Info: fallback X-KSE-ServerInfo: RTEXH36505.realtek.com.tw, 9 X-KSE-AntiSpam-Interceptor-Info: fallback X-KSE-Antivirus-Interceptor-Info: fallback X-KSE-AntiSpam-Interceptor-Info: fallback X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org SGkgVGhpbmgsDQoNCj4gDQo+IE9uIFR1ZSwgQXVnIDE1LCAyMDIzLCBTdGFubGV5IENoYW5nIHdy b3RlOg0KPiA+IFJlYWx0ZWsgREhDIFJURCBTb0NzIGludGVncmF0ZSBkd2MzIElQIGFuZCBoYXMg c29tZSBjdXN0b21pemF0aW9ucyB0bw0KPiA+IHN1cHBvcnQgZGlmZmVyZW50IGdlbmVyYXRpb25z IG9mIFNvQ3MuDQo+IA0KPiBQbGVhc2UgcHJvdmlkZSBhIHN1bW1hcnkgb2Ygd2hhdCAiY3VzdG9t aXphdGlvbnMiIGFyZSBkb25lIGhlcmUuDQo+IA0KSSB3aWxsIGFkZCBkZXNjcmlwdGlvbjoNCg0K VGhlIFJURDE2MTliIHN1YmNsYXNzIFNvQyBvbmx5IHN1cHBvcnRzIF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iMl9kcl9tb2RlKHN0cnVjdCBkd2MzX3J0ayAqcnRr LCBpbnQgZHJfbW9kZSkgew0KPiA+ICsgICAgIHN3aXRjaCAoZHJfbW9kZSkgew0KPiA+ICsgICAg IGNhc2UgVVNCX0RSX01PREVfUEVSSVBIRVJBTDoNCj4gPiArICAgICAgICAgICAgIHdyaXRlbChV U0IyX1BIWV9TV0lUQ0hfREVWSUNFIHwNCj4gPiArICAgICAgICAgICAgICAgICAgICAgICAgICh+ VVNCMl9QSFlfU1dJVENIX01BU0sgJg0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICBy ZWFkbChydGstPnJlZ3MgKyBXUkFQX1VTQjJfUEhZX1JFRykpLA0KPiA+ICsgICAgICAgICAgICAg ICAgICAgICAgICAgcnRrLT5yZWdzICsgV1JBUF9VU0IyX1BIWV9SRUcpOw0KPiANCj4gUGxlYXNl IHNwbGl0IHRoZSByZWdpc3RlciByZWFkIGFuZCB3cml0ZSB0byBzZXBhcmF0ZSBvcGVyYXRpb25z IGhlcmUgYW5kDQo+IGV2ZXJ5d2hlcmUgZWxzZS4gaWU6DQo+ICAgICAgICAgdmFsID0gcmVhZGwo b2Zmc2V0KTsNCj4gICAgICAgICB3cml0ZWwodmFsIHwgbW9kLCBvZmZzZXQpOw0KT2theS4NCg0K PiA+ICsgICAgICAgICAgICAgYnJlYWs7DQo+ID4gKyAgICAgY2FzZSBVU0JfRFJfTU9ERV9IT1NU Og0KPiA+ICsgICAgICAgICAgICAgd3JpdGVsKFVTQjJfUEhZX1NXSVRDSF9IT1NUIHwNCj4gPiAr ICAgICAgICAgICAgICAgICAgICAgICAgICh+VVNCMl9QSFlfU1dJVENIX01BU0sgJg0KPiA+ICsg ICAgICAgICAgICAgICAgICAgICAgICAgICByZWFkbChydGstPnJlZ3MgKyBXUkFQX1VTQjJfUEhZ X1JFRykpLA0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAgICAgcnRrLT5yZWdzICsgV1JBUF9V U0IyX1BIWV9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