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

Commit 264f0ef7 authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'for-davem' of git://gitorious.org/linux-can/linux-can-next



Marc Kleine-Budde says:

====================
this is a pull-request for net-next/master. It consists of a patch by
Oliver Hartkopp. In this patch he cleans up the sja1000 header file by
using a common prefix for all sja1000 defines.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents bf7bfd7f 06e1d1d7
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -168,12 +168,12 @@ static inline int ems_pci_check_chan(const struct sja1000_priv *priv)
	unsigned char res;

	/* Make sure SJA1000 is in reset mode */
	priv->write_reg(priv, REG_MOD, 1);
	priv->write_reg(priv, SJA1000_MOD, 1);

	priv->write_reg(priv, REG_CDR, CDR_PELICAN);
	priv->write_reg(priv, SJA1000_CDR, CDR_PELICAN);

	/* read reset-values */
	res = priv->read_reg(priv, REG_CDR);
	res = priv->read_reg(priv, SJA1000_CDR);

	if (res == CDR_PELICAN)
		return 1;
+3 −3
Original line number Diff line number Diff line
@@ -126,11 +126,11 @@ static irqreturn_t ems_pcmcia_interrupt(int irq, void *dev_id)
static inline int ems_pcmcia_check_chan(struct sja1000_priv *priv)
{
	/* Make sure SJA1000 is in reset mode */
	ems_pcmcia_write_reg(priv, REG_MOD, 1);
	ems_pcmcia_write_reg(priv, REG_CDR, CDR_PELICAN);
	ems_pcmcia_write_reg(priv, SJA1000_MOD, 1);
	ems_pcmcia_write_reg(priv, SJA1000_CDR, CDR_PELICAN);

	/* read reset-values */
	if (ems_pcmcia_read_reg(priv, REG_CDR) == CDR_PELICAN)
	if (ems_pcmcia_read_reg(priv, SJA1000_CDR) == CDR_PELICAN)
		return 1;

	return 0;
+2 −2
Original line number Diff line number Diff line
@@ -159,9 +159,9 @@ static int number_of_sja1000_chip(void __iomem *base_addr)
	for (i = 0; i < MAX_NO_OF_CHANNELS; i++) {
		/* reset chip */
		iowrite8(MOD_RM, base_addr +
			 (i * KVASER_PCI_PORT_BYTES) + REG_MOD);
			 (i * KVASER_PCI_PORT_BYTES) + SJA1000_MOD);
		status = ioread8(base_addr +
				 (i * KVASER_PCI_PORT_BYTES) + REG_MOD);
				 (i * KVASER_PCI_PORT_BYTES) + SJA1000_MOD);
		/* check reset bit */
		if (!(status & MOD_RM))
			break;
+1 −1
Original line number Diff line number Diff line
@@ -402,7 +402,7 @@ static void peak_pciec_write_reg(const struct sja1000_priv *priv,
	int c = (priv->reg_base - card->reg_base) / PEAK_PCI_CHAN_SIZE;

	/* sja1000 register changes control the leds state */
	if (port == REG_MOD)
	if (port == SJA1000_MOD)
		switch (val) {
		case MOD_RM:
			/* Reset Mode: set led on */
+4 −4
Original line number Diff line number Diff line
@@ -196,7 +196,7 @@ static void pcan_write_canreg(const struct sja1000_priv *priv, int port, u8 v)
	int c = (priv->reg_base - card->ioport_addr) / PCC_CHAN_SIZE;

	/* sja1000 register changes control the leds state */
	if (port == REG_MOD)
	if (port == SJA1000_MOD)
		switch (v) {
		case MOD_RM:
			/* Reset Mode: set led on */
@@ -509,11 +509,11 @@ static void pcan_free_channels(struct pcan_pccard *card)
static inline int pcan_channel_present(struct sja1000_priv *priv)
{
	/* make sure SJA1000 is in reset mode */
	pcan_write_canreg(priv, REG_MOD, 1);
	pcan_write_canreg(priv, REG_CDR, CDR_PELICAN);
	pcan_write_canreg(priv, SJA1000_MOD, 1);
	pcan_write_canreg(priv, SJA1000_CDR, CDR_PELICAN);

	/* read reset-values */
	if (pcan_read_canreg(priv, REG_CDR) == CDR_PELICAN)
	if (pcan_read_canreg(priv, SJA1000_CDR) == CDR_PELICAN)
		return 1;

	return 0;
Loading