Linux CAN drivers development
 help / color / mirror / Atom feed
From: "Lothar Waßmann" <LW@KARO-electronics.de>
To: Marc Kleine-Budde <mkl@pengutronix.de>
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>,
	Russell King - ARM Linux <linux@arm.linux.org.uk>,
	"linux-can@vger.kernel.org" <linux-can@vger.kernel.org>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: imprecise external abort using the flexcan driver on i.MX6Q
Date: Fri, 27 Sep 2013 12:43:10 +0200	[thread overview]
Message-ID: <21061.24894.57898.36640@ipc1.ka-ro> (raw)
In-Reply-To: <52455A7D.6030403@pengutronix.de>

Hi,

Marc Kleine-Budde writes:
> On 09/27/2013 12:04 PM, Lothar Waßmann wrote:
> 
> >> They layout of the flexcan varies in the different imx chips. I'm
> >> comparing the datasheets at the moment. As Russell pointed out the area
> >> staring at offset 0x80 is by the reception FIFO engine.
> >>
> > The layout is correct when the Rx FIFO is disabled!
> > 
> > removing 'FLEXCAN_MCR_FEN' from the MCR setting makes the driver work
> > as expected (just without receive fifo).
> > 
> > For the use case with the FIFO enabled, the layout has to be changed
> > obviously.
> 
> Can you just remove the loop completely? I think it's not needed. It
> was in the original driver, when I picked it up.
> 
> diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c
> index e1ac75d..57ee3df 100644
> --- a/drivers/net/can/flexcan.c
> +++ b/drivers/net/can/flexcan.c
> @@ -778,17 +778,6 @@ static int flexcan_chip_start(struct net_device *dev)
>         netdev_dbg(dev, "%s: writing ctrl=0x%08x", __func__, reg_ctrl);
>         flexcan_write(reg_ctrl, &regs->ctrl);
> 
> -       for (i = 0; i < ARRAY_SIZE(regs->cantxfg); i++) {
> -               flexcan_write(0, &regs->cantxfg[i].can_ctrl);
> -               flexcan_write(0, &regs->cantxfg[i].can_id);
> -               flexcan_write(0, &regs->cantxfg[i].data[0]);
> -               flexcan_write(0, &regs->cantxfg[i].data[1]);
> -
> -               /* put MB into rx queue */
> -               flexcan_write(FLEXCAN_MB_CNT_CODE(0x4),
> -                       &regs->cantxfg[i].can_ctrl);
> -       }
> -
>         /* acceptance mask/acceptance code (accept everything) */
>         flexcan_write(0x0, &regs->rxgmask);
>         flexcan_write(0x0, &regs->rx14mask);
> 
OK, done that. Driver works perfectly well now on i.MX6Q. I'll retest
on i.MX53 later to make sure it's still working there too.


Lothar Waßmann
-- 
___________________________________________________________

Ka-Ro electronics GmbH | Pascalstraße 22 | D - 52076 Aachen
Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10
Geschäftsführer: Matthias Kaussen
Handelsregistereintrag: Amtsgericht Aachen, HRB 4996

www.karo-electronics.de | info@karo-electronics.de
___________________________________________________________

  reply	other threads:[~2013-09-27 10:43 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <21060.15934.600859.167074@ipc1.ka-ro>
2013-09-26 15:42 ` imprecise external abort using the flexcan driver on i.MX6Q Marc Kleine-Budde
2013-09-26 15:54   ` Russell King - ARM Linux
2013-09-26 16:24     ` Santosh Shilimkar
2013-09-27  9:23       ` Lothar Waßmann
2013-09-27  9:43         ` Marc Kleine-Budde
2013-09-27 10:04           ` Lothar Waßmann
2013-09-27 10:14             ` Marc Kleine-Budde
2013-09-27 10:43               ` Lothar Waßmann [this message]
2013-09-26 19:04     ` Matt Sealey
2013-09-27  9:41       ` Lothar Waßmann
2013-09-27 17:24         ` Matt Sealey
2013-09-27 19:55           ` Marc Kleine-Budde
2013-09-30 11:06             ` Lothar Waßmann
2013-09-30 11:19               ` Marc Kleine-Budde
2013-09-30 11:37                 ` Lothar Waßmann
2013-09-30 11:39                   ` Marc Kleine-Budde
2013-09-27  8:59   ` Lothar Waßmann

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=21061.24894.57898.36640@ipc1.ka-ro \
    --to=lw@karo-electronics.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-can@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=mkl@pengutronix.de \
    --cc=santosh.shilimkar@ti.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox