Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3319788pxf; Mon, 15 Mar 2021 07:04:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwKap5kBVwk9N+jFKrNRv+PXiQ5e5Z9ifevIwt2N13j2dau8xy1Mm042jRG+tMT9OH8qMo8 X-Received: by 2002:a17:907:9611:: with SMTP id gb17mr24315054ejc.325.1615817088596; Mon, 15 Mar 2021 07:04:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615817088; cv=none; d=google.com; s=arc-20160816; b=e+j8KCMemhI4ep07zNWg5UP+S6beRbgD3wBJ7AB8rdEJX+djek1KFnZNh61pGDyqUu dYP3gPxX46XNSRx1Xi/6WUP2ufvNQ6WuK1VyKyDIOG2zibZY7otU1aiKsmLp1ECkGy44 IZgNZH8LywCj+cUye1XP3SLRD1GEu7JhodHLZMbbtCBsTdlaDbjJ0SDzL3BUrmboOA49 CzE7IaDbp71viiWPvy7oKAEBzvdJ+xsKHChgXsqpa5mvJZwaPdqR9Clf3FTud1bOigDi dkWH+2MPk7efyNX/+P5NS+HJtmNc7UpN6zI9GDU7My5DMsxVhWJ6xAnjkIV9Acg6RiPA PLCg== 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=H39FDEmV/kYICBWwUbHhLitkU3rJqgjww1fv7utI4wQ=; b=n9cwYZ4uMj+63l2/JWifoXFDcrYI2/9AeRH8vDlZ/hkfJ5z1SGHGtv68f6uzfaAsb7 YiuhoTnV986ovtpgpCPvSjR4O2+9zS6jQRqwzq7J6U1cTFu+T5IsOyEG6fG4xWHlMcP6 BuPVGjbn8GF5a5xe1fgDpXnr4Is+W6XMJtLhDU8uWWb+XvDcz8INsg/xx3VTDI2Uul6I K79x3Cactq9S1q+K8jLNj9JDMKUt03e1nTUDZB0cNysg3kuhrgVdnNGa8vcqC1YP19M+ S27m8jTSKwzrfy9O581GWUZT2y5N9V3Su27vG1UwuyxipgyVXP6HAbnguUfdWPdwese3 X0cQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=khv7x2FS; 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 y10si10737426ejw.185.2021.03.15.07.04.23; Mon, 15 Mar 2021 07:04:48 -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=khv7x2FS; 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 S233993AbhCOOCq (ORCPT + 99 others); Mon, 15 Mar 2021 10:02:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:34010 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231820AbhCON4z (ORCPT ); Mon, 15 Mar 2021 09:56:55 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E857964EB6; Mon, 15 Mar 2021 13:56:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816615; bh=Hh6bLwOHaaKuMgUMulZHgJrRFgg8MV3VXJXtKBYwGcY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=khv7x2FSG5vNlh/byEOvaQmhD14ID9pfzlHGlOnSSl+MoSmiuS0E3QaA/qCKKMZxd qiYyDar6AGoRn3TAr8peD+zJTD38k5N1vZHh0OPhsWVRJjHiLWhVTIrzX468U9nAxr BaBALbJBboaqdyg8BvA19VfsbfMeiMzeDCuUYwy8= 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 5.10 014/290] can: flexcan: invoke flexcan_chip_freeze() to enter freeze mode Date: Mon, 15 Mar 2021 14:51:47 +0100 Message-Id: <20210315135542.429568171@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135541.921894249@linuxfoundation.org> References: <20210315135541.921894249@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 c63820045e2000f05657467a08715c18c9f490d9 upstream. Invoke flexcan_chip_freeze() to enter freeze mode, since need poll freeze mode acknowledge. Fixes: e955cead03117 ("CAN: Add Flexcan CAN controller driver") Link: https://lore.kernel.org/r/20210218110037.16591-4-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 | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) --- a/drivers/net/can/flexcan.c +++ b/drivers/net/can/flexcan.c @@ -1375,10 +1375,13 @@ static int flexcan_chip_start(struct net flexcan_set_bittiming(dev); + /* set freeze, halt */ + err = flexcan_chip_freeze(priv); + if (err) + goto out_chip_disable; + /* MCR * - * enable freeze - * halt now * only supervisor access * enable warning int * enable individual RX masking @@ -1387,9 +1390,8 @@ static int flexcan_chip_start(struct net */ reg_mcr = priv->read(®s->mcr); reg_mcr &= ~FLEXCAN_MCR_MAXMB(0xff); - reg_mcr |= FLEXCAN_MCR_FRZ | FLEXCAN_MCR_HALT | FLEXCAN_MCR_SUPV | - FLEXCAN_MCR_WRN_EN | FLEXCAN_MCR_IRMQ | FLEXCAN_MCR_IDAM_C | - FLEXCAN_MCR_MAXMB(priv->tx_mb_idx); + reg_mcr |= FLEXCAN_MCR_SUPV | FLEXCAN_MCR_WRN_EN | FLEXCAN_MCR_IRMQ | + FLEXCAN_MCR_IDAM_C | FLEXCAN_MCR_MAXMB(priv->tx_mb_idx); /* MCR *