Well if you check the flexcan_set_attr function at drivers/net/can/flexcan/dev.c
if (attr_id == FLEXCAN_ATTR_BR_CLKSRC) {
if (!strncasecmp(buf, "bus", 3))
flexcan->br_clksrc = 1;
else if (!strncasecmp(buf, "osc", 3))
flexcan->br_clksrc = 0;
goto set_finish;
}
This function should be called when writing in the br_clksrc device (echo "osc" > /sys/devices/platform/Flex.can0/br_clksrc)
In case writing "osc" then flexcan->br_clksrc = 0
I think you can add some logs/traces (with pr_err or pr_info) to see if really reaching this part of the code
The default/initial value for br_clksrc is set to 1 at arch/arm/mach-mx25/mx25_3stack.c in
struct flexcan_platform_data flexcan_data[] = {
...
.br_clksrc = 1,
..
You can try forcing this to 0