Commit d9b081e3 authored by Marc Kleine-Budde's avatar Marc Kleine-Budde

can: flexcan: remove ack_grp and ack_bit handling from driver

Since commit:

    048e3a34 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.

Link: http://lore.kernel.org/r/20201006203748.1750156-15-mkl@pengutronix.de
Fixes: 048e3a34 ("can: flexcan: poll MCR_LPM_ACK instead of GPR ACK for stop mode acknowledgment")
Cc: Joakim Zhang <qiangqing.zhang@nxp.com>
Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
parent e4245bbc
...@@ -333,8 +333,6 @@ struct flexcan_stop_mode { ...@@ -333,8 +333,6 @@ struct flexcan_stop_mode {
struct regmap *gpr; struct regmap *gpr;
u8 req_gpr; u8 req_gpr;
u8 req_bit; u8 req_bit;
u8 ack_gpr;
u8 ack_bit;
}; };
struct flexcan_priv { struct flexcan_priv {
...@@ -1847,14 +1845,14 @@ static int flexcan_setup_stop_mode(struct platform_device *pdev) ...@@ -1847,14 +1845,14 @@ static int flexcan_setup_stop_mode(struct platform_device *pdev)
struct device_node *gpr_np; struct device_node *gpr_np;
struct flexcan_priv *priv; struct flexcan_priv *priv;
phandle phandle; phandle phandle;
u32 out_val[5]; u32 out_val[3];
int ret; int ret;
if (!np) if (!np)
return -EINVAL; return -EINVAL;
/* stop mode property format is: /* 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, ret = of_property_read_u32_array(np, "fsl,stop-mode", out_val,
ARRAY_SIZE(out_val)); ARRAY_SIZE(out_val));
...@@ -1880,13 +1878,10 @@ static int flexcan_setup_stop_mode(struct platform_device *pdev) ...@@ -1880,13 +1878,10 @@ static int flexcan_setup_stop_mode(struct platform_device *pdev)
priv->stm.req_gpr = out_val[1]; priv->stm.req_gpr = out_val[1];
priv->stm.req_bit = out_val[2]; 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, dev_dbg(&pdev->dev,
"gpr %s req_gpr=0x02%x req_bit=%u ack_gpr=0x02%x ack_bit=%u\n", "gpr %s req_gpr=0x02%x req_bit=%u\n",
gpr_np->full_name, priv->stm.req_gpr, priv->stm.req_bit, gpr_np->full_name, priv->stm.req_gpr, priv->stm.req_bit);
priv->stm.ack_gpr, priv->stm.ack_bit);
device_set_wakeup_capable(&pdev->dev, true); device_set_wakeup_capable(&pdev->dev, true);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment