Re: [PATCH v6 1/1] gpio: add sloppy logic analyzer using polling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Wolfram,

On Wed, Dec 22, 2021 at 1:58 PM Wolfram Sang
<wsa+renesas@xxxxxxxxxxxxxxxxxxxx> wrote:
> > > Yes, the search engines helped[1]. I run a minimal system, so when I
> > > mount cpusets, it will actually mount cgroups with a default mount
> > > option of "noprefix". But you likely run a rootfs with cgroups already,
> > > so it gets mounted directly without "noprefix". Then, when the logic
> > > analyzer tries to mount again, the implied default "noprefix" is
> > > discarded.
> >
> > Yeah, systemd on Debian has it mounted.
>
> So, the proper solution is to use/mount 'cgroups2' instead of 'cpuset'.
> But this needs more thinking and testing and, thus, another revision.
> Dunno if I can make it this year, so I am probably going to miss the
> next merge window after all :(
>
> Geert, if you still want to test the PFC patch I sent, then this patch
> for the script should get you going:

Thank you, much better!

With this I get:

    1# gpio-sloppy-logic-analyzer -s 1500000 -t 1H+2F -d 15000
    Auto-Isolating CPU1
    Setting up 'i2c2-analyzer': 22500 samples at 1500000Hz with 1H+2F
trigger using CPU1
    1# echo: write error: Numerical result out of range
    Capture error! Check kernel log

kernel log has:

    gpio-sloppy-logic-analyzer i2c2-analyzer: couldn't read GPIOs: -34

with debug code:

    priv->delay_ns = 666
    priv->acq_delay = 2342

Whoops, R-Car M2-W GPIO is too slow (clocked at 10 MHz, compared to 66
MHz on R-Car H3 ES2.0)?

Retry with slower speed, until it works:

    1# gpio-sloppy-logic-analyzer -s 300000 -t 1H+2F -d 15000
    Setting up 'i2c2-analyzer': 4500 samples at 300000Hz with 1H+2F
trigger using CPU1
    2# i2cdetect -y 2
    1# cp: cannot stat
'/sys/kernel/debug/gpio-sloppy-logic-analyzer/i2c2-analyzer/sample_data':
No such file or directory

And the sample_data file is indeed missing.

After reboot, everything works fine, and I can no longer reproduce the
missing file issue above, even when repeating the same steps.
The resulting data file can be viewed with pulseview, and I can see SCL
and SDA activity. Nice!

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux