AnsweredAssumed Answered

Is there a solution for the adf5355 driver Division by zero in kernel?

Question asked by EdwardK on Aug 11, 2015
Latest reply on Aug 13, 2015 by EdwardK

To reproduce on linux-adi branch xcomm_zynq

 

1) git clone https://github.com/analogdevicesinc/linux.git


2) git checkout fa4b516ebb4e6be181df0e4d60506ab849249d44 drivers/spi/spi-xilinx.c if you are using a Zynq


3) dtsi entries

 

/include/ "skeleton.dtsi"

/{

  fixed_ref_clk: clock@0 { /* Fixed adf5355_regulator reference clock */

  compatible = "fixed-clock";

  #clock-cells = <0>;

  clock-frequency = <100000000>;

  clock-accuracy = <5>; /* ppb */

  };

  adf5355_regulator: fixedregulator@1 {

  compatible = "regulator-fixed";

  regulator-name = "adf5355-fixed-supply";

  regulator-min-microvolt = <3300000>;

  regulator-max-microvolt = <3300000>;

  regulator-boot-on;

  regulator-always-on;

  };

};


&axi_quad_spi_1 {

  #address-cells = <1>;

  #size-cells = <0>;

 

  wb_lo_adf5355: wb-lo-adf5355-tx@1 {

  compatible = "adf5355";

  reg = <1>;

  spi-max-frequency = <20000000>;

  clocks = <&fixed_ref_clk>;

  clock-names = "clkin";

  clock-output-names = "adf5355_out";

  vcc-supply = <&adf5355_regulator>;

  regulator-name = "vcc";

  adi,reference-div2-enable;

  adi,charge-pump-current = <900>;

  adi,muxout-select = <6>;

  adi,mute-till-lock-enable;

  adi,output-a-power = <3>;

  adi,output-b-power = <0>;

  adi,charge-pump-negative-bleed-enable;

  adi,reference-differential-input-enable;

  adi,muxout-level-3v3-enable;

  adi,power-up-frequency = <464000000>;

  };

};

 

4) Error reported

Division by zero in kernel.                                                                                                                      

CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.0.0-xilinx-adi-gdf9be52-dirty #1                                                                     

Hardware name: Xilinx Zynq Platform                                                                                                              

[<c00167bc>] (unwind_backtrace) from [<c00127c0>] (show_stack+0x10/0x14)                                                                         

[<c00127c0>] (show_stack) from [<c0475ba4>] (dump_stack+0x98/0xd8)                                                                               

[<c0475ba4>] (dump_stack) from [<c024a75c>] (Ldiv0_64+0x8/0x18)                                                                                  

[<c024a75c>] (Ldiv0_64) from [<c03ade40>] (adf5355_pll_fract_n_get_rate+0x34/0x88)                                                               

[<c03ade40>] (adf5355_pll_fract_n_get_rate) from [<c03adea8>] (adf5355_clk_recalc_rate+0x14/0x34)                                                

[<c03adea8>] (adf5355_clk_recalc_rate) from [<c039d830>] (clk_register+0x380/0x738)                                                              

[<c039d830>] (clk_register) from [<c03aed08>] (adf5355_probe+0x4d4/0x5d4)                                                                        

[<c03aed08>] (adf5355_probe) from [<c0329d40>] (spi_drv_probe+0x50/0x74)                                                                         

[<c0329d40>] (spi_drv_probe) from [<c02da2c8>] (driver_probe_device+0x13c/0x398)                                                                 

[<c02da2c8>] (driver_probe_device) from [<c02da5f4>] (__driver_attach+0x8c/0x90)                                                                 

[<c02da5f4>] (__driver_attach) from [<c02d85dc>] (bus_for_each_dev+0x6c/0xa0)                                                                    

[<c02d85dc>] (bus_for_each_dev) from [<c02d9974>] (bus_add_driver+0x15c/0x218)                                                                   

[<c02d9974>] (bus_add_driver) from [<c02da9b0>] (driver_register+0x78/0xf8)                                                                      

[<c02da9b0>] (driver_register) from [<c000891c>] (do_one_initcall+0xb8/0x1f0)                                                                    

[<c000891c>] (do_one_initcall) from [<c0623d84>] (kernel_init_freeable+0x148/0x1e8)                                                              

[<c0623d84>] (kernel_init_freeable) from [<c04724fc>] (kernel_init+0x8/0xe8)                                                                     

[<c04724fc>] (kernel_init) from [<c000f380>] (ret_from_fork+0x14/0x34)

 

Any help is appreciated.

 

mhennerich

 

I am looking at the clock stuff to see if that changed

Outcomes