cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Observer
Observer
4,597 Views
Registered: ‎07-09-2013

Problems porting linux driver from Xilinx 3.9 to Xilinx 4.1 for zynq pl peripheral

Jump to solution

Hello,

 

trying to port an existing (and working) device driver from linux 3.9 to linux 4.1 both from Xilinx GIT.

On the later, when the driver loads a word from the PL peripheral (via an AXI interconnect), the system freezes, as if the driver was trying to access an unmapped area (AXI not acknowledging the transaction).

 

Same access with same driver works great in linux 3.9, with same peripheral bitstream.

 

ANy idea ?

 

Thanks in advance

 

François

0 Kudos
1 Solution

Accepted Solutions
Observer
Observer
8,279 Views
Registered: ‎07-09-2013

So I finally found out.

That was a clocking issue.

One of the change between linux 3.9 and 4.0 is the Common Clock Framework introduction.

By default, all the FCLKs that are not present in the "fclk-enable" bitmask in devicetree are deactivated when linux starts.

That's what happened.

 

Problem solved.

for reference :

http://lxr.free-electrons.com/source/Documentation/devicetree/bindings/clock/zynq-7000.txt

 

View solution in original post

0 Kudos
5 Replies
Highlighted
Teacher
Teacher
4,566 Views
Registered: ‎06-16-2013

Hi francoislegal

 

Did you make sure device tree blob file and device tree by dtdiff or dtx_diff and so on ?

 

Thank you.

Best regards,

 

0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
4,560 Views
Registered: ‎08-01-2008

check the drivers and tips from these links
www.wiki.xilinx.com/Linux+Drivers
www.xilinx.com/support/.../xilinx2015.../ug1165-zynq-embedded-design-tutorial.pdf
www.wiki.xilinx.com/Standalone+Drivers+and+Libraries
http://www.xilinx.com/support/answers/51779.html
www.wiki.xilinx.com/Zynq+Linux
www.wiki.xilinx.com/Zynq+Emacps+Linux+Driver
www.wiki.xilinx.com/Zynq+Linux+USB+Device+Driver
www.wiki.xilinx.com/Linux+GPIO+Driver
www.wiki.xilinx.com/Linux

Thanks and Regards
Balkrishan
--------------------------------------------------------------------------------------------
Please mark the post as an answer "Accept as solution" in case it helped resolve your query.
Give kudos in case a post in case it guided to the solution.
0 Kudos
Highlighted
Observer
Observer
4,556 Views
Registered: ‎07-09-2013

Sure,

 

the devicetree is ok.

Again, if I boot a 3.9 linux, my driver works correctly, I can even access my PL registers using MD in uboot before booting linux.

The driver prints out the read DT address at boot and it is correct.

 

Thanks

 

François

0 Kudos
Highlighted
Observer
Observer
4,553 Views
Registered: ‎07-09-2013

So I'm a little more lost now.

I tried to synthetise a design containing only one AXI GPIO IP from Xilinx, and I set it up at the same address as my PL peripheral.

Guess what happens when I boot linux 4.1.... I get that same crash while accessing one gpio (echo 875 > /sys/class/gpio/export && cat /sys/class/gpio/gpio875/value).

I checked again, I can still do md 0x7aa00000 in uboot to access the device before loading linux.

 

François

0 Kudos
Observer
Observer
8,280 Views
Registered: ‎07-09-2013

So I finally found out.

That was a clocking issue.

One of the change between linux 3.9 and 4.0 is the Common Clock Framework introduction.

By default, all the FCLKs that are not present in the "fclk-enable" bitmask in devicetree are deactivated when linux starts.

That's what happened.

 

Problem solved.

for reference :

http://lxr.free-electrons.com/source/Documentation/devicetree/bindings/clock/zynq-7000.txt

 

View solution in original post

0 Kudos