Re: [PATCH v3 4/4] can: flexcan: add vf610 support for FlexCAN
From: Marc Kleine-Budde
Date: Mon Jul 28 2014 - 12:29:13 EST
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:
signature.asc
Description: OpenPGP digital signature