Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 886ab57c authored by David S. Miller's avatar David S. Miller
Browse files

Merge tag 'linux-can-next-for-3.15-20140212' of git://gitorious.org/linux-can/linux-can-next



linux-can-next-for-3.15-20140212

Marc Kleine-Budde says:

====================
this is a pull request of eight patches for net-next/master.

Florian Vaussard contributed a series that merged the sja1000 of_platform
into the platform driver. The of_platform driver is finally removed.
Stephane Grosjean supplied a patch to allocate CANFD skbs. In a patch
by Uwe Kleine-König another missing copyright information was added to
a userspace header. And a patch by Yoann DI RUZZA that adds listen only
mode to the at91_can driver.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 3410f22e 17a50ee4
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -12,6 +12,10 @@ Required properties:


Optional properties:
Optional properties:


- reg-io-width : Specify the size (in bytes) of the IO accesses that
	should be performed on the device.  Valid value is 1, 2 or 4.
	Default to 1 (8 bits).

- nxp,external-clock-frequency : Frequency of the external oscillator
- nxp,external-clock-frequency : Frequency of the external oscillator
	clock in Hz. Note that the internal clock frequency used by the
	clock in Hz. Note that the internal clock frequency used by the
	SJA1000 is half of that value. If not specified, a default value
	SJA1000 is half of that value. If not specified, a default value
+7 −2
Original line number Original line Diff line number Diff line
@@ -420,7 +420,11 @@ static void at91_chip_start(struct net_device *dev)
	at91_transceiver_switch(priv, 1);
	at91_transceiver_switch(priv, 1);


	/* enable chip */
	/* enable chip */
	at91_write(priv, AT91_MR, AT91_MR_CANEN);
	if (priv->can.ctrlmode & CAN_CTRLMODE_LISTENONLY)
		reg_mr = AT91_MR_CANEN | AT91_MR_ABM;
	else
		reg_mr = AT91_MR_CANEN;
	at91_write(priv, AT91_MR, reg_mr);


	priv->can.state = CAN_STATE_ERROR_ACTIVE;
	priv->can.state = CAN_STATE_ERROR_ACTIVE;


@@ -1341,7 +1345,8 @@ static int at91_can_probe(struct platform_device *pdev)
	priv->can.bittiming_const = &at91_bittiming_const;
	priv->can.bittiming_const = &at91_bittiming_const;
	priv->can.do_set_mode = at91_set_mode;
	priv->can.do_set_mode = at91_set_mode;
	priv->can.do_get_berr_counter = at91_get_berr_counter;
	priv->can.do_get_berr_counter = at91_get_berr_counter;
	priv->can.ctrlmode_supported = CAN_CTRLMODE_3_SAMPLES;
	priv->can.ctrlmode_supported = CAN_CTRLMODE_3_SAMPLES |
		CAN_CTRLMODE_LISTENONLY;
	priv->dev = dev;
	priv->dev = dev;
	priv->reg_base = addr;
	priv->reg_base = addr;
	priv->devtype_data = *devtype_data;
	priv->devtype_data = *devtype_data;
+24 −0
Original line number Original line Diff line number Diff line
@@ -512,6 +512,30 @@ struct sk_buff *alloc_can_skb(struct net_device *dev, struct can_frame **cf)
}
}
EXPORT_SYMBOL_GPL(alloc_can_skb);
EXPORT_SYMBOL_GPL(alloc_can_skb);


struct sk_buff *alloc_canfd_skb(struct net_device *dev,
				struct canfd_frame **cfd)
{
	struct sk_buff *skb;

	skb = netdev_alloc_skb(dev, sizeof(struct can_skb_priv) +
			       sizeof(struct canfd_frame));
	if (unlikely(!skb))
		return NULL;

	skb->protocol = htons(ETH_P_CANFD);
	skb->pkt_type = PACKET_BROADCAST;
	skb->ip_summed = CHECKSUM_UNNECESSARY;

	can_skb_reserve(skb);
	can_skb_prv(skb)->ifindex = dev->ifindex;

	*cfd = (struct canfd_frame *)skb_put(skb, sizeof(struct canfd_frame));
	memset(*cfd, 0, sizeof(struct canfd_frame));

	return skb;
}
EXPORT_SYMBOL_GPL(alloc_canfd_skb);

struct sk_buff *alloc_can_err_skb(struct net_device *dev, struct can_frame **cf)
struct sk_buff *alloc_can_err_skb(struct net_device *dev, struct can_frame **cf)
{
{
	struct sk_buff *skb;
	struct sk_buff *skb;
+3 −10
Original line number Original line Diff line number Diff line
@@ -17,16 +17,9 @@ config CAN_SJA1000_PLATFORM
	  the "platform bus" (Linux abstraction for directly to the
	  the "platform bus" (Linux abstraction for directly to the
	  processor attached devices).  Which can be found on various
	  processor attached devices).  Which can be found on various
	  boards from Phytec (http://www.phytec.de) like the PCM027,
	  boards from Phytec (http://www.phytec.de) like the PCM027,
	  PCM038.
	  PCM038. It also provides the OpenFirmware "platform bus" found

	  on embedded systems with OpenFirmware bindings, e.g. if you
config CAN_SJA1000_OF_PLATFORM
	  have a PowerPC based system you may want to enable this option.
	tristate "Generic OF Platform Bus based SJA1000 driver"
	depends on OF
	---help---
	  This driver adds support for the SJA1000 chips connected to
	  the OpenFirmware "platform bus" found on embedded systems with
	  OpenFirmware bindings, e.g. if you have a PowerPC based system
	  you may want to enable this option.


config CAN_EMS_PCMCIA
config CAN_EMS_PCMCIA
	tristate "EMS CPC-CARD Card"
	tristate "EMS CPC-CARD Card"
+0 −1
Original line number Original line Diff line number Diff line
@@ -5,7 +5,6 @@
obj-$(CONFIG_CAN_SJA1000) += sja1000.o
obj-$(CONFIG_CAN_SJA1000) += sja1000.o
obj-$(CONFIG_CAN_SJA1000_ISA) += sja1000_isa.o
obj-$(CONFIG_CAN_SJA1000_ISA) += sja1000_isa.o
obj-$(CONFIG_CAN_SJA1000_PLATFORM) += sja1000_platform.o
obj-$(CONFIG_CAN_SJA1000_PLATFORM) += sja1000_platform.o
obj-$(CONFIG_CAN_SJA1000_OF_PLATFORM) += sja1000_of_platform.o
obj-$(CONFIG_CAN_EMS_PCMCIA) += ems_pcmcia.o
obj-$(CONFIG_CAN_EMS_PCMCIA) += ems_pcmcia.o
obj-$(CONFIG_CAN_EMS_PCI) += ems_pci.o
obj-$(CONFIG_CAN_EMS_PCI) += ems_pci.o
obj-$(CONFIG_CAN_KVASER_PCI) += kvaser_pci.o
obj-$(CONFIG_CAN_KVASER_PCI) += kvaser_pci.o
Loading