Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3512805pxf; Mon, 15 Mar 2021 11:11:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzuncaJtQdMtaiXFdXh1YNakHbrdRRBULnRu21/kcOEihp0JS8YZgR2K4EUmvKHEZ395vpu X-Received: by 2002:a17:906:3b47:: with SMTP id h7mr24805820ejf.377.1615831898217; Mon, 15 Mar 2021 11:11:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615831898; cv=none; d=google.com; s=arc-20160816; b=g6dhsGQfCfPFZQ/lmQltkhMogNvICoz3XGlxiM07pz1pNodszeCn5SDxoAzaZTPZfZ ZO3k5VIhnhiPRSihOgxCg1irm9tKKaYjouT8FRA9x4sq4ymTrCNfP2228gQ6LpDMDQTG HQrHsC/tNJWH3w4jzGENuMOV7o2euJ80hSFGrB3wIGFOckXgnNxWG282xgD4CHAkYy5H toL6JHQQ1AKrRFtwh/uY3ETE/fMjFwA7wnj96lQ19v8qMQ6VrEptqjR50TM4sqIm9qfn wLU40I4Wlzmq9Sw2a2J/ZNEIcyg45q/jSNa7gl2NbNVIYXT++OcRamus23QCnVMlKUsa T6Zw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=QopPqdK3ZGZYwZTkUkjVAaMpw8ndT2MjfXC1iKBkRzo=; b=KrsQt/2vMRfpx/a2rWIKC6+X6jqZ/5BGlu3jgI+kbs7RsOf92bWhq/dNDDxv2egyzg 3lx+UkovkSDeKTdQTGC4obVdHJmlaVpMl8s267gBr6dQV4LEKSugrY5+gxWSCx4RzSrF HgXGFqK+lj53E7j1/zMPtxYBU05lD1nWBTSCLqffIbI6PDT0AhsKUsBqseM5LPRWRGm5 1SLzdFwaE30v4wINQZl1corbEM9HAu/6eEoFZ1ucZa0aQvezCNRUsk7q5er0LWWr/PM3 f2KL+YeNc7TvgOQzSZWrof5zqg8zGtL7gnsDyEXracTW/Tvdy7FoDFP39ACYDdo+1lTo Htbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=GQ4ngboG; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gr2si11689173ejb.65.2021.03.15.11.11.11; Mon, 15 Mar 2021 11:11:38 -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=@linuxfoundation.org header.s=korg header.b=GQ4ngboG; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235397AbhCOOKJ (ORCPT + 99 others); Mon, 15 Mar 2021 10:10:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:35446 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231467AbhCON6U (ORCPT ); Mon, 15 Mar 2021 09:58:20 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1B31F64F01; Mon, 15 Mar 2021 13:58:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816688; bh=Sj/cXdov0WGV5b8ERqYAlcvYqn9ZiLpYnt6pr5djLt0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GQ4ngboGDi3kXhxvT/En0EWSdByZoQaodKm92BYBqmtz0ZRGUlLOc8+Rr7jnftfy4 sEr6lCWurq4KFjg7woVdbnf8RbY/zUyhc5cThNmZcfhLt/Si/UTJhTaiz2v+YQPOLV ykWTL4GkU+zJLiu9Of6R+5aKfz4g9v3vjqdsvmZE= From: gregkh@linuxfoundation.org To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Joakim Zhang , Marc Kleine-Budde Subject: [PATCH 4.19 007/120] can: flexcan: assert FRZ bit in flexcan_chip_freeze() Date: Mon, 15 Mar 2021 14:55:58 +0100 Message-Id: <20210315135720.258421341@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135720.002213995@linuxfoundation.org> References: <20210315135720.002213995@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Greg Kroah-Hartman From: Joakim Zhang commit 449052cfebf624b670faa040245d3feed770d22f upstream. Assert HALT bit to enter freeze mode, there is a premise that FRZ bit is asserted. This patch asserts FRZ bit in flexcan_chip_freeze, although the reset value is 1b'1. This is a prepare patch, later patch will invoke flexcan_chip_freeze() to enter freeze mode, which polling freeze mode acknowledge. Fixes: b1aa1c7a2165b ("can: flexcan: fix transition from and to freeze mode in chip_{,un}freeze") Link: https://lore.kernel.org/r/20210218110037.16591-2-qiangqing.zhang@nxp.com Signed-off-by: Joakim Zhang Signed-off-by: Marc Kleine-Budde Signed-off-by: Greg Kroah-Hartman --- drivers/net/can/flexcan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/net/can/flexcan.c +++ b/drivers/net/can/flexcan.c @@ -426,7 +426,7 @@ static int flexcan_chip_freeze(struct fl u32 reg; reg = priv->read(®s->mcr); - reg |= FLEXCAN_MCR_HALT; + reg |= FLEXCAN_MCR_FRZ | FLEXCAN_MCR_HALT; priv->write(reg, ®s->mcr); while (timeout-- && !(priv->read(®s->mcr) & FLEXCAN_MCR_FRZ_ACK))