From: mkl@pengutronix.de (Marc Kleine-Budde)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 4/4] can: flexcan: add vf610 support for FlexCAN
Date: Mon, 28 Jul 2014 18:28:54 +0200 [thread overview]
Message-ID: <53D67A46.3060202@pengutronix.de> (raw)
In-Reply-To: <e88108c655e2c16dc9cf6c4194547e73@agner.ch>
On 07/28/2014 06:20 PM, Stefan Agner wrote:
>>> Ping. Anything open/to do from my side?
>>
>> Please keep the printing of esr and ctrl in the interrupt handler, add a
>> #define DEBUG in the driver, but do not change anything else. Then:
^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c
> index 1c31a5d..fe8b81c 100644
> --- a/drivers/net/can/flexcan.c
> +++ b/drivers/net/can/flexcan.c
> @@ -19,6 +19,7 @@
> *
> */
>
> +#define DEBUG
keep
> #include <linux/netdevice.h>
> #include <linux/can.h>
> #include <linux/can/dev.h>
> @@ -743,6 +744,9 @@ static irqreturn_t flexcan_irq(int irq, void
> *dev_id)
>
> reg_iflag1 = flexcan_read(®s->iflag1);
> reg_esr = flexcan_read(®s->esr);
> +
> + printk("flexcan_irq, esr=%08x\n", reg_esr);
> + printk("flexcan_irq, ctrl=%08x\n", flexcan_read(®s->ctrl));
keep
> /* ACK all bus error and state change IRQ sources */
> if (reg_esr & FLEXCAN_ESR_ALL_INT)
> flexcan_write(reg_esr & FLEXCAN_ESR_ALL_INT,
> ®s->esr);
> @@ -885,8 +889,8 @@ static int flexcan_chip_start(struct net_device
> *dev)
> */
> reg_ctrl = flexcan_read(®s->ctrl);
> reg_ctrl &= ~FLEXCAN_CTRL_TSYN;
> - reg_ctrl |= FLEXCAN_CTRL_BOFF_REC | FLEXCAN_CTRL_LBUF |
> - FLEXCAN_CTRL_ERR_STATE;
> + reg_ctrl |= FLEXCAN_CTRL_BOFF_REC | FLEXCAN_CTRL_LBUF;// |
> + //FLEXCAN_CTRL_ERR_STATE;
> /*
> * enable the "error interrupt" (FLEXCAN_CTRL_ERR_MSK),
> * on most Flexcan cores, too. Otherwise we don't get
>
> I'm not sure whether you really want to keep the FLEXCAN_CTRL_ERR_STATE
> commented out...
No, please remove this change and redo the test.
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Industrial Linux Solutions | Phone: +49-231-2826-924 |
Vertretung West/Dortmund | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 242 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140728/af1eab34/attachment.sig>
WARNING: multiple messages have this Message-ID (diff)
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Stefan Agner <stefan@agner.ch>
Cc: shawn.guo@freescale.com, kernel@pengutronix.de,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 4/4] can: flexcan: add vf610 support for FlexCAN
Date: Mon, 28 Jul 2014 18:28:54 +0200 [thread overview]
Message-ID: <53D67A46.3060202@pengutronix.de> (raw)
In-Reply-To: <e88108c655e2c16dc9cf6c4194547e73@agner.ch>
[-- Attachment #1: Type: text/plain, Size: 2156 bytes --]
On 07/28/2014 06:20 PM, Stefan Agner wrote:
>>> Ping. Anything open/to do from my side?
>>
>> Please keep the printing of esr and ctrl in the interrupt handler, add a
>> #define DEBUG in the driver, but do not change anything else. Then:
^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c
> index 1c31a5d..fe8b81c 100644
> --- a/drivers/net/can/flexcan.c
> +++ b/drivers/net/can/flexcan.c
> @@ -19,6 +19,7 @@
> *
> */
>
> +#define DEBUG
keep
> #include <linux/netdevice.h>
> #include <linux/can.h>
> #include <linux/can/dev.h>
> @@ -743,6 +744,9 @@ static irqreturn_t flexcan_irq(int irq, void
> *dev_id)
>
> reg_iflag1 = flexcan_read(®s->iflag1);
> reg_esr = flexcan_read(®s->esr);
> +
> + printk("flexcan_irq, esr=%08x\n", reg_esr);
> + printk("flexcan_irq, ctrl=%08x\n", flexcan_read(®s->ctrl));
keep
> /* ACK all bus error and state change IRQ sources */
> if (reg_esr & FLEXCAN_ESR_ALL_INT)
> flexcan_write(reg_esr & FLEXCAN_ESR_ALL_INT,
> ®s->esr);
> @@ -885,8 +889,8 @@ static int flexcan_chip_start(struct net_device
> *dev)
> */
> reg_ctrl = flexcan_read(®s->ctrl);
> reg_ctrl &= ~FLEXCAN_CTRL_TSYN;
> - reg_ctrl |= FLEXCAN_CTRL_BOFF_REC | FLEXCAN_CTRL_LBUF |
> - FLEXCAN_CTRL_ERR_STATE;
> + reg_ctrl |= FLEXCAN_CTRL_BOFF_REC | FLEXCAN_CTRL_LBUF;// |
> + //FLEXCAN_CTRL_ERR_STATE;
> /*
> * enable the "error interrupt" (FLEXCAN_CTRL_ERR_MSK),
> * on most Flexcan cores, too. Otherwise we don't get
>
> I'm not sure whether you really want to keep the FLEXCAN_CTRL_ERR_STATE
> commented out...
No, please remove this change and redo the test.
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Industrial Linux Solutions | Phone: +49-231-2826-924 |
Vertretung West/Dortmund | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 242 bytes --]
next prev parent reply other threads:[~2014-07-28 16:28 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-15 12:56 [PATCH v3 0/4] ARM: vf610: add FlexCAN support Stefan Agner
2014-07-15 12:56 ` Stefan Agner
2014-07-15 12:56 ` [PATCH v3 1/4] ARM: dts: vf610: add FlexCAN node Stefan Agner
2014-07-15 12:56 ` Stefan Agner
2014-07-15 12:56 ` [PATCH v3 2/4] ARM: imx: clk-vf610: fix FlexCAN clock gating Stefan Agner
2014-07-15 12:56 ` Stefan Agner
2014-07-15 12:56 ` [PATCH v3 3/4] can: flexcan: switch on clocks before accessing ecr register Stefan Agner
2014-07-15 12:56 ` Stefan Agner
2014-07-15 13:54 ` Lothar Waßmann
2014-07-15 13:54 ` Lothar Waßmann
2014-07-15 13:57 ` Marc Kleine-Budde
2014-07-15 13:57 ` Marc Kleine-Budde
2014-07-15 12:56 ` [PATCH v3 4/4] can: flexcan: add vf610 support for FlexCAN Stefan Agner
2014-07-15 12:56 ` Stefan Agner
2014-07-15 14:24 ` Marc Kleine-Budde
2014-07-15 14:24 ` Marc Kleine-Budde
2014-07-16 6:43 ` Stefan Agner
2014-07-16 6:43 ` Stefan Agner
2014-07-25 10:50 ` Stefan Agner
2014-07-25 10:50 ` Stefan Agner
2014-07-25 13:33 ` Marc Kleine-Budde
2014-07-25 13:33 ` Marc Kleine-Budde
2014-07-28 16:20 ` Stefan Agner
2014-07-28 16:20 ` Stefan Agner
2014-07-28 16:28 ` Marc Kleine-Budde [this message]
2014-07-28 16:28 ` Marc Kleine-Budde
2014-07-29 7:29 ` Stefan Agner
2014-07-29 7:29 ` Stefan Agner
2014-07-30 11:47 ` Marc Kleine-Budde
2014-07-30 11:47 ` Marc Kleine-Budde
2014-08-04 13:43 ` Stefan Agner
2014-08-04 13:43 ` Stefan Agner
2014-08-04 14:27 ` Marc Kleine-Budde
2014-08-04 14:27 ` Marc Kleine-Budde
2014-08-04 16:01 ` Stefan Agner
2014-08-04 16:01 ` Stefan Agner
2014-08-05 9:52 ` Marc Kleine-Budde
2014-08-05 9:52 ` Marc Kleine-Budde
2014-08-05 12:38 ` Stefan Agner
2014-08-05 12:38 ` Stefan Agner
2014-08-14 10:38 ` Marc Kleine-Budde
2014-08-14 10:38 ` Marc Kleine-Budde
2014-07-28 16:28 ` Marc Kleine-Budde
2014-07-28 16:31 ` Marc Kleine-Budde
2014-07-28 16:31 ` Marc Kleine-Budde
2014-07-28 16:20 ` Stefan Agner
2014-07-15 13:54 ` [PATCH v3 0/4] ARM: vf610: add FlexCAN support Marc Kleine-Budde
2014-07-15 13:54 ` Marc Kleine-Budde
2014-08-14 10:04 ` Marc Kleine-Budde
2014-08-14 10:04 ` Marc Kleine-Budde
2014-07-16 6:11 ` Shawn Guo
2014-07-16 6:11 ` Shawn Guo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53D67A46.3060202@pengutronix.de \
--to=mkl@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.