ChanServ changed the topic of #linux-sunxi to: Allwinner/sunxi development - Did you try looking at our wiki? https://linux-sunxi.org - Don't ask to ask. Just ask and wait for an answer! - This channel is logged at https://oftc.irclog.whitequark.org/linux-sunxi
<iscle> could be either of the two, not really sure
<apritzel> iscle: are there interrupt status bits you could poll to check this?
<apritzel> and maybe inspect the DMA buffer memory to see if the controller put something in there?
<iscle> I am printing the irq status register every time there's an usb interrupt (just in case the dma interrupt does not get triggered, but at least I get to read them after another usb interrupt is triggered) and the status is always 0.
<iscle> I think the issue is that the DMA transfer is never started because I never receive anything in the host side (I'm testing as gadget/peripheral mode)
<iscle> Is it possible that the BUS_DRQ_SEL has to be configured beforehand for the DMA interrupt to start? Datasheet PDF page 853 (https://linux-sunxi.org/images/c/c1/V853-amp-v853s_datasheet_v1.1.pdf)
<iscle> It does make sense for me, but I did not see the original allwinner code do this anywhere
<iscle> I've uploaded my current code here: https://github.com/iscle/linux-v853/tree/v853-usb-dma
Daanct12 has joined #linux-sunxi
<iscle> nice, finally got an interrupt!
<apritzel> looks odd (read: embedded) to have this a build time option. Why would one not want this? And who would make this decision? The distro?
<apritzel> I guess a kernel command line option would be more useful?
<apritzel> does the original Allwinner code actually use DMA? Or do they just have the code in, but never enable or use DMA?
<apritzel> Because this is what I remember from previous investigations: that the BSP does not use DMA, and so people were wary it would work at all
<apritzel> anyway, good job, let's hope it works now (and it's not just a spurious IRQ) ;-)
<iscle> Not a spurious IRQ: https://pastecode.io/s/0phmszod it actually sets the DMA IRQ status bits for the appropriate channels
<iscle> Now I just need to figure out how to handle it
<iscle> And yes, the Allwinner code seems to use DMA, I checked build flags and everything and it should all be connected. That's why I did not know if those drq bits was needed or not
<iscle> BTW, the code I'm writing does not support all SoCs, according to a comment in Allwinner's code: only SUN8IW5 and later ic support inner dma, former ic(eg. SUN8IW1, SUN8IW3, SUN8IW2 etc) use outer dma.
<iscle> apritzel: Okay, so, I'm starting to think Allwinner's code does not use DMA, because without the drq bits correctly set, the DMA interrupt is never triggered (I'm guessing because it never starts)
<iscle> However, with the drq bits being set, it does trigger the irq
ftg has quit [Read error: Connection reset by peer]
<iscle> Okay, forget what I said xD The IRQ gets triggered when I write something from host to peripheral (remember, DUT is running as peripheral)
<iscle> But we're a bit closer, I think... Will continue tomorrow
iscle has quit [Remote host closed the connection]
sh1 has quit [Ping timeout: 480 seconds]
smaeul_ has joined #linux-sunxi
smaeul has quit [Ping timeout: 480 seconds]
hexdump0815 has joined #linux-sunxi
hexdump01 has quit [Ping timeout: 480 seconds]
JohnDoe_71Rus has joined #linux-sunxi
indy has joined #linux-sunxi
indy has quit [Ping timeout: 480 seconds]
apritzel has quit [Ping timeout: 480 seconds]
warpme has joined #linux-sunxi
tnovotny has joined #linux-sunxi
apritzel has joined #linux-sunxi
ungeskriptet is now known as Guest5308
ungeskriptet has joined #linux-sunxi
warpme has quit []
Guest5308 has quit [Ping timeout: 480 seconds]
ungeskriptet has quit [Quit: The Lounge - https://thelounge.chat]
warpme has joined #linux-sunxi
ocpaul20 has joined #linux-sunxi
warpme has quit []
warpme has joined #linux-sunxi
warpme has quit []
Daanct12 has quit [Quit: WeeChat 4.4.2]
JohnDoe_71Rus has quit [Quit: KVIrc 5.2.4 Quasar http://www.kvirc.net/]
apritzel has quit [Ping timeout: 480 seconds]
warpme has joined #linux-sunxi
apritzel has joined #linux-sunxi
hazardchem has quit [Read error: Connection reset by peer]
hazardchem has joined #linux-sunxi
JohnDoe_71Rus has joined #linux-sunxi
tnovotny has quit [Quit: Leaving]
dsimic is now known as Guest5319
dsimic has joined #linux-sunxi
Guest5319 has quit [Ping timeout: 480 seconds]
indy has joined #linux-sunxi
warpme has quit []
smaeul_ has quit []
smaeul has joined #linux-sunxi
apritzel_ has joined #linux-sunxi
apritzel_ has quit []
apritzel has quit [Ping timeout: 480 seconds]
ocpaul20 has quit [Remote host closed the connection]
apritzel has joined #linux-sunxi
JohnDoe_71Rus has quit [Quit: KVIrc 5.2.4 Quasar http://www.kvirc.net/]
vagrantc has joined #linux-sunxi
warpme has joined #linux-sunxi
warpme has quit []
ftg has joined #linux-sunxi
vagrantc has quit [Quit: leaving]
iscle has joined #linux-sunxi
<iscle> So, I'm about to give the USB DMA driver another go, and I found something which might explain what was happening... I had the DMA transfer direction the other way around...
<iscle> It sure looks like that was the issue! Nice! :)