On Wed, Nov 2, 2016 at 11:23 AM,
Robert Nelson <[email protected]> wrote:
> I've just added a forward port of the eqep driver.. One of the big
> changes, the eqep clock should be enabled/setup via the device-tree,
> instead of the driver..
>
> [   36.292972] eqep 48300180.eqep: ver. 1.0
> [   36.293178] eqep 48300180.eqep: count_mode:0
> [   36.293187] eqep 48300180.eqep: invert_qa:1
> [   36.293195] eqep 48300180.eqep: invert_qb:1
> [   36.293201] eqep 48300180.eqep: invert_qi:0
> [   36.293208] eqep 48300180.eqep: invert_qs:0
> [   36.293215] eqep 48300180.eqep: swap_inputs:0
> [   36.293222] eqep 48300180.eqep: QDECCTL:0x0180
> [   36.293230] eqep 48300180.eqep: QPOSINIT:0x00000000
> [   36.293236] eqep 48300180.eqep: QPOSMAX:0xffffffff
> [   36.293241] eqep 48300180.eqep: QPOSCNT:0x00000000
> [   36.293249] eqep 48300180.eqep: omit_interrupt:0
> [   36.293254] eqep 48300180.eqep: QEINT:0x0800
> [   36.293261] eqep 48300180.eqep: QUPRD:0x05f5e100
> [   36.293267] eqep 48300180.eqep: QEPCTL:0x009e write
> [   36.293273] eqep 48300180.eqep: QEPCTL:0x009e read
> [   36.293296] eqep 48300180.eqep: irq:193, clk_rate:100000000
>
> It would be awesome if someone who had it working in v4.4.x-bone/etc..
> Could verify. ;)

eqep was working for me in 4.4.x but I get a segmentation fault when I
read the sysfs position file:
# cat /sys/devices/platform/ocp/48304000.epwmss/48304180.eqep/position

It seems to happen at this call to readl() in eqep_get_position():
Line 401: position = readl(eqep->mmio_base + QPOSCNT);

from dmesg:
[ 1858.085381] DEBUG: tieqep.c: eqep_get_position: QPOSCNT=0
[ 1858.102133] DEBUG: tieqep.c: eqep_get_position: eqep->mmio_base=fa304180
[ 1858.108446] Unhandled fault: external abort on non-linefetch
(0x1028) at 0xfa304184

I got some good hints from Google+:
https://plus.google.com/u/0/+DrewFustini/posts/MYfYUyQvv7W

Michael Welling wrote:
> This external abort fault is probably caused by the clock being dynamically
> disabled by runtime suspend. pm_runtime_get_sync is missing somewhere.

Felipe Balbi wrote:
> Looking at the diff, it works on 4.4 out of sheer luck. There's nothing 
> guaranteeing
> clock won't be gated. Enable pm runtime and call pm runtime get sync

I'm now reading about pm_runtime_get_sync() in
Documentation/power/runtime_pm.txt.  I'll update if I make any
progress.

Thanks,
Drew

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CAEf4M_DUkK125T93P92-DEB8dtMP62YSunK5yxVMqfy%3DR%2Bh08A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to