[PATCH 0/3] Patches to include BeagleLogic support in the kernel

These patches add support for BeagleLogic in the kernel.
BeagleLogic is a logic analyzer realized on the BeagleBone Black using the
programmable real-time units. For more information, visit:
https://github.com/abhishek-kakkar/BeagleLogic/wiki/
http://elinux.org/BeagleBoard/GSoC/2014_Projects#Project:_BeagleLogic

CONFIG_PRU_RPROC_BEAGLELOGIC may be set to "m" or "y" accordingly to enable
BeagleLogic support in the built kernel. BeagleLogic may also be compiled as
an out-of tree module but is still included in the sources.

Please apply this after Matt Ranostay's patch to update pru_rproc.c for
supporting the PRU C Compiler version 2.0.0B [ref: http://git.io/uCfGKQ]

Download the matching PRU firmware beaglelogic-firmware.tar.gz for running
BeagleLogic from http://goo.gl/770FTZ and extract into /lib/firmware on your BBB

Kumar Abhishek (3):
  Add DTS for BeagleLogic
  Add BeagleLogic binding functions to pru_rproc
  Add kernel module for BeagleLogic

drivers/remoteproc/Kconfig | 13 +
drivers/remoteproc/Makefile | 1 +
drivers/remoteproc/beaglelogic.c | 1189 ++++++++++++++++++++++++++++++++
drivers/remoteproc/beaglelogic.h | 62 ++
drivers/remoteproc/beaglelogic_glue.h | 43 ++
drivers/remoteproc/pru_rproc.c | 92 +++
firmware/Makefile | 1 +
firmware/capes/BB-BEAGLELOGIC-00A0.dts | 257 +++++++
8 files changed, 1658 insertions(+)
create mode 100644 drivers/remoteproc/beaglelogic.c
create mode 100644 drivers/remoteproc/beaglelogic.h
create mode 100644 drivers/remoteproc/beaglelogic_glue.h
create mode 100644 firmware/capes/BB-BEAGLELOGIC-00A0.dts

Signed-off-by: Kumar Abhishek <abhishek@theembeddedkitchen.net>

BeagleLogic is implemented as a separate kernel module that
binds and unbinds itself from pru_rproc at runtime.

Signed-off-by: Kumar Abhishek <abhishek@theembeddedkitchen.net>

Same as Revision 91b9d2b37292eb8cd5f862ad833687002677f95c
in github.com/abhishek-kakkar/BeagleLogic/

Signed-off-by: Kumar Abhishek <abhishek@theembeddedkitchen.net>

Hi Kumar,

Ran into one small issue when merging this as-is into the BeagleBone tree:

In file included from drivers/remoteproc/pru_rproc.c:37:0:
drivers/remoteproc/beaglelogic_glue.h:24:20: error: field ‘miscdev’
has incomplete type
scripts/Makefile.build:307: recipe for target
'drivers/remoteproc/pru_rproc.o' failed
make[2]: *** [drivers/remoteproc/pru_rproc.o] Error 1
scripts/Makefile.build:454: recipe for target 'drivers/remoteproc' failed
make[1]: *** [drivers/remoteproc] Error 2
make[1]: *** Waiting for unfinished jobs....

https://github.com/RobertCNelson/bb-kernel/commit/956c41426010a1a110b91dab7b39f31d45741643

Regards,

Yep, I came to realize of this after I had already sent the patch on the list. The fix is to just add #include <linux/miscdevice.h> into the pru_rproc.c file at line 70 [This was not required for the file in Koen’s tree as it had some code from the lighting the example].

Let me send you a patch shortly

Regards

Signed-off-by: Kumar Abhishek <abhishek@theembeddedkitchen.net>

This looks good, so it's all staged up in our local beagleboard.org tree:

https://github.com/RobertCNelson/bb-kernel/commit/bc1441c0433fdba6f992cd754edea38b7760957c

http://paste.debian.net/106571/

Regards,

Hi,

I would recommend setting CONFIG_PRU_RPROC_BEAGLELOGIC to “m” so that it could help in debugging.

Also, could you please include the firmware files beaglelogic-pru0 and beaglelogic-pru1 into your tree from this link: http://goo.gl/770FTZ

Otherwise probing the driver will fail (and being compiled in there would be no way to retrigger the probe)

Regards

Hi,

I would recommend setting CONFIG_PRU_RPROC_BEAGLELOGIC to "m" so that it
could help in debugging.

Sure, not a problem.

Also, could you please include the firmware files beaglelogic-pru0 and
beaglelogic-pru1 into your tree from this link: http://goo.gl/770FTZ
Otherwise probing the driver will fail (and being compiled in there would be
no way to retrigger the probe)

After:

They will be located here:

/opt/scripts/device/bone/capes/BB-BEAGLELOGIC/

I'll move then to /lib/firmware in the default debian image, but
current debian users will just have to:

sudo cp -v /opt/scripts/device/bone/capes/BB-BEAGLELOGIC/* /lib/firmware

Regards,

Signed-off-by: Kumar Abhishek <abhishek@theembeddedkitchen.net>

Thanks! Queue'd up:
https://github.com/RobertCNelson/bb-kernel/commit/3cafc80fbc3f18d200d1b3f5ca9397c411074fd2

I'm just waiting back for a phy testing confirmation, so i'll one more
patch before i push this out with bone60.

Regards,

As of bone70 these files are not in /lib/firmware. Should I open a bug somewhere to suggest this?