2008-07-21 22:27:35

by Barry G

[permalink] [raw]
Subject: Debugging Talitos

Hello,

I am working on getting HW acceleration working via the talitos
driver for the 8347E.

We are running 2.6.25.4 with the realtime patchset and ubifs.
I have a testbed setup of machines like:
A<->B<->C<->D

I am running a talitos aware kernel on B and C. (I cloned linux-2.6 and
copied talitos.[c|h] and changed Kconfig and Makefile in drivers/crypto.

Unfortunately, I am still seeing only about 20 Mbit/sec from iperf (same
as before I installed the talitos module). I also don't see any talitos
stuff in the drivers:
# cat /proc/crypto | grep -i talitos
#

I do have a /sys/bus/of_platform/drivers/talitos folder with uevent,unbind,bind
though.

dmesg | grep -i talitos also returns nothing.

What is the best way to go about debugging the crypto stuff? Should I jump
in and start printk'ing everything or ? Do I need other changes from
the tree than the taliltos driver?

BTW, here is the relevent entry in the DTS:
[email protected] {
device_type = "crypto";
model = "SEC2";
compatible = "talitos";
reg = <30000 10000>;
interrupts = <b 8>;
interrupt-parent = < &ipic >;
num-channels = <4>;
channel-fifo-len = <18>;
exec-units-mask = <0000007e>;
descriptor-types-mask = <01010ebf>;
};

Thanks,

Barry


2008-07-21 22:50:08

by Kim Phillips

[permalink] [raw]
Subject: Re: Debugging Talitos

On Mon, 21 Jul 2008 15:27:33 -0700
"Barry G" <[email protected]> wrote:

> in and start printk'ing everything or ? Do I need other changes from
> the tree than the taliltos driver?
>
> BTW, here is the relevent entry in the DTS:

> compatible = "talitos";

yes, you need the new bindings, I sent them as a separate patch to go
through the powerpc tree:

http://patchwork.ozlabs.org/linuxppc/patch?id=19542

(also available as commit 3fd4473 in Linus' tree)

Kim

2008-07-22 21:37:36

by Barry G

[permalink] [raw]
Subject: Re: Debugging Talitos

Hello,

I have tracked down a problem with the talitos driver and the way
it interacts with the device tree on the 8349.

In the platform specific drivers (/arch/powerpc/platforms/83xx/
mpc834x_itx.c in our case), we setup the bus as .compatible with
"fsl,pq2pro-localbus". This causes the of_platform_bus_probe
to find the localbus entry in the device tree
(/arch/powerpc/boot/dts/mpc8349emitx.dts) and bind the localbus
entry to of_platform_bus_type.

At this point in time of_platform_bus_type has two entities,
localbus and pata.

Along comes talitos at a later point in time who calls
of_register_platform_driver with a match_table of fsl,sec2.0
which exits in the soc hierarchy of the device tree.

of_register_platform_driver calls of_register_driver passing
in the of_platform_bus_type of the localbus found above,
and eventually calls into of_match_device which fails to
find fsl,sec2.0 as only localbus and pata exist,
and as a result of_match_device fails and talitos is never probed.

I found that by moving the compatible = "fsl,pq2pro-localbus"
line in my dts from my localbus to my soc node the system
booted and correctly searched the soc for talitos and it worked.
I don't think this is the recommended solution though.

I am new to kernel debugging, so any input would be appreciated.
What is the proper way to fix this?

Thanks,

Barry

P.S. Would the linuxppc-embedded mailing list be more appropriate for this?