aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/can/cc770 (follow)
AgeCommit message (Collapse)AuthorFilesLines
2013-09-21can: cc770: use dev_get_platdata()Jingoo Han1-2/+2
Use the wrapper function for retrieving the platform data instead of accessing dev->platform_data directly. This is a cosmetic change to make the code simpler and enhance the readability. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2013-06-03net: can: use platform_{get,set}_drvdata()Jingoo Han2-5/+4
Use the wrapper functions for getting and setting the driver data using platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev, so we can directly pass a struct platform_device. Also, unnecessary dev_set_drvdata() is removed, because the driver core clears the driver data to NULL after device_release or on probe failure. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2013-01-26can: Kconfig: convert 'depends on CAN_DEV' into 'if CAN_DEV...endif' blockMarc Kleine-Budde1-1/+1
This patch adds an 'if CAN_DEV...endif' Block around the CAN driver symbols in drivers/net/can/Kconfig. So the 'depends on CAN' dependencies can be removed. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2012-12-07drivers/net: fix up function prototypes after __dev* removalsGreg Kroah-Hartman1-2/+2
The __dev* removal patches for the network drivers ended up messing up the function prototypes for a bunch of drivers. This patch fixes all of them back up to be properly aligned. Bonus is that this almost removes 100 lines of code, always a nice surprise. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-12-03can: remove __dev* attributesBill Pemberton2-15/+15
CONFIG_HOTPLUG is going away as an option. As result the __dev* markings will be going away. Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Wolfgang Grandegger <wg@grandegger.com> Cc: Marc Kleine-Budde <mkl@pengutronix.de> Cc: linux-can@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-27can: cc770_platform: add MODULE_ALIAS and MODULE_DEVICE_TABLEMarc Kleine-Budde1-0/+2
This patch adds a MODULE_ALIAS for the platform bindings and a MODULE_DEVICE_TABLE for of bindings, so that the module can be loaded automatically by udev. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2012-07-20can: mark bittiming_const pointer in struct can_priv as constMarc Kleine-Budde1-1/+1
This patch marks the bittiming_const pointer as in the struct can_pric as "const". This allows us to mark the struct can_bittiming_const in the CAN drivers as "const", too. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2012-07-02can: cc770: fix sparse warning for cc770_interruptMarc Kleine-Budde1-1/+1
Make cc770_interrupt static to fix the following sparse warning: drivers/net/can/cc770/cc770.c:699:13: warning: symbol 'cc770_interrupt' was not declared. Should it be static? Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2012-06-03can: cc770: Fix likely misuse of | for &Joe Perches1-1/+1
Using | with a constant is always true. Likely this should have be &. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2012-03-03can: cc770: linux/can/dev.h included twiceDanny Kukawka1-1/+0
drivers/net/can/cc770/cc770.c included 'linux/can/dev.h' twice, remove the duplicate. Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2012-02-03can: cc770: Fix indirect access deadlock on ISA cardsWolfgang Zarre1-1/+15
This fix avoids a deadlock if an interrupt occurs during consecutive port operations on ISA cards utilising indirect access via address and data port. Tested on a B&R ISA card. Cc: linux-can@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Wolfgang Zarre <lkdev@essax.com> Acked-by: Wolfgang Grandegger <wg@grandegger.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2012-02-03can: cc770: store echo skb before starting the transferWolfgang Grandegger1-1/+3
On slow systems and high CAN bitrates, the error message "can_put_echo_skb: BUG! echo_skb is occupied!" did show up because can_put_echo_skb() was called after starting the transfer. Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2011-12-01can: cc770: add platform bus driver for the CC770 and AN82527Wolfgang Grandegger3-0/+280
This driver works with both, static platform data and device tree bindings. It has been tested on a TQM855L board with two AN82527 CAN controllers on the local bus. CC: Devicetree-discuss@lists.ozlabs.org CC: linuxppc-dev@ozlabs.org CC: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Acked-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-01can: cc770: add legacy ISA bus driver for the CC770 and AN82527Wolfgang Grandegger3-0/+379
This patch adds support for legacy Bosch CC770 and Intel AN82527 CAN controllers on the ISA or PC-104 bus. The I/O port or memory address and the IRQ number must be specified via module parameters: insmod cc770_isa.ko port=0x310,0x380 irq=7,11 for ISA devices using I/O ports or: insmod cc770_isa.ko mem=0xd1000,0xd1000 irq=7,11 for memory mapped ISA devices. Indirect access via address and data port is supported as well: insmod cc770_isa.ko port=0x310,0x380 indirect=1 irq=7,11 Furthermore, the following mode parameter can be defined: clk: External oscillator clock frequency (default=16000000 [16 MHz]) cir: CPU interface register (default=0x40 [DSC]) bcr: Bus configuration register (default=0x40 [CBY]) cor: Clockout register (default=0x00) Note: for clk, cir, bcr and cor, the first argument re-defines the default for all other devices, e.g.: insmod cc770_isa.ko mem=0xd1000,0xd1000 irq=7,11 clk=24000000 is equivalent to insmod cc770_isa.ko mem=0xd1000,0xd1000 irq=7,11 clk=24000000,24000000 Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Acked-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-01can: cc770: add driver core for the Bosch CC770 and Intel AN82527Wolfgang Grandegger4-0/+1094
Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Acked-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-30can: Revert outdated cc770 driver patches.David S. Miller5-1501/+0
Newer versions have been floating about, and I applied to older variant unfortunately. Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-29can: cc770: legacy CC770 ISA bus driverWolfgang Grandegger3-0/+349
This patch adds support for legacy Bosch CC770 and Intel AN82527 CAN controllers on the ISA or PC-104 bus. The I/O port or memory address and the IRQ number must be specified via module parameters: insmod cc770_isa.ko port=0x310,0x380 irq=7,11 for ISA devices using I/O ports or: insmod cc770_isa.ko mem=0xd1000,0xd1000 irq=7,11 for memory mapped ISA devices. Indirect access via address and data port is supported as well: insmod cc770_isa.ko port=0x310,0x380 indirect=1 irq=7,11 Furthermore, the following mode parameter can be defined: clk: External oscillator clock frequency (default=16000000 [16 MHz]) cir: CPU interface register (default=0x40 [CPU_DSC]) ocr, Bus configuration register (default=0x00) cor, Clockout register (default=0x00) Note: for clk, cir, bcr and cor, the first argument re-defines the default for all other devices, e.g.: insmod cc770_isa.ko mem=0xd1000,0xd1000 irq=7,11 clk=24000000 is equivalent to insmod cc770_isa.ko mem=0xd1000,0xd1000 irq=7,11 clk=24000000,24000000 Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-29can: cc770: add driver core for the Bosch CC770 and Intel AN82527Wolfgang Grandegger4-0/+1152
Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Signed-off-by: David S. Miller <davem@davemloft.net>