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 Is this the first spi transfer that occurs in the driver? > 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. 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 |