Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3654177rdh; Mon, 27 Nov 2023 23:06:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IEGxHWpJ3YjmNIOx6Via5Ihb/2q/Q7H6gRxiiaEvbepw+sdE/s/l5ksiTMrkXWJURo/Uryc X-Received: by 2002:a17:90a:5a:b0:285:5e57:87ba with SMTP id 26-20020a17090a005a00b002855e5787bamr13259722pjb.18.1701155207504; Mon, 27 Nov 2023 23:06:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701155207; cv=none; d=google.com; s=arc-20160816; b=hBQoWPoQ74eu1DzZH9q8XV9az2wu8RfCmBQILoz2Rjcd6Jss/5m4idnJq+BLM2T4AF 8o5D9V2sSTsybGTlbkQ/Axn3kpNZOQwAyeiFgsF3a3TR7JqHpHYBtO+2biS/x+2aRWG4 pnMbPVDvnUXQPDaORqHOkH1AACvNcgEcQ7gcytMDf7oZnNR+tckrrv24A8zioQ2Uh0Pd FPkMGVApJKOFfC1aybf5nJuq29wpSqqS2I7xFMa0EHYmCybvlwCIUA5sJNnT/jJhdqH6 s2YxNiDMBCvqKtw33WdFb6xgE/p5hFc427igaajC/nORkL2+exZ5Umo/l+Df+n+5yMjh vmDA== 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; bh=29lXIjZN4HwF681WV2w/Zdq0QYM90NeMukfctgsouY0=; fh=5NUId3L6nNNDo0nEgGM5Z1wI8Td7w1ItH9MVAa9+RoU=; b=sQKcg3igRO4xcS0vFR6gnz/qdRFyLEhydiN0D2boQfxa7kkt5PeES/HYTSdnOkqPTk nbVKb8vxqlhr2f83fsDS5/HHwr1QACVgcWnuzVul1ODEfzfmL2bt6ql6U+YtLBScdBUl oU1IwIRmwnngjubV5R/EhHlndYsPyR7hnml4odE5W4LH6M8SkI+JjNl0thAsC+elhHou R351wMnvFyTTkE/NNSc/uWIdPdgwB8MjfeLq2WEcz/LsrpVajZe3vMFU4GrocRNNo083 HwGk8jBE3SK6Fd/DyTHslfhAMv0OvHNtOPa8vIOwtUBxqVPz97fMZp7e8wf0TWAuNG8H eSGA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id fv15-20020a17090b0e8f00b0027ffcd44adasi11467655pjb.133.2023.11.27.23.06.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 23:06:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 4297D82B929B; Mon, 27 Nov 2023 23:06:44 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232673AbjK1HG0 (ORCPT + 99 others); Tue, 28 Nov 2023 02:06:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231540AbjK1HGZ (ORCPT ); Tue, 28 Nov 2023 02:06:25 -0500 Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 70063C2; Mon, 27 Nov 2023 23:06:31 -0800 (PST) X-SpamFilter-By: ArmorX SpamTrap 5.78 with qID 3AS75WDI01877012, 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.95/5.92) with ESMTPS id 3AS75WDI01877012 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 28 Nov 2023 15:05:32 +0800 Received: from RTEXMBS06.realtek.com.tw (172.21.6.99) 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; Tue, 28 Nov 2023 15:05:33 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXMBS06.realtek.com.tw (172.21.6.99) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Tue, 28 Nov 2023 15:05:32 +0800 Received: from RTEXMBS04.realtek.com.tw ([fe80::40c2:6c24:2df4:e6c7]) by RTEXMBS04.realtek.com.tw ([fe80::40c2:6c24:2df4:e6c7%5]) with mapi id 15.01.2375.007; Tue, 28 Nov 2023 15:05:32 +0800 From: =?utf-8?B?SnlhbiBDaG91IFvlkajoirflrold?= To: Philipp Zabel , "ulf.hansson@linaro.org" , "adrian.hunter@intel.com" , "jh80.chung@samsung.com" , "riteshh@codeaurora.org" , "robh+dt@kernel.org" , "krzysztof.kozlowski+dt@linaro.org" CC: "conor+dt@kernel.org" , "asutoshd@codeaurora.org" , "linux-mmc@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "arnd@arndb.de" , "briannorris@chromium.org" , "doug@schmorgal.com" , "tonyhuang.sunplus@gmail.com" , "abel.vesa@linaro.org" , "william.qiu@starfivetech.com" Subject: RE: [PATCH v7][2/4] mmc: Add Synopsys DesignWare mmc cmdq host driver Thread-Topic: [PATCH v7][2/4] mmc: Add Synopsys DesignWare mmc cmdq host driver Thread-Index: AQHaHFq+bFd/3O/jHUaixlBEulhIvbCNogOAgAG2DdA= Date: Tue, 28 Nov 2023 07:05:32 +0000 Message-ID: <24b03128ab594363a29494c0171e9f5f@realtek.com> References: <20231121091101.5540-1-jyanchou@realtek.com> <20231121091101.5540-3-jyanchou@realtek.com> <23011695aafca595c3c8722fda2a8e194c5318df.camel@pengutronix.de> In-Reply-To: <23011695aafca595c3c8722fda2a8e194c5318df.camel@pengutronix.de> Accept-Language: zh-TW, en-US Content-Language: zh-TW x-originating-ip: [172.21.190.236] x-kse-serverinfo: RTEXMBS06.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=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Mon, 27 Nov 2023 23:06:44 -0800 (PST) SGkgUGhpbGlwcCwNCg0KPj4gV2UgaW1wbGVtZW50ZWQgY21kcSBmZWF0dXJlIG9uIFN5bm9wc3lz IERlc2lnbldhcmUgbW1jIGRyaXZlci4NCj4+IFRoZSBkaWZmZXJlbmNlIGJldHdlZW4gZHdfbW1j LmMgYW5kIGR3X21tY19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