aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/can/flexcan.c
AgeCommit message (Collapse)AuthorFilesLines
2012-05-23can: flexcan: add PM supportEric Bénard1-0/+38
tested on an i.MX257 Signed-off-by: Eric Bénard <[email protected]> Signed-off-by: Marc Kleine-Budde <[email protected]>
2012-05-12can: flexcan: adopt pinctrl supportShawn Guo1-0/+6
Cc: [email protected] Signed-off-by: Shawn Guo <[email protected]> Acked-by: Marc Kleine-Budde <[email protected]> Acked-by: Dong Aisheng <[email protected]>
2012-02-04Merge branch 'master' of git://gitorious.org/linux-can/linux-can-nextDavid S. Miller1-33/+28
Conflicts: drivers/net/can/usb/ems_usb.c Minor dev_warn --> netdev_warn conversion conflicts.
2012-02-03can: replace the dev_dbg/info/err/... with the new netdev_xxx macrosWolfgang Grandegger1-23/+21
Cc: [email protected] Cc: Anant Gole <[email protected]> Cc: Chris Elston <[email protected]> Cc: Sebastian Haas <[email protected]> Cc: Matthias Fuchs <[email protected]> Signed-off-by: Wolfgang Grandegger <[email protected]> Acked-by: Sebastian Haas <[email protected]> Acked-by: Mike Frysinger <[email protected]> Signed-off-by: Marc Kleine-Budde <[email protected]>
2012-02-03can: flexcan: Fix CAN_RAW_RECV_OWN_MSGS and CAN_RAW_LOOPBACKReuben Dowle1-10/+7
Currently the flexcan driver uses hardware local echo. This blindly echos all transmitted frames to all receiving sockets, regardless what CAN_RAW_RECV_OWN_MSGS and CAN_RAW_LOOPBACK are set to. This patch now submits transmitted frames to be echoed in the transmit complete interrupt, preserving the reference to the sending socket. This allows the can protocol to correctly handle the local echo. Further this patch moves tx_bytes statistic accounting into the tx_complete handler. Signed-off-by: Reuben Dowle <[email protected]> [mkl: move tx_bytes accounting into tx_complete handler; cleanups] Signed-off-by: Marc Kleine-Budde <[email protected]>
2012-02-03can: flexcan: fix irq flooding by clearing all interrupt sourcesWolfgang Grandegger1-1/+6
As pointed out by Reuben Dowle and Lothar Waßmann, the TWRN_INT, RWRN_INT, BOFF_INT interrupt sources need to be cleared as well to avoid interrupt flooding, at least for the Flexcan on i.MX28 SOCs. Furthermore, the interrupts are only cleared, if really one of those interrupt sources are pending (which is not the case for rx and tx done). Cc: Reuben Dowle <[email protected]> Cc: Lothar Waßmann <[email protected]> Signed-off-by: Wolfgang Grandegger <[email protected]> Signed-off-by: Marc Kleine-Budde <[email protected]>
2012-01-09Merge tag 'clk' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-socLinus Torvalds1-5/+5
clock management changes for i.MX Another simple series related to clock management, this time only for imx. * tag 'clk' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: ARM: mxs: select HAVE_CLK_PREPARE for clock clk: add config option HAVE_CLK_PREPARE into Kconfig ASoC: mxs-saif: convert to clk_prepare/clk_unprepare video: mxsfb: convert to clk_prepare/clk_unprepare serial: mxs-auart: convert to clk_prepare/clk_unprepare net: flexcan: convert to clk_prepare/clk_unprepare mtd: gpmi-lib: convert to clk_prepare/clk_unprepare mmc: mxs-mmc: convert to clk_prepare/clk_unprepare dma: mxs-dma: convert to clk_prepare/clk_unprepare net: fec: add clk_prepare/clk_unprepare ARM: mxs: convert platform code to clk_prepare/clk_unprepare clk: add helper functions clk_prepare_enable and clk_disable_unprepare Fix up trivial conflicts in drivers/net/ethernet/freescale/fec.c due to commit 0ebafefcaa7a ("net: fec: add clk_prepare/clk_unprepare") clashing trivially with commit e163cc97f9ac ("net/fec: fix the .remove code").
2011-12-28net: flexcan: convert to clk_prepare/clk_unprepareShawn Guo1-5/+5
The patch converts flexcan driver to clk_prepare/clk_unprepare by using helper functions clk_prepare_enable/clk_disable_unprepare. Signed-off-by: Shawn Guo <[email protected]> Cc: Marc Kleine-Budde <[email protected]> Cc: David S. Miller <[email protected]>
2011-11-29net/can: convert drivers/net/can/* to use module_platform_driver()Axel Lin1-14/+1
This patch converts the drivers in drivers/net/can/* to use the module_platform_driver() macro which makes the code smaller and a bit simpler. Cc: Wolfgang Grandegger <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: Bhupesh Sharma <[email protected]> Cc: Jiri Kosina <[email protected]> Cc: Grant Likely <[email protected]> Cc: Anatolij Gustschin <[email protected]> Cc: Paul Bolle <[email protected]> Cc: Kurt Van Dijck <[email protected]> Cc: Alexey Dobriyan <[email protected]> Signed-off-by: Axel Lin <[email protected]> Acked-by: Marc Kleine-Budde <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-08-17flexcan: Prefer device tree clock frequency if available.[email protected]1-9/+25
If our CAN device's device tree node has a clock-frequency property, then use that value for the can devices clock frequency. If not, fall back to asking the platform/mach code for the clock frequency associated with the flexcan device. Signed-off-by: Robin Holt <[email protected]> Acked-by: Wolfgang Grandegger <[email protected]>, Cc: Kumar Gala <[email protected]> Cc: Marc Kleine-Budde <[email protected]>, Cc: U Bhaskar-B22300 <[email protected]> Cc: Scott Wood <[email protected]> Cc: Grant Likely <[email protected]> Cc: [email protected], Cc: [email protected], Cc: PPC list <[email protected]> Cc: [email protected] Signed-off-by: David S. Miller <[email protected]>
2011-08-17flexcan: Add of_match to platform_device definition.[email protected]1-1/+12
On powerpc, the OpenFirmware devices are not matched without specifying an of_match array. Introduce that array as that is used for matching on the Freescale P1010 processor. Signed-off-by: Robin Holt <[email protected]> Acked-by: Marc Kleine-Budde <[email protected]> Acked-by: Wolfgang Grandegger <[email protected]> Cc: U Bhaskar-B22300 <[email protected]> Cc: Grant Likely <[email protected]> Cc: [email protected] Cc: [email protected] Cc: PPC list <[email protected]> Cc: [email protected] Signed-off-by: David S. Miller <[email protected]>
2011-08-17flexcan: Abstract off read/write for big/little endian.[email protected]1-57/+83
Make flexcan driver handle register reads in the appropriate endianess. This was a basic search and replace and then define some inlines. Signed-off-by: Robin Holt <[email protected]> Acked-by: Marc Kleine-Budde <[email protected]> Acked-by: Wolfgang Grandegger <[email protected]> Cc: U Bhaskar-B22300 <[email protected]> Cc: [email protected] Cc: [email protected] Cc: PPC list <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-08-17flexcan: Remove #include <mach/clock.h>[email protected]1-2/+0
powerpc does not have a mach-####/clock.h. When testing, I found neither arm nor powerpc needed the mach/clock.h at all so I removed it. Signed-off-by: Robin Holt <[email protected]> Acked-by: Marc Kleine-Budde <[email protected]> Acked-by: Wolfgang Grandegger <[email protected]> Cc: U Bhaskar-B22300 <[email protected]> Cc: [email protected] Cc: [email protected] Cc: PPC list <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-06-02drivers/net/can/flexcan.c: add missing clk_putJulia Lawall1-3/+2
The failed_get label is used after the call to clk_get has succeeded, so it should be moved up above the call to clk_put. The failed_req labels doesn't do anything different than failed_get, so delete it. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r exists@ expression e1,e2; statement S; @@ e1 = clk_get@p1(...); ... when != e1 = e2 when != clk_put(e1) when any if (...) { ... when != clk_put(e1) when != if (...) { ... clk_put(e1) ... } * return@p3 ...; } else S // </smpl> Signed-off-by: Julia Lawall <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-10-26can: flexcan: fix use after free of privMarc Kleine-Budde1-1/+2
The priv is part of the memory allocated by alloc_candev(). This patch moved the free it after last usage of priv. Signed-off-by: Marc Kleine-Budde <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-07-22CAN: Add Flexcan CAN controller driverMarc Kleine-Budde1-0/+1030
This core is found on some Freescale SoCs and also some Coldfire SoCs. Support for Coldfire is missing though at the moment as they have an older revision of the core which does not have RX FIFO support. Signed-off-by: Sascha Hauer <[email protected]> Signed-off-by: Marc Kleine-Budde <[email protected]> Acked-by: Wolfgang Grandegger <[email protected]> Signed-off-by: Marc Kleine-Budde <[email protected]>