11-10-2010 06:29 AM
I created a system with a microblaze connectd to a plb bus => no problem.
When I add a plb_bridge (in order to put slow peripherals on it) I have some issues regarding device-tree.
Using my architecture with 2 plb bus, the kernel and the whole system runs well (from linux boot to a usable system).
However I have custom drivers for some IPs connected to the second plb bus.
When the linux driver call the function of_address_to_resource(ofdev->node, 0, &r_mem); it returns an error : invalid address. It seems that the kernel cannot find the proper address for my IP.
I don't know if the issue comes from the tcl script that generate the device tree file (.dts) according EDK architecutre. Or if the issue comes from the linux kernel that is not able to parse a device-tree that includes a plb_bridge.
Does someone ever had the same issue ?
Or does anyone knows why this problem occurs (linux kernel or device-tree file generation from EDK) ?
PS : If I also put an interrupt controller on the second plb bus the system does not run at all (kernel does not run). So I need to remove it from the device-tree (.dts file)
11-10-2010 06:35 AM
I'm not sure why you would add this bridge. It seems like there's no purpose.
There may be issues with the device tree and it's representation of that bridge. This is not a case that we test for that I know of.
Why not just put them on a single PLB?
11-10-2010 08:10 AM
Have you verified that you can access the plb peripherals on the other side of the bridge when running with the standalone OS or simply from XMD? As long as you have the bridge addressing set up correctly in hardware, it shouldn't look any different to software than it would with the peripherals on the microblaze side of the bridge.
I would think you could use the same .dts for both systems (with and without bridge).
11-10-2010 09:17 AM
Thanks you for your help.
linnj : I agree the second PLB bus seems useless. But I don't say all what I want to do (mainly to explain my issue in a simple maneer).
In fact I have on the primary PLB bus a linux that is running. On the other PLB bus I have also a microblaze running a standalone application. The second microblaze does not play any role in linux, it just do other things.
toneal : Yes I test to access the second PLB from the first microblaze in standalone mode and it works. Each microblaze runs its own code. The codes does not interract with each other.
I agree with you : since plb_bridge is kind of transparent part, I could create a device tree file (.dts) that hide the bridge and makes like all my peripherals are on the same plb. I try it and I get a "bus error" in linux and a kernel crash. The same thing appens if I put directly the addresses of my peripherals in my drivers without retrieving it from the device tree (address and size are hardcoded in the driver) => "bus error".
As far as I know the second microblaze is not the cause of my issue (but maybe I'm wrong), the bridge is responsible for bus arbitration, so I think the bus error encountered by linux comes from an other problem.
What do you think about it ?