[U-Boot] CAN framework in U-Boot

Wolfgang Grandegger wg at grandegger.com
Thu May 2 09:01:59 CEST 2013


Hi Bhupesh,

On 05/01/2013 06:17 AM, Bhupesh SHARMA wrote:
> Hi Wolfgang G. and list,
> 
> I was looking to do some basic tests on a C_CAN module inside our SOC at
> u-boot
> level, till the Linux OS is up and working to test basic CAN features.
> 
> I couldn't figure out if CAN framework is supported in u-boot and would
> really appreciate if
> someone can help me out regarding the same.
> 
> I could see the sja1000 header present inside 'include/sja1000.h', and some
> old patches
> from Wolfgang G. (see [1]), but couldn't figure out if these patches were
> accepted into u-boot.
> 
> Any help will be much appreaciated.
>
> [1]. http://article.gmane.org/gmane.comp.boot-loaders.u-boot/70864

There is no generic CAN interface in U-Boot yet. The "sja1000.h" header
file is used for some basic CAN loopback test commands and there are
others, e.g. for the MSCAN. I have hacked something recently for Flexcan:

+U_BOOT_CMD(
+       can_test,       CONFIG_SYS_MAXARGS,     1,      do_can_test,
+       "transfer and check messages between two CAN controllers",
+       "[kb-per-sec] [repeat-count]"
+);

Unfortunately, those commands are all board specific. A more generic
approach is appreciated, of course.

Wolfgang.



More information about the U-Boot mailing list