can: mcp25xxfd: Reset/Initialization of device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

When testing the driver and using up/down multiple times on the CAN interface I encountered errors with the TEF setup. I noticed that a device reset (spi command) is only performed when loading the module (in _mcp25xxfd_clock_probe during the initial clock setup.) 
Is there a preference whether or not using up on the interface should bring the device into a default state or is this only expected when loading the module? Are there any limits to how long up can/should take?

If a default state is desired after using up, I see two options to do this:
1) Perform the reset procedure the same way it is done during loading of the module including setting up the clock again.
2) Bring all Registers to their default state "manually" and preserve whatever clock was configured initially.

If 1) is used, stop can be simplified to perform a reset as well, no need to care about resetting fifos etc. This is likely more time consuming though. Doing it this way is time consuming because we need to do the OSC setup again every time.

2) will usually be faster (assuming decent SPI speeds). The downside is, that it's heavy on the SPI and we need to have default values for all the registers for each supported device.

Best Regards,
Thomas Kopp





[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux