All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Mylene Josserand" <Mylene.Josserand@navocap.com>
To: Marc Kleine-Budde <mkl@pengutronix.de>
Cc: linux-can@vger.kernel.org
Subject: Re: [imx27 - mcp251x] MCP251x does not work in static ?
Date: Wed, 10 Apr 2013 16:11:13 +0200	[thread overview]
Message-ID: <CA78C307B8F06747967D122FC656B153774455@SERVEUR0.nvp.local> (raw)
In-Reply-To: <51656B9B.80907@pengutronix.de>

Hi Marc Kleine-Budde,

It is again you who answers my questions :) Thank you again for your help.

Le 10/04/2013 15:39, Marc Kleine-Budde a écrit :
> On 04/10/2013 03:07 PM, Mylene Josserand wrote:
>> When I compile the driver in static, the kernel stopped booting. With
>> some printk, the driver is blocked at the function "spi_write" of the
>> function "mcp251x_hw_reset". The dmesg with my outputs :
>>
>> "
>> spi_imx imx27-cspi.0: master is unqueued, this is deprecated
>> spi_imx imx27-cspi.0: probed
>> CAN device driver interface
>> mcp251x_can_init
>> mcp251x_clean
>> mcp251x_can_probe
>> mcp251x_hw_probe
>> mcp251x_hw_reset
>> mcp251x_hw_reset : spi_write : start
>> "
>
> Does it hang here?
>
> http://lxr.linux.no/linux+v3.8.6/drivers/net/can/mcp251x.c#L624

Yes it hangs here. It did not print "reset failed: ret = X" or anything 
else.

>
> Is this the first spi transfer that occurs in the driver?

I think yes. It is the first time MCP251x uses spi transfer function.

>
>> I thought that it was a spi problem because of the warning "master is
>> unqueued, this is deprecated" but in fact the spi works.
>> One surprising thing (for me) is that the MCP251x compiled in module is
>> probed ! (I did not test it yet)
>
> If it's the first spi transfer in the driver that hangs and if the
> mcp251x works if loaded as a module, there is probably some
> initialisation missing. Look for stuff that gets initialized after the
> mcp251x would have been loaded if compiled into the kernel. Make a
> "diff" between the bootload with mcp251x compiled into the kernel and
> without. Other usual suspects are: clocks, pinmux (spi _and_ the mcp251x
> dedicated IRQ line), gpio setup.

Thanks for the advice and the ideas to look at ! I have already compared 
the bootload and I have seen no differences (maybe I will check that 
another time). I will search about clocks, pinmux and gpio setup and I 
will update you if I found how to fix that.

>
> Marc
>

Best regards,


-- 
Mylène JOSSERAND
Navocap

  reply	other threads:[~2013-04-10 14:11 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-10 13:07 [imx27 - mcp251x] MCP251x does not work in static ? Mylene Josserand
2013-04-10 13:39 ` Marc Kleine-Budde
2013-04-10 14:11   ` Mylene Josserand [this message]
2013-04-10 15:30     ` Marc Kleine-Budde
2013-04-11  7:39       ` Mylene Josserand
2013-04-11  7:49         ` Marc Kleine-Budde
2013-04-11  8:04           ` Mylene Josserand
2013-04-11  8:39             ` Marc Kleine-Budde
2013-04-11  9:22               ` Mylene Josserand
2013-04-11  9:49                 ` Marc Kleine-Budde
2013-04-11 14:39                   ` Mylene Josserand
2013-04-11 15:09                     ` Marc Kleine-Budde
2013-04-12  9:24                       ` Mylene Josserand
2013-04-12  9:49                         ` Marc Kleine-Budde
2013-04-12  9:36                     ` Marc Kleine-Budde
2013-04-12  9:40                       ` Mylene Josserand
2013-04-12  9:48                         ` Marc Kleine-Budde
2013-04-11  8:36           ` RFC: [PATCH] can: mcp251x: add missing IRQF_ONESHOT to request_threaded_irq Marc Kleine-Budde
2013-04-12 11:16             ` Marc Kleine-Budde

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=CA78C307B8F06747967D122FC656B153774455@SERVEUR0.nvp.local \
    --to=mylene.josserand@navocap.com \
    --cc=linux-can@vger.kernel.org \
    --cc=mkl@pengutronix.de \
    /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.