UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Observer francoislegal
Observer
4,456 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 francoislegal
Observer
8,138 Views
Registered: ‎07-09-2013

[♠SOLVED] Problems porting linux driver from Xilinx 3.9 to Xilinx 4.1 for zynq pl peripheral

Jump to solution

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

 

0 Kudos
5 Replies
Scholar watari
Scholar
4,425 Views
Registered: ‎06-16-2013

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

Jump to solution

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
Xilinx Employee
Xilinx Employee
4,419 Views
Registered: ‎08-01-2008

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

Jump to solution

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
Observer francoislegal
Observer
4,415 Views
Registered: ‎07-09-2013

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

Jump to solution

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
Observer francoislegal
Observer
4,412 Views
Registered: ‎07-09-2013

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

Jump to solution

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 francoislegal
Observer
8,139 Views
Registered: ‎07-09-2013

[♠SOLVED] Problems porting linux driver from Xilinx 3.9 to Xilinx 4.1 for zynq pl peripheral

Jump to solution

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

 

0 Kudos