Commit 88462d2a authored by Pankaj Bansal's avatar Pankaj Bansal Committed by Marc Kleine-Budde

can: flexcan: Remodel FlexCAN register r/w APIs for big endian FlexCAN controllers.

The FlexCAN driver assumed that FlexCAN controller is big endian for
powerpc architecture and little endian for other architectures.

But this may not be the case. FlexCAN controller can be little or big
endian on any architecture. For e.g. NXP LS1021A ARM based SOC has big
endian FlexCAN controller.

Therefore, the driver has been modified to add a provision for both
types of controllers using an additional device tree property. On a
"fsl,p1010-flexcan" device BE is default, on all other devices LE is.

Big Endian controllers should have "big-endian" set in the device tree.
check "Documentation/devicetree/bindings/net/can/fsl-flexcan.txt" for
usage.

This is the standard practice followed in linux. for more info check:
Documentation/devicetree/bindings/common-properties.txt
Signed-off-by: default avatarPankaj Bansal <pankaj.bansal@nxp.com>
Signed-off-by: default avatarBhupesh Sharma <bhupesh.sharma@freescale.com>
Signed-off-by: default avatarSakar Arora <Sakar.Arora@freescale.com>
Reviewed-by: default avatarZhengxiong Jin <Jason.Jin@freescale.com>
Reviewed-by: default avatarPoonam Aggrwal <poonam.aggrwal@nxp.com>
Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
parent a4efd5d8
This diff is collapsed.
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