From patchwork Thu Apr 5 16:42:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 10324983 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A46E36053F for ; Thu, 5 Apr 2018 16:42:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 94387292F4 for ; Thu, 5 Apr 2018 16:42:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 886BB292F6; Thu, 5 Apr 2018 16:42:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 50D2C292F5 for ; Thu, 5 Apr 2018 16:42:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751278AbeDEQma (ORCPT ); Thu, 5 Apr 2018 12:42:30 -0400 Received: from sauhun.de ([88.99.104.3]:40556 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751251AbeDEQm3 (ORCPT ); Thu, 5 Apr 2018 12:42:29 -0400 Received: from localhost (p54B33501.dip0.t-ipconnect.de [84.179.53.1]) by pokefinder.org (Postfix) with ESMTPSA id 8BF6E2FE001; Thu, 5 Apr 2018 18:42:28 +0200 (CEST) From: Wolfram Sang To: linux-mmc@vger.kernel.org, Yoshihiro Shimoda Cc: linux-renesas-soc@vger.kernel.org, Wolfram Sang Subject: [RFC PATCH] mmc: renesas_sdhi_internal_dmac: use more generic whitelisting Date: Thu, 5 Apr 2018 18:42:16 +0200 Message-Id: <20180405164216.7175-1-wsa@the-dreams.de> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180404164507.3394-1-wsa@the-dreams.de> References: <20180404164507.3394-1-wsa@the-dreams.de> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Wolfram Sang Whitelisting every ES version does not scale. So, we whitelist whole SoCs independent of ES version. If we need specific handling for an ES version, we put it to the front, so it will be matched first. Signed-off-by: Wolfram Sang Reviewed-by: Yoshihiro Shimoda Tested-by: Nguyen Viet Dung Reviewed-by: Simon Horman --- Shimoda-san: here is my example how to re-arrange the whitelisting if we assume that the DMA RX fix is going to work out (so this patch depends on it). I tested this patch on H3 ES1.0 and ES2.0 with some additional debug output to prove that the correct table entry was matched. What do you think? Happy hacking, Wolfram drivers/mmc/host/renesas_sdhi_internal_dmac.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/renesas_sdhi_internal_dmac.c b/drivers/mmc/host/renesas_sdhi_internal_dmac.c index 561e90755a3b..19ab88b348c1 100644 --- a/drivers/mmc/host/renesas_sdhi_internal_dmac.c +++ b/drivers/mmc/host/renesas_sdhi_internal_dmac.c @@ -269,12 +269,15 @@ static const struct tmio_mmc_dma_ops renesas_sdhi_internal_dmac_dma_ops = { * implementation as others may use a different implementation. */ static const struct soc_device_attribute gen3_soc_whitelist[] = { + /* specific ones */ { .soc_id = "r8a7795", .revision = "ES1.*", .data = (void *)BIT(SDHI_INTERNAL_DMAC_ONE_RX_ONLY) }, - { .soc_id = "r8a7795", .revision = "ES2.0" }, { .soc_id = "r8a7796", .revision = "ES1.0", .data = (void *)BIT(SDHI_INTERNAL_DMAC_ONE_RX_ONLY) }, - { .soc_id = "r8a77995", .revision = "ES1.0" }, + /* generic ones */ + { .soc_id = "r8a7795" }, + { .soc_id = "r8a7796" }, + { .soc_id = "r8a77995" }, { /* sentinel */ } };