From patchwork Fri Aug 4 21:35:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Icenowy Zheng X-Patchwork-Id: 9882081 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 A37B3602B8 for ; Fri, 4 Aug 2017 21:36:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9589E28994 for ; Fri, 4 Aug 2017 21:36:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8A977289E4; Fri, 4 Aug 2017 21:36: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 1ED0C28994 for ; Fri, 4 Aug 2017 21:36:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752352AbdHDVgP (ORCPT ); Fri, 4 Aug 2017 17:36:15 -0400 Received: from hermes.aosc.io ([199.195.250.187]:36119 "EHLO hermes.aosc.io" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752326AbdHDVgN (ORCPT ); Fri, 4 Aug 2017 17:36:13 -0400 Received: from localhost (localhost [127.0.0.1]) (Authenticated sender: icenowy@aosc.io) by hermes.aosc.io (Postfix) with ESMTPSA id 020D642134; Fri, 4 Aug 2017 21:36:09 +0000 (UTC) From: Icenowy Zheng To: Ulf Hansson , Maxime Ripard , Chen-Yu Tsai Cc: linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, Icenowy Zheng Subject: [PATCH 2/2] mmc: sunxi: fix new timings mode on A64 EMMC (MMC2) controller Date: Sat, 5 Aug 2017 05:35:55 +0800 Message-Id: <20170804213555.6024-2-icenowy@aosc.io> In-Reply-To: <20170804213555.6024-1-icenowy@aosc.io> References: <20170804213555.6024-1-icenowy@aosc.io> 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 The configuration struct of A64 EMMC(MMC2) compatible used to have the needs_new_timings variable missing, which lead to NULL pointer dereference now when trying to set up the old timings mode, as the old timings mode doesn't exist at all on A64. Fix this issue by adding this variable and setting it to true in the configuration struct. Fixes: 4fb3ce07eafa ("mmc: sunxi: Add EMMC (MMC2) controller compatible") Signed-off-by: Icenowy Zheng --- drivers/mmc/host/sunxi-mmc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mmc/host/sunxi-mmc.c b/drivers/mmc/host/sunxi-mmc.c index 59aba93beffb..4ad643e37014 100644 --- a/drivers/mmc/host/sunxi-mmc.c +++ b/drivers/mmc/host/sunxi-mmc.c @@ -1142,6 +1142,7 @@ static const struct sunxi_mmc_cfg sun50i_a64_emmc_cfg = { .idma_des_size_bits = 13, .clk_delays = NULL, .can_calibrate = true, + .needs_new_timings = true, }; static const struct of_device_id sunxi_mmc_of_match[] = {