Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp494825imm; Wed, 6 Jun 2018 00:52:09 -0700 (PDT) X-Google-Smtp-Source: ADUXVKK4k36YO9lKgqWy0qCJ8q3fRahXXfbmOkgKbGVo6+uoKT9u93EmVtpwnVqTnZIqgNJAx+R8 X-Received: by 2002:a63:2682:: with SMTP id m124-v6mr1743121pgm.56.1528271529499; Wed, 06 Jun 2018 00:52:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528271529; cv=none; d=google.com; s=arc-20160816; b=Y4vNeGebZizE+L4uvFS3rkdp9vh+neej9h1np5nGVhHyL3fmIanTzDS9B//qtE/kN9 hqUnyjoAByctDGc22tHKc1+BMC+V+0bq0j86gyS9ccCveR1w+2wdIzB5B7NHEX8SjAOl pdafIr4cCg+CWTOxxZ1HBFznxqX/AiVp/JTbIFD0jsPFwjKSJ1fdyotKdpdrpDP9DttP +9fwg9zFq1INDyG6dwOr/EKduBECkwRKyxQ3zfWDFRRmOVP06+MrmLwgi3LLP0Tv1qq2 9/POL7c8TYxbY7qhySHZ8/C3P4qq4dhH/khLASfDPk9y7QgM9KhcH8fwWocYc1+Qh+Pi /e+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=i/bkVJFb4aFAM9tILK//0T6T/RHvSOfoLzRYjn67v8U=; b=0Uh5wwTwfKCAfdlzzahRWypsBuHhbck3ZdpsD2Zu1vToe8fd1f8EDlO2NObcqmMqIf +Qp/2YW5jXh1Z1ajOQhhw8ozWLyBQ34D4Iz1OTUTHn8Tp0QNnsax3Am3Kw88+erznq8a fZcJCEpFpC+Ncz4A85CBV018ZB/v0IZVgLkxQe08aIwBzWALTGtHVanvejahFJtr8cG3 TwgfnBPwA/G4TufNwDhK6D4RawhSDdQgcgXWYR2Nv5mxNl4wsTB5bdZn8/q1uCe2juEf NGiPEQ9Kwz7lw7Z6p5YOkH70r9XvQ4VDVmTeP2NG6yeEfRkPfQXBmJBzkHFSgmUAqeBx 8iBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=xDNCW3AN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1-v6si50675915plx.236.2018.06.06.00.51.55; Wed, 06 Jun 2018 00:52:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=xDNCW3AN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932420AbeFFHvb (ORCPT + 99 others); Wed, 6 Jun 2018 03:51:31 -0400 Received: from fllnx210.ext.ti.com ([198.47.19.17]:31723 "EHLO fllnx210.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932320AbeFFHv2 (ORCPT ); Wed, 6 Jun 2018 03:51:28 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by fllnx210.ext.ti.com (8.15.1/8.15.1) with ESMTP id w567pJ6e001672; Wed, 6 Jun 2018 02:51:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1528271479; bh=i/bkVJFb4aFAM9tILK//0T6T/RHvSOfoLzRYjn67v8U=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=xDNCW3ANs0UKk/XkOrLn+Zz392lg+KvEk1LBbOoezEFa8srPYe3489uy2EQ5IuF5I T9USNwma4kHmvB/+WAaUBNQiNKQ3/K9G9BQqGpUlrgRFPDF01jHgjOi/+76xVtgr1w NQS9D6fx6bG+q1bLUNpYxMvENK0WMiU8FdA40DTs= Received: from DFLE108.ent.ti.com (dfle108.ent.ti.com [10.64.6.29]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id w567pJZD011667; Wed, 6 Jun 2018 02:51:19 -0500 Received: from DFLE115.ent.ti.com (10.64.6.36) by DFLE108.ent.ti.com (10.64.6.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Wed, 6 Jun 2018 02:51:18 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DFLE115.ent.ti.com (10.64.6.36) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1466.3 via Frontend Transport; Wed, 6 Jun 2018 02:51:18 -0500 Received: from [172.24.190.215] (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id w567pG43016531; Wed, 6 Jun 2018 02:51:17 -0500 Subject: Re: [PATCH] can: m_can: Move acessing of message ram to after clocks are enabled To: , , , CC: , References: <20180529141940.1682-1-faiz_abbas@ti.com> From: Faiz Abbas Message-ID: <19e1af1d-047e-3acf-3ba3-71811f30f50e@ti.com> Date: Wed, 6 Jun 2018 13:22:43 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180529141940.1682-1-faiz_abbas@ti.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Tuesday 29 May 2018 07:49 PM, Faiz Abbas wrote: > MCAN message ram should only be accessed once clocks are enabled. > Therefore, move the call to parse/init the message ram to after > clocks are enabled. > > Signed-off-by: Faiz Abbas > --- > drivers/net/can/m_can/m_can.c | 7 +++---- > 1 file changed, 3 insertions(+), 4 deletions(-) > > diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c > index b397a33f3d32..a9fbf81ac3d4 100644 > --- a/drivers/net/can/m_can/m_can.c > +++ b/drivers/net/can/m_can/m_can.c > @@ -1642,8 +1642,6 @@ static int m_can_plat_probe(struct platform_device *pdev) > priv->can.clock.freq = clk_get_rate(cclk); > priv->mram_base = mram_addr; > > - m_can_of_parse_mram(priv, mram_config_vals); > - > platform_set_drvdata(pdev, dev); > SET_NETDEV_DEV(dev, &pdev->dev); > > @@ -1666,6 +1664,8 @@ static int m_can_plat_probe(struct platform_device *pdev) > goto clk_disable; > } > > + m_can_of_parse_mram(priv, mram_config_vals); > + > devm_can_led_init(dev); > > of_can_transceiver(dev); > @@ -1715,8 +1715,6 @@ static __maybe_unused int m_can_resume(struct device *dev) > > pinctrl_pm_select_default_state(dev); > > - m_can_init_ram(priv); > - > priv->can.state = CAN_STATE_ERROR_ACTIVE; > > if (netif_running(ndev)) { > @@ -1726,6 +1724,7 @@ static __maybe_unused int m_can_resume(struct device *dev) > if (ret) > return ret; > > + m_can_init_ram(priv); > m_can_start(ndev); > netif_device_attach(ndev); > netif_start_queue(ndev); > Gentle ping. Thanks, Faiz