eQEP error with 4.9 kernel

40 views
Skip to first unread message

Drew Fustini

unread,
Jan 26, 2017, 1:08:17 AM1/26/17
to BeagleBoard, Robert Nelson

Has anyone tested the eQEP driver with the 4.9 kernel?

I'm attempting to use it with the 4.9.5-ti-r16 from 2017-01-23.

I get a Segmentation Fault when I read the position:
# config-pin p8.11 qep
# config-pin p8.12 qep
# cat /sys/devices/platform/ocp/48304000.epwmss/48304180.eqep/position

It appears to occur in:
(eqep_get_position [tieqep]) from [<c08930d0>] (dev_attr_show+0x2c/0x58)

More details:
https://gist.github.com/pdp7/fe07082d23f2bfbc362c733a7b0aea72

thanks!
drew

Drew Fustini

unread,
Jan 27, 2017, 9:30:05 PM1/27/17
to BeagleBoard, robert...@gmail.com, di...@softplc.com, linux.r...@gmail.com, Drew Fustini

On Thursday, January 26, 2017 at 12:08:17 AM UTC-6, Drew Fustini wrote:
> I get a Segmentation Fault when I read the position:
>
> It appears to occur in:
> (eqep_get_position [tieqep]) from [<c08930d0>] (dev_attr_show+0x2c/0x58)

I've experimenting more with this eQEP error on the 4.9 kernel:
https://gist.github.com/pdp7/fe07082d23f2bfbc362c733a7b0aea72

From drivers/misc/tieqep.c at found in this patch:
https://github.com/RobertCNelson/ti-linux-kernel-dev/tree/ti-linux-4.9.y/patches/drivers/ti/eqep

This readl() runs OK in eqep_probe():
https://github.com/RobertCNelson/ti-linux-kernel-dev/tree/ti-linux-4.9.y/patches/drivers/ti/eqep#L401

Line 697: dev_info(&pdev->dev, "QPOSCNT:0x%08x\n", readl(eqep->mmio_base + QPOSCNT));

But the same readl() causes a seg fault in eqep_get_position():
https://github.com/RobertCNelson/ti-linux-kernel-dev/tree/ti-linux-4.9.y/patches/drivers/ti/eqep#L401

Line 401: position = readl(eqep->mmio_base + QPOSCNT);

I'm not sure what the difference is. Maybe the memory mapping changes in between the probe and reading the sysfs file?

Any ideas?

thanks,
drew
Reply all
Reply to author
Forward
0 new messages