Functional testing of mainline vchiq driver

Stefan Wahren stefan.wahren at i2se.com
Fri Oct 28 01:34:40 PDT 2016


Am 28.10.2016 um 09:27 schrieb Michael Zoran:
> On Wed, 2016-10-26 at 20:00 +0200, Stefan Wahren wrote:
>> Hi Michael,
>>
>>> Michael Zoran <mzoran at crowfest.net> hat am 26. Oktober 2016 um
>>> 01:22
>>> geschrieben:
>>>
>>>
>>> On Tue, 2016-10-25 at 14:52 -0700, Michael Zoran wrote:
>>>> On Tue, 2016-10-25 at 14:45 -0700, Michael Zoran wrote:
>>>>> On Tue, 2016-10-25 at 23:20 +0200, Stefan Wahren wrote:
>>>>>> thanks, here are my steps to get the driver working:
>>>>>>
>>>>>> * checkout Greg's staging-testing tree
>>>>>> * applied "staging: vc04_services: Remove dmac_map_area"
>>>>>> * remove BROKEN in drivers/staging/vc04_services/Kconfig
>>>>>> * add the following node to arch/arm/boot/dts/bcm283x.dtsi
>>>>>>
>>>>>>                vchiq: vchiq at 7e00b840 {
>>>>>>                        compatible = "brcm,bcm2835-vchiq";
>>>>>>                        reg = <0x7e00b840 0xf>;
>>>>>>                        interrupts = <0 2>;
>>>>>>                        cache-line-size = <32>;
>>>>>>                        firmware = <&firmware>;
>>>>>>                };
>>>>>>
>>>>>> * build kernel and dtb for Raspberry Pi B
>>>>>>
>>>>>>
>>>> BTW, the downstream tree has an override for the cache-line-
>>>> size.  Did
>>>> you perhaps try and add it to the device tree as well?
>>>>
>>>> bcm2708_common.dtsi:
>>>>
>>>> 	__overrides__ {
>>>> 		cache_line_size = <&vchiq>, "cache-line-size:0";
>>>> 	};
>> i applied the second version of your patch "staging: vc04_services:
>> Remove
>> dmac_map_area" and rebuild the whole driver. Now vchiq_test works
>> without any
>> issues. The __overrides__ wasn't necessary.
> I just tested an out of the box built of the staging-testing branch
> with all the latest patches.  For me, if I have the __overrides__ in
> the DT vchiq_test -f works fine.  If I remove it I get data corruption
> on my RPI 2.

Yes, Phil wrote that the RPI 2 & 3 requires a cache-line-size of 64.

Currently i'm searching for a good solution but it seems
get_cpu_cacheinfo() which contains the cache line size isn't implemented
for ARM (only for ARM64).

There was an attempt by Sudeep Holla [1] but it's not merged yet.

Another solution would be to introduce different compatibles (
brcm,bcm2835-vchiq / brcm,bcm2836-vchiq ) and place the cache-line-size
in a info structure.

[1] - http://www.spinics.net/lists/arm-kernel/msg400196.html





More information about the linux-rpi-kernel mailing list