Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp377190pxx; Thu, 29 Oct 2020 05:00:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJznwYgz2Xq7Vy11pvITaNYqiRmBWLCM3Zuw2DebtbfeuCBvyvwZLir9G2MEjT2tTzxVmouj X-Received: by 2002:a17:906:3689:: with SMTP id a9mr3618611ejc.403.1603972822318; Thu, 29 Oct 2020 05:00:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603972822; cv=none; d=google.com; s=arc-20160816; b=sUlpqGdGInBlqB0HUD8HOqYHSjHLjmT1axno+aN1efDBVhqf7/0KKcMYXfDyss2Qpg EbPaywrYJij4g37S7QTsBiLXI2YA0+Ma1chQz+Vvp/kShjpMQbbkRlp/8XS39g5IvdHE zXSYqmzrdnb7KHmxPrTh90tqxrOu2wiUgMSR8oof81L5xfDJ0yX2887/SG1bQ0e3XGOv bVId48amBxRbrrebiHapnlyd342YjGtq9+i9zuS4G62V81dy/IBHX5Cneq3FCI7Ea3eM 5SfLlRoW8YKDQ633tHVauw8iZqEKrjbyD1CHlc8ZEvzc9wP5LB4CkZnSSIAGpKhkz5Y5 79IA== 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:message-id:date:subject:cc:to:from :dkim-signature; bh=gfnnUMTukPN9nXUoJsTAgUclVQL2iOIkqnu56wZwVGs=; b=HXZXxCbd9aywbQUk4opbf0JNUPaUKFob+qD9kilspLkiUCP247zXJQK+L5+RZrxbP2 ORovKVj+xUWW3rigDjKmhTyJ4t1fc5pTceBKYSW/gT4Bc++SF/7y5712R97wF6gfbDy1 u24AKaDxIWAS4jLILGUiIVFg5g90dNN29KjALMTbU+y+dw3Jf5PuWKUBNg88J+8pLim5 jdmeEHPJDbPnnXM7OFoJde6Y2ZPB78IYSYSB/mocw1acJa7ve/d7pkEIDF74wLQA6fUi 5/cDxoZABY3AKA3Ihyg3b/hJLT8yvlz5yWUsaxDRiksfhPAVQirNi3G6nf/VBP04tzi2 a46A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=uI3j8bH2; 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 gj23si1720200ejb.600.2020.10.29.04.59.59; Thu, 29 Oct 2020 05:00:22 -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=uI3j8bH2; 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 S1726041AbgJ2L6P (ORCPT + 99 others); Thu, 29 Oct 2020 07:58:15 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:57201 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725300AbgJ2L6C (ORCPT ); Thu, 29 Oct 2020 07:58:02 -0400 X-UUID: 06a5844566ed4a7fab69ca98c3b4be9a-20201029 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=gfnnUMTukPN9nXUoJsTAgUclVQL2iOIkqnu56wZwVGs=; b=uI3j8bH2+1Ucb/B2utCgrTp7X4vcQHa8IVYtwExoWdHzTWYwma/Ci1zEpeMI5/SwUKWNCxrlsCMhnkqRx6i3Vy6lwqmcmJu6x57BQvISbBjelUflWUfbgYYr3kway44GEudyrZ31+LyXAVAaNQGjAjLy2jGvsWfHXoDW4uNYNXg=; X-UUID: 06a5844566ed4a7fab69ca98c3b4be9a-20201029 Received: from mtkcas10.mediatek.inc [(172.21.101.39)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.14 Build 0819 with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 366030498; Thu, 29 Oct 2020 19:57:53 +0800 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkmbs02n1.mediatek.inc (172.21.101.77) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 29 Oct 2020 19:57:51 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas10.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 29 Oct 2020 19:57:51 +0800 From: Stanley Chu To: , , , , CC: , , , , , , , , , , , , Stanley Chu Subject: [PATCH v1 6/6] scsi: ufs-mediatek: Add HS-G4 support Date: Thu, 29 Oct 2020 19:57:50 +0800 Message-ID: <20201029115750.24391-7-stanley.chu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20201029115750.24391-1-stanley.chu@mediatek.com> References: <20201029115750.24391-1-stanley.chu@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Content-Transfer-Encoding: base64 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org UHJvdmlkZSBIUy1HNCBzdXBwb3J0IGluIE1lZGlhVGVrIFVGUyBwbGF0Zm9ybXMuDQoNClRvIHN1 cHBvcnQgSFMtRzQsIGludHJvZHVjZSBtZWNoYW5pc20gdG8gZ2V0IHRoZQ0KTWVkaWFUZWsgVUZT IGNvbnRyb2xsZXIgdmVyc2lvbi4gV2l0aCBzdWNoIGluZm9ybWF0aW9u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