From: Marc Kleine-Budde <mkl@pengutronix.de>
To: U Bhaskar-B22300 <B22300@freescale.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"holt@sgi.com" <holt@sgi.com>,
"wg@grandegger.com" <wg@grandegger.com>,
"davem@davemloft.net" <davem@davemloft.net>,
"linuxppc-release@linux.freescale.net"
<linuxppc-release@linux.freescale.net>,
"socketcan-core@lists.berlios.de"
<socketcan-core@lists.berlios.de>
Subject: Re: [PATCH 3/4] powerpc/p1010: FlexCAN Controller for of_ type
Date: Tue, 09 Aug 2011 12:56:15 +0200 [thread overview]
Message-ID: <4E41124F.8000608@pengutronix.de> (raw)
In-Reply-To: <9C64B7751C3BCA41B64A68E23005A7BE1BF197@039-SN1MPN1-004.039d.mgd.msft.net>
[-- Attachment #1: Type: text/plain, Size: 2582 bytes --]
On 08/09/2011 12:29 PM, U Bhaskar-B22300 wrote:
>> NACK - your patch does more than the description states (debug code).
> [Bhaskar] Ok I will change description as below
> This patch introduces the following features
> 1. provides the support for FlexCAN on P1010 SoC.
> 2. Provides the common read/write interface for ARM and PowerPC based FlexCAN.
> 3. Provides the clock interface for PowerPC based FlexCAN.
> Will it be OK ?
>
>> Further you still add bugs to the driver. I've send you patches to fix
>> them.
> [Bhaskar] Please mention what sort of BUG you are seeing ..
I have, it's in that mail:
> @@ -957,24 +952,24 @@ static int __devinit register_flexcandev(struct net_device *dev)
> >
> > /* select "bus clock", chip must be disabled */
> > flexcan_chip_disable(priv);
> > - reg = readl(®s->ctrl);
> > + reg = flexcan_read(®s->ctrl);
> > reg |= FLEXCAN_CTRL_CLK_SRC;
> > - writel(reg, ®s->ctrl);
> > + flexcan_write(reg, ®s->ctrl);
> >
> > flexcan_chip_enable(priv);
> >
> > /* set freeze, halt and activate FIFO, restrict register access */
> > - reg = readl(®s->mcr);
> > + reg = flexcan_read(®s->mcr);
> > reg |= FLEXCAN_MCR_FRZ | FLEXCAN_MCR_HALT |
> > FLEXCAN_MCR_FEN | FLEXCAN_MCR_SUPV;
> > - writel(reg, ®s->mcr);
> > + flexcan_write(reg, ®s->mcr);
> >
> > /*
> > * Currently we only support newer versions of this core
> > * featuring a RX FIFO. Older cores found on some Coldfire
> > * derivates are not yet supported.
> > */
> > - reg = readl(®s->mcr);
> > + reg = flexcan_read(®s->mcr);
> > if (!(reg & FLEXCAN_MCR_FEN)) {
> > dev_err(dev->dev.parent,
> > "Could not enable RX FIFO, unsupported core\n");
> > @@ -984,6 +979,7 @@ static int __devinit register_flexcandev(struct net_device *dev)
> >
> > err = register_candev(dev);
> >
> > + return err;
If you return here, the clock stays enabled....not good
> > out:
> > /* disable core and turn off clocks */
> > flexcan_chip_disable(priv);
> > @@ -992,7 +988,7 @@ static int __devinit register_flexcandev(struct net_device *dev)
> > return err;
> > }
For reference bugreport + fix:
https://lists.berlios.de/pipermail/socketcan-core/2011-July/005838.html
cheers, 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: 262 bytes --]
prev parent reply other threads:[~2011-08-09 10:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-08 15:00 [PATCH 3/4] powerpc/p1010: FlexCAN Controller for of_ type Bhaskar Upadhaya
2011-08-08 15:21 ` Marc Kleine-Budde
2011-08-09 10:29 ` U Bhaskar-B22300
[not found] ` <9C64B7751C3BCA41B64A68E23005A7BE1BF197-TcFNo7jSaXM0vywKSws3iq4g8xLGJsHaLnY5E4hWTkheoWH0uzbU5w@public.gmane.org>
2011-08-09 10:37 ` Wolfgang Grandegger
2011-08-09 10:56 ` Marc Kleine-Budde [this message]
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=4E41124F.8000608@pengutronix.de \
--to=mkl@pengutronix.de \
--cc=B22300@freescale.com \
--cc=davem@davemloft.net \
--cc=holt@sgi.com \
--cc=linuxppc-release@linux.freescale.net \
--cc=netdev@vger.kernel.org \
--cc=socketcan-core@lists.berlios.de \
--cc=wg@grandegger.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;
as well as URLs for NNTP newsgroup(s).