can: m_can: Move accessing of message ram to after clocks are enabled
[ Upstream commit 54e4a0c486
]
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 <faiz_abbas@ti.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Родитель
0b14a856f9
Коммит
562d7bc6c9
|
@ -1637,8 +1637,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);
|
||||
|
||||
|
@ -1649,6 +1647,8 @@ static int m_can_plat_probe(struct platform_device *pdev)
|
|||
goto failed_free_dev;
|
||||
}
|
||||
|
||||
m_can_of_parse_mram(priv, mram_config_vals);
|
||||
|
||||
devm_can_led_init(dev);
|
||||
|
||||
dev_info(&pdev->dev, "%s device registered (irq=%d, version=%d)\n",
|
||||
|
@ -1698,8 +1698,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)) {
|
||||
|
@ -1709,6 +1707,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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче