Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp377264pxx; Thu, 29 Oct 2020 05:00:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyeaZsilez88cqV6W2cwq7JLwlZV7VO1MWvjJic9WFgvoQsOhiAFdCiDLu0MkYFfFVTGxQH X-Received: by 2002:a05:6402:287:: with SMTP id l7mr3496434edv.212.1603972828500; Thu, 29 Oct 2020 05:00:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603972828; cv=none; d=google.com; s=arc-20160816; b=VC7oonwTdhnb6ZBRlGxbFsH1RFjSm6D0+cbph+nQWKZiOZlWOdjQmgvQT4USyJuppe A0sVKBvDuZE4VlB3OyWLRrqLLMffV7IW6puJ6h6yeSqpebKerHaTSPZJ9wlHw9zdDLCI r7XXi6Vyfw1UqJfAWouzBC53cmvidf2jYV5afn4v7LR/7LERNbmvrp6m63Wu9ZnCewnG Q62iXhI5u3zK/BJvnBqZg1lg74KcdLYKzfii65a72a0hiBIFXMzZnYQ7L/O90B2Vxdzz e9foxZZO46Zt4yteyQa8+D7iXQdDm6+cx6lzM4JobIw/wMnW6A+0YaUDYO/kD73cUSHO wstw== 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=HeeKNn+hQW8XODZCU/LTYqxhkckI4DcNy1WSOsuzDMM=; b=zqJalK5miN9+/moXgF8/6WWWbtXBP6jrDUYTQvWqT3oFNZ+Lnrt0lOQ7yr/5O0Qw/I lG5m1MIFxZpGY0zGJRVU1rbj67qbI/n3PY0U3s6fI9y5lvKfAhuRz/lNPyacMTOIDjsI /examu6AWzxbQqxBDyt1B5lvKQKSrXNrAHYB+vhdLwlQDL8UUyfi1y8sqJ2fx7YTAD3v OA2OHvAVOoTKpJTTaeXbtw1TjTPGeZ3Rsj4LNnpn4/zmUmKO0SMMRjrWlgLbVWF0zSRQ Y9YB341ADwP0pOCfP/RL4VwIEVhsxaVlBXCj/7Qpl4zoZ4X6tEBiUKSzsr3z6ncpGjCt Vd4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=FAKT7Ewg; 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 i20si1645946ejh.16.2020.10.29.05.00.04; Thu, 29 Oct 2020 05:00:28 -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=FAKT7Ewg; 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 S1725976AbgJ2L6S (ORCPT + 99 others); Thu, 29 Oct 2020 07:58:18 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:57402 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725928AbgJ2L6N (ORCPT ); Thu, 29 Oct 2020 07:58:13 -0400 X-UUID: f671a588e87e4c489f70dccbc7d6c9e5-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=HeeKNn+hQW8XODZCU/LTYqxhkckI4DcNy1WSOsuzDMM=; b=FAKT7EwgbAkGTJCryVs3RDLog4qfxNTD+Opdp3z2BmO2ZI3cnk9/DR9/DqAB4iKbtaIMNkwNA6a8rioWEC+tff2HjK2XjcLLnseh0m5XB4hUaP70fQvEPfYjIVl19cL98oOsdapmAh7zfWsG99CA+upeHTgetQXkCVRbzjlbJfY=; X-UUID: f671a588e87e4c489f70dccbc7d6c9e5-20201029 Received: from mtkcas07.mediatek.inc [(172.21.101.84)] 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 409727090; Thu, 29 Oct 2020 19:58:06 +0800 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkmbs02n2.mediatek.inc (172.21.101.101) 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:50 +0800 From: Stanley Chu To: , , , , CC: , , , , , , , , , , , , Stanley Chu Subject: [PATCH v1 3/6] scsi: ufs-mediatek: Decouple features from platform bindings Date: Thu, 29 Oct 2020 19:57:47 +0800 Message-ID: <20201029115750.24391-4-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-TM-SNTS-SMTP: 4B0DD959D98AD8440F99078E8B624C59E8A59EA804EB313BF528C24E31A296DF2000:8 X-MTK: N Content-Transfer-Encoding: base64 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org VUZTIHByb3ByaWV0YXJ5IGZlYXR1cmVzIChpbmNsdWRpbmcgZmVhdHVyZXMgaW50cm9kdWNlZCBs YXRlcikgaW4NCk1lZGlhVGVrIFVGUyBwbGF0Zm9ybXMgaGF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