benpoulson has quit [Read error: Connection reset by peer]
rajkosto has quit [Read error: Connection reset by peer]
Hypfer has quit [Quit: Ping timeout (120 seconds)]
Hypfer has joined #linux-sunxi
cnxsoft has joined #linux-sunxi
vagrantc has quit [Quit: leaving]
ftg has joined #linux-sunxi
hlauer has joined #linux-sunxi
JohnDoe_71Rus has joined #linux-sunxi
ftg has quit [Read error: Connection reset by peer]
bauen1 has quit [Ping timeout: 480 seconds]
bauen1 has joined #linux-sunxi
<szemzoa>
It turns out initcall_debug can be a handy tool. :) So clk_ignore_unused command line solved the clk_disable_unused problem. Beside some DMA memory issues, T113 booted the ~D1 device_tree: https://pastebin.com/4ay78rnr
hlauer has quit [Ping timeout: 480 seconds]
warpme___ has joined #linux-sunxi
apritzel has joined #linux-sunxi
<apritzel>
szemzoa: ah, that points to either a DT problem or a some missing declaration in the CCU driver
<apritzel>
szemzoa: have you figured out which clock was wrongly disabled?
<szemzoa>
apritzel: not yet. BTW, allwinner kernel has the same clk_ignore_unused cmd line param.
<apritzel>
clk_ignore_unused is a debug hack, you should not use that for normal operation
<szemzoa>
apritzel: ok, so it should be figure out. The DMA problem is gone, it was some kernel misconfig.
<apritzel>
each clock should either have a user, or get marked as CLK_IS_CRITICAL in the CCU driver
<szemzoa>
I'll try to found which one is the problematic, but I'm not too familiar all of these, maybe it'll be a long journey to me :)
<apritzel>
szemzoa: for a start, you could look at ccu-sun20i-d1.c: there is a clock simply called riscv_clk ("riscv"), which is CRITICAL
<apritzel>
I wonder if there is an equivalent to that on the ARM side?
<apritzel>
or you start printk'ing in drivers/clk/clk.c:clk_disable_unused() and its callees, to get a list of clocks that are disabled
<apritzel>
szemzoa: and did you reference the CPU clocks?
<szemzoa>
ok, seems like I found it, changed the cpux_clk to CLK_IS_CRITICAL, and now it boots normally without clk_ignore_unused: https://pastebin.com/CQbxvg4A
<apritzel>
very good!
<apritzel>
szemzoa: so do you have a "clocks" property in the CPU nodes?
<szemzoa>
yes, both of the have the clocks = <&ccu CLK_CPUX>;
<szemzoa>
them
apritzel has quit [Ping timeout: 480 seconds]
cnxsoft has quit []
indy_ has joined #linux-sunxi
indy has quit [Ping timeout: 480 seconds]
apritzel has joined #linux-sunxi
<apritzel>
szemzoa: mmh, that's odd, that clock should no be turned off then to begin with. Are you missing something config-wise, maybe? Have you tried with sunxi-defconfig?
indy_ has quit [Max SendQ exceeded]
indy has joined #linux-sunxi
indy has quit []
<szemzoa>
apritzel: Definitely something was wrong with my .config. I removed the CLK_IS_CRITICAL from cpux_clk, and compiled with sunxi_defconfig. (the clock is stopped at the end): https://pastebin.com/wmJCReBE
indy has joined #linux-sunxi
indy has joined #linux-sunxi
indy has quit []
indy has joined #linux-sunxi
<mripard>
apritzel: only cpufreq will enable the clock though, right?
indy has quit [Ping timeout: 480 seconds]
<mripard>
so if cpufreq isn't there at all (or a module), it's still broken
indy has joined #linux-sunxi
evgeny_boger has quit [Quit: evgeny_boger]
indy has quit []
<apritzel>
mripard: yeah, I was wondering about that as well. So the CPU clock must always be marked as critical?
<mripard>
yep
<mripard>
we don't really have a device, let alone a driver for a CPU
<mripard>
so there's no one to claim that clock, really
<mripard>
cpufreq mitigates that somewhat, but you can't be sure it's there
<mripard>
it's pretty much the same situation than for the DRAM
<apritzel>
right, I just checked, and we indeed have that for basically every other clock driver
<apritzel>
*sunxi-ng clock driver
<apritzel>
szemzoa: so can you send a patch to the sun20i-d1 clock driver to add the flag?