can: m_can: Call the RAM init directly from m_can_chip_config
authorVivek Yadav <vivek.2311@samsung.com>
Wed, 7 Dec 2022 10:06:31 +0000 (15:36 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:14:20 +0000 (13:14 +0100)
commitd50092f662ecec00d0000ff2e967b151136cadfc
treef9a01004e72106aa72fe4f29679036a870b88033
parent55064642aac1dc06897bad855777e2031c4c180c
can: m_can: Call the RAM init directly from m_can_chip_config

[ Upstream commit eaacfeaca7ad0804b9a6eff7afeba93a87db7638 ]

When we try to access the mcan message ram addresses during the probe,
hclk is gated by any other drivers or disabled, because of that probe
gets failed.

Move the mram init functionality to mcan chip config called by
m_can_start from mcan open function, by that time clocks are
enabled.

Suggested-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Vivek Yadav <vivek.2311@samsung.com>
Link: https://lore.kernel.org/all/20221207100632.96200-2-vivek.2311@samsung.com
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Stable-dep-of: 67727a17a6b3 ("can: tcan4x5x: Fix use of register error status mask")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/can/m_can/m_can.c
drivers/net/can/m_can/m_can_platform.c
drivers/net/can/m_can/tcan4x5x-core.c