All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: linux-can@vger.kernel.org
Cc: kernel@pengutronix.de, Marc Kleine-Budde <mkl@pengutronix.de>,
	Joakim Zhang <qiangqing.zhang@nxp.com>
Subject: [PATCH 14/17] can: flexcan: remove ack_grp and ack_bit handling from driver
Date: Tue,  6 Oct 2020 22:37:45 +0200	[thread overview]
Message-ID: <20201006203748.1750156-15-mkl@pengutronix.de> (raw)
In-Reply-To: <20201006203748.1750156-1-mkl@pengutronix.de>

Since commit:

    048e3a34a2e7 can: flexcan: poll MCR_LPM_ACK instead of GPR ACK for stop mode acknowledgment

the driver polls the IP core's internal bit MCR[LPM_ACK] as stop mode
acknowledge and not the acknowledgment on chip level.

This means the 4th and 5th value of the property "fsl,stop-mode" isn't used
anymore. This patch removes the used "ack_gpr" and "ack_bit" from the driver.

Fixes: 048e3a34a2e7 ("can: flexcan: poll MCR_LPM_ACK instead of GPR ACK for stop mode acknowledgment")
Cc: Joakim Zhang <qiangqing.zhang@nxp.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 drivers/net/can/flexcan.c | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c
index fbdd9a8c9374..4d594e977497 100644
--- a/drivers/net/can/flexcan.c
+++ b/drivers/net/can/flexcan.c
@@ -333,8 +333,6 @@ struct flexcan_stop_mode {
 	struct regmap *gpr;
 	u8 req_gpr;
 	u8 req_bit;
-	u8 ack_gpr;
-	u8 ack_bit;
 };
 
 struct flexcan_priv {
@@ -1847,14 +1845,14 @@ static int flexcan_setup_stop_mode(struct platform_device *pdev)
 	struct device_node *gpr_np;
 	struct flexcan_priv *priv;
 	phandle phandle;
-	u32 out_val[5];
+	u32 out_val[3];
 	int ret;
 
 	if (!np)
 		return -EINVAL;
 
 	/* stop mode property format is:
-	 * <&gpr req_gpr req_bit ack_gpr ack_bit>.
+	 * <&gpr req_gpr>.
 	 */
 	ret = of_property_read_u32_array(np, "fsl,stop-mode", out_val,
 					 ARRAY_SIZE(out_val));
@@ -1880,13 +1878,10 @@ static int flexcan_setup_stop_mode(struct platform_device *pdev)
 
 	priv->stm.req_gpr = out_val[1];
 	priv->stm.req_bit = out_val[2];
-	priv->stm.ack_gpr = out_val[3];
-	priv->stm.ack_bit = out_val[4];
 
 	dev_dbg(&pdev->dev,
-		"gpr %s req_gpr=0x02%x req_bit=%u ack_gpr=0x02%x ack_bit=%u\n",
-		gpr_np->full_name, priv->stm.req_gpr, priv->stm.req_bit,
-		priv->stm.ack_gpr, priv->stm.ack_bit);
+		"gpr %s req_gpr=0x02%x req_bit=%u\n",
+		gpr_np->full_name, priv->stm.req_gpr, priv->stm.req_bit);
 
 	device_set_wakeup_capable(&pdev->dev, true);
 
-- 
2.28.0


  parent reply	other threads:[~2020-10-06 20:37 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-06 20:37 [RFC]: can-next 2020-10-06 Marc Kleine-Budde
2020-10-06 20:37 ` [PATCH 01/17] can: af_can: can_rcv_list_find(): fix kernel doc after variable renaming Marc Kleine-Budde
2020-10-06 20:37 ` [PATCH 02/17] can: softing: softing_card_shutdown(): add braces around empty body in an 'if' statement Marc Kleine-Budde
2020-10-06 20:37 ` [PATCH 03/17] can: c_can: reg_map_{c,d}_can: mark as __maybe_unused Marc Kleine-Budde
2020-10-06 20:37 ` [PATCH 04/17] MAINTAINERS: adjust to mcp251xfd file renaming Marc Kleine-Budde
2020-10-06 20:37 ` [PATCH 05/17] can: raw: add missing error queue support Marc Kleine-Budde
2020-10-06 20:37 ` [PATCH 06/17] can: dev: fix type of get_can_dlc() and get_canfd_dlc() macros Marc Kleine-Budde
2020-10-06 20:37 ` [PATCH 07/17] can: dev: add a helper function to calculate the duration of one bit Marc Kleine-Budde
2020-10-06 20:37 ` [PATCH 08/17] can: add ISO 15765-2:2016 transport protocol Marc Kleine-Budde
2020-10-06 20:37 ` [PATCH 09/17] dt-bindings: can: rcar_can: Add r8a7742 support Marc Kleine-Budde
2020-10-06 20:37 ` [PATCH 10/17] dt-bindings: can: rcar_canfd: Document r8a774e1 support Marc Kleine-Budde
2020-10-06 20:37 ` [PATCH 11/17] dt-bindings: can: rcar_can: " Marc Kleine-Budde
2020-10-06 20:37 ` [PATCH 12/17] dt-bindings: can: flexcan: list supported processors Marc Kleine-Budde
2020-10-06 20:37 ` [PATCH 13/17] dt-bindings: can: flexcan: remove ack_grp and ack_bit from fsl,stop-mode Marc Kleine-Budde
2020-10-07 15:56   ` Rob Herring
2020-10-06 20:37 ` Marc Kleine-Budde [this message]
2020-10-06 20:37 ` [PATCH 15/17] can: xilinx_can: Limit CANFD brp to 2 Marc Kleine-Budde
2020-10-06 20:37 ` [PATCH 16/17] can: xilinx_can: Check return value of set_reset_mode Marc Kleine-Budde
2020-10-06 20:37 ` [PATCH 17/17] can: xilinx_can: Fix incorrect variable and initialize with a default value Marc Kleine-Budde
2020-10-07 21:31 pull-request: can-next 2020-10-07 Marc Kleine-Budde
2020-10-07 21:31 ` [PATCH 14/17] can: flexcan: remove ack_grp and ack_bit handling from driver Marc Kleine-Budde
2020-10-14  8:53   ` Joakim Zhang
2020-10-14 10:17     ` Marc Kleine-Budde

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201006203748.1750156-15-mkl@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=kernel@pengutronix.de \
    --cc=linux-can@vger.kernel.org \
    --cc=qiangqing.zhang@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.