]> asedeno.scripts.mit.edu Git - linux.git/commit
can: flexcan: Remodel FlexCAN register r/w APIs for big endian FlexCAN controllers.
authorPankaj Bansal <pankaj.bansal@nxp.com>
Fri, 24 Nov 2017 13:22:08 +0000 (18:52 +0530)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Fri, 1 Dec 2017 08:14:23 +0000 (09:14 +0100)
commit88462d2a7830b23edb31f467e8fcd06e56d4cb98
treed491a2ca0a76815d33b1b24565a583f09637e0c3
parenta4efd5d8a46e2ff3f04ba22b1f3b9ab52eca7154
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: Pankaj Bansal <pankaj.bansal@nxp.com>
Signed-off-by: Bhupesh Sharma <bhupesh.sharma@freescale.com>
Signed-off-by: Sakar Arora <Sakar.Arora@freescale.com>
Reviewed-by: Zhengxiong Jin <Jason.Jin@freescale.com>
Reviewed-by: Poonam Aggrwal <poonam.aggrwal@nxp.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/flexcan.c