[meta-xilinx] Zynq XADC

Sören Brinkmann soren.brinkmann at xilinx.com
Mon May 18 08:05:10 PDT 2015


On Mon, 2015-05-18 at 02:50PM +0000, MUGRIDGE Robin wrote:
>     
> 
>     
> 
>     
> 
>     
> 
>    > -----Original Message-----
> 
>    > From: Sören Brinkmann [mailto:soren.brinkmann at xilinx.com]
> 
>    > Sent: 18 May 2015 15:42
> 
>    > To: MUGRIDGE Robin
> 
>    > Cc: meta-xilinx at yoctoproject.org
> 
>    > Subject: Re: [meta-xilinx] Zynq XADC
> 
>    >
> 
>    > On Mon, 2015-05-18 at 11:31AM +0000, MUGRIDGE Robin wrote:
> 
>    > >    Hi,
> 
>    > >
> 
>    > >
> 
>    > >
> 
>    > >    I am having an issue trying to use the Zynq XADC after a linux
>    reboot.  On
> 
>    > >    power up, I can access the XADC in the FSBL.  If I stop the boot in
>    u-boot
> 
>    > >    and issue a reset command, I can still access the XADC from the
>    FSBL.
> 
>    > >    However, if I let linux start and then issue a reboot command, the
>    XADC
> 
>    > no
> 
>    > >    longer works in the FSBL (the XAdcPs_SelfTest function fails – all
>    XADC
> 
>    > >    register reads return 0).
> 
>    > >
> 
>    > >
> 
>    > >
> 
>    > >    I’m using Dizzy.  If it has anything to do with it, I’m not
>    configuring
> 
>    > >    the PL at boot – this is done after linux starts.
> 
>    > >
> 
>    > >
> 
>    > >
> 
>    > >    Is there anything I need to do to allow the XADC to work after
>    linux has
> 
>    > >    been running?
> 
>    >
> 
>    > Are you accessing the device through its driver or some other path? The
> 
>    > symptoms sound suspiciously like the device's clock isn't enabled.
> 
>    > Usually the driver is supposed to handle that though. Could you check
>    the
> 
>    > state of the PCAP clock in /sys/kernel/debug/clk/clk_summary?
> 
>    >
> 
>     
> 
>    I haven't (yet) tried to access the XADC from linux - I will need to do
>    this, so if enabling it in linux is likely to help a pointer on what to do
>    would help!

Linux does disable all unused clocks after boot. So, if you don't have
the XADC driver active in Linux, Linux is likely to disable the clock,
which might explain the issue you see.
If you're not running Linux while seeing the issue, check the
state of the clock through the debugger or something by directly reading
the clock control register (IIRC, PCAP_CLK_CTRL).

> 
>     
> 
>    The only reference to the PCAP in clk_summary is...
> 
>     
> 
>       clock                        enable_cnt  prepare_cnt  rate       
>    accuracy
> 
>    ---------------------------------------------------------------------------------
> 
>              pcap_mux              1           1            999999990  0
> 
>                 pcap_div           1           1            199999998  0
> 
>                    pcap            1           2            199999998  0

This looks good. The clock is enabled. If things look like this and the
device doesn't work, something else must be wrong.

	Sören



More information about the meta-xilinx mailing list