[meta-xilinx] Zynq TTC usage by Linux

Nathan Rossi nathan at nathanrossi.com
Fri Oct 21 00:26:14 PDT 2016


On Fri, Oct 21, 2016 at 2:19 PM, Edward Wingate <edwingate8 at gmail.com> wrote:
> It looks like Linux is aware of TTC0 at least, from dmesg:
> clocksource: ttc_clocksource: mask: 0xffff max_cycles: 0xffff,
> max_idle_ns: 537538477 ns
> ps7-ttc #0 at 9e808000, irq=18
>
> And it is allocated with virtual memory mapping (/proc/vmallocinfo):
> 0x9e808000-0x9e80a000    8192 of_iomap+0x2c/0x34 phys=f8001000 ioremap
>
> I can disable it in my device tree with:
> ps7_ttc_0: ps7-ttc at f8001000 { compatible = "invalid"; }
>
> Does anyone know what TTC0 would be used for?  Doesn't seem to be
> critical as Linux stills boots and runs OK.  Thanks for your help.

Previously ttc0 was the default clock source for the kernel. Depending
on your kernel/devicetree that might still be the case. Newer kernels
select the arm_global_timer over the ttc.

During boot you will see something along the lines of:

[    0.000473] clocksource: arm_global_timer: mask: 0xffffffffffffffff
max_cycles: 0x13381ebc09, max_idle_ns: 440795204118 ns
[    0.002702] clocksource: ttc_clocksource: mask: 0xffff max_cycles:
0xffff, max_idle_ns: 2150193541 ns
...
[    0.970221] clocksource: Switched to clocksource arm_global_timer

This is informing that the ttc device is probed and setup as a
clocksource device. Althought it is probably not used.
You can also check to see what is currently in use: cat
/sys/devices/system/clocksource/clocksource0/current_clocksource

I could be mistaken but remoteproc should be able to unregister the
clocksource from the kernel and provide it to the remoteproc
application? If not invalidating it in the linux kernel device tree
should be fine.

Regards,
Nathan

>
>
>
>
> On Thu, Oct 20, 2016 at 5:31 PM, Edward Wingate <edwingate8 at gmail.com> wrote:
>> Does Linux use the Zynq's triple timer counters (TTC0/1) for anything
>> by default?  Running in AMP mode with Linux on CPU0, I'm trying to use
>> TTC0/TTC1 from CPU1, but don't seem to be able to. I don't see the
>> TTCs' address space in /proc/iomem though.  Thanks for any help.
>>
>> Ed
> --
> _______________________________________________
> meta-xilinx mailing list
> meta-xilinx at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-xilinx



More information about the meta-xilinx mailing list