can: ifi: Check core revision upon probe
authorMarek Vasut <marex@denx.de>
Mon, 5 Mar 2018 20:29:52 +0000 (21:29 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Mar 2018 16:24:44 +0000 (18:24 +0200)
commit18f29aa5b55de4bf15d9567ebf76253f5ae73c6b
tree0d19e4b1b75e739bcfa0f5d703bc318d6b51fea2
parent8a731531d08ff31cee4836b95c151df0df8a83b6
can: ifi: Check core revision upon probe

commit 591d65d5b15496af8d05e252bc1da611c66c0b79 upstream.

Older versions of the core are not compatible with the driver due
to various intrusive fixes of the core. Read out the VER register,
check the core revision bitfield and verify if the core in use is
new enough (rev 2.1 or newer) to work correctly with this driver.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Heiko Schocher <hs@denx.de>
Cc: Markus Marb <markus@marb.org>
Cc: Marc Kleine-Budde <mkl@pengutronix.de>
Cc: linux-stable <stable@vger.kernel.org>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/can/ifi_canfd/ifi_canfd.c