name of PL device in driver is hard coded

Description

on some zynq platforms with differnt device trees then the zedboard we get the follloing error during discovery:

root@zynq:~# ocpirun -C
OCPI( 2:9.849): When searching for PL device '0': Can't process file "/sys/devices/amba.2/f8007000.ps7-dev-cfg/prog_done" for string: file could not be open for reading
OCPI( 2:9.849): In HDL Container driver, got PL search error: Can't process file "/sys/devices/amba.2/f8007000.ps7-dev-cfg/prog_done" for string: file could not be open for reading
Available containers:

  1. Model Platform OS OS Version Name
    0 rcc arm linux zynq rcc0

this is caused by the name of the axi(amba) bus being slightly different in the device tree. maybe this should be put in an environment variable??

a workaround for this issue is to go into the device tree and change the name of the bus to the hard coded name.

Environment

None

Activity

Show:
James Kulp
March 5, 2015, 8:06 PM

What was the name when this happened?
It already looks for a variety of names, but obviously it did not find some name.

Chris Hinkey
March 6, 2015, 1:17 PM

the device tree entry that is giving us trouble is:

devcfg@f8007000 {
compatible = "xlnx,ps7-dev-cfg-1.00.a";
reg = <0xf8007000 0x00000068>;
interrupts = <0x00000000 0x00000004 0x00000001>;
interrupt-parent = <0x00000001>;
};

so it comes up as /sys/devices/amba.2/f8007000.devcfg. couldnt we jsut look for something that starts with f8007000 as long as you can find the amba folder successfully this folder will always start with the same physical address.

Davis Hoover
April 14, 2016, 8:07 PM

I experienced this same problem and can confirm the workaround works. Environment variable would be nice. Also the error message seems to be hardcoded for that path:

git grep "/amba"

Binary file platforms/zed/release-2013.4/OpenCPI-SD/opencpi/lib/linux-zynq-arm/libocpi_hdl_s.so matches
runtime/hdl/src/HdlBusDriver.cxx: std::string base = "/sys/devices/amba";
runtime/hdl/src/HdlBusDriver.cxx: err = "No /sys/devices/amba*/f8007000.ps7-dev-cfg/prog_done was found.";

James Kulp
April 12, 2017, 11:27 AM

the search was made more forgiving. Fix is in 2017.Q1

Done

Assignee

Unassigned

Reporter

Chris Hinkey

Labels

None

Components

Priority

Minor
Configure