Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1719600

Re: [patch v6 0/3] JTAG driver introduction

From Rick Altherr <raltherr@google.com>
Newsgroups linux.kernel
Subject Re: [patch v6 0/3] JTAG driver introduction
Date 2017-08-24 23:40 +0200
Message-ID <ui813-3xK-1@gated-at.bofh.it> (permalink)
References <uhk4i-4NV-13@gated-at.bofh.it> <ui7y1-3iu-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Aug 24, 2017 at 2:07 PM, Linus Walleij <linus.walleij@linaro.org> wrote:
> On Tue, Aug 22, 2017 at 6:10 PM, Oleksandr Shamray
> <oleksandrs@mellanox.com> wrote:
>
>> SoC which are not equipped with JTAG master interface, can be built
>> on top of JTAG core driver infrastructure, by applying bit-banging of
>> TDI, TDO, TCK and TMS pins within the hardware specific driver.
>
> I guess you mean it should then use GPIO lines for bit-banging?
>
> I was wondering about how some JTAG clients like openOCD does
> this in some cases.
>

Many common uses of OpenOCD leverage USB devices, such as FTDI FT232R,
that have a command queue for bitbanging operations.  Managing these
via libusb is ugly but platform-agnostic.

> In my worst nightmare they export GPIO lines using
> the horrid ABI in /sys/gpio/*
>

https://sourceforge.net/p/openocd/code/ci/v0.10.0/tree/src/jtag/drivers/sysfsgpio.c

While that is certainly horrible (and slow), mapping in the GPIO
registers via /dev/mem strikes me as worse:

https://sourceforge.net/p/openocd/code/ci/v0.10.0/tree/src/jtag/drivers/bcm2835gpio.c

> In best case they use the GPIO character device or even
> libgpiod.
>
> But having a JTAG abstraction inside the kernel that can
> grab a few lines for JTAG defined in a device tree, ACPI DSDT
> or similar makes sense too, as it abstracts the hardware so the
> JTAG client can then just open whatever /dev/jtag0 is on the machine
> and go ahead without having to bother about what GPIO lines
> are connected exactly where.
>
> Yours,
> Linus Walleij

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[patch v6 0/3] JTAG driver introduction Oleksandr Shamray <oleksandrs@mellanox.com> - 2017-08-22 18:20 +0200
  [patch v6 1/3] drivers: jtag: Add JTAG core driver Oleksandr Shamray <oleksandrs@mellanox.com> - 2017-08-22 18:20 +0200
  Re: [patch v6 0/3] JTAG driver introduction Linus Walleij <linus.walleij@linaro.org> - 2017-08-24 23:10 +0200
    Re: [patch v6 0/3] JTAG driver introduction Rick Altherr <raltherr@google.com> - 2017-08-24 23:40 +0200
      Re: [patch v6 0/3] JTAG driver introduction Linus Walleij <linus.walleij@linaro.org> - 2017-08-25 10:40 +0200
        Re: [patch v6 0/3] JTAG driver introduction Stuart Longland <stuartl@longlandclan.id.au> - 2017-08-25 11:00 +0200
          Re: [patch v6 0/3] JTAG driver introduction Rick Altherr <raltherr@google.com> - 2017-08-25 19:00 +0200
          Re: [patch v6 0/3] JTAG driver introduction Linus Walleij <linus.walleij@linaro.org> - 2017-08-28 00:30 +0200
        Re: [patch v6 0/3] JTAG driver introduction Rick Altherr <raltherr@google.com> - 2017-08-25 19:00 +0200
          Re: [patch v6 0/3] JTAG driver introduction Linus Walleij <linus.walleij@linaro.org> - 2017-08-28 00:40 +0200
            Re: [patch v6 0/3] JTAG driver introduction Rick Altherr <raltherr@google.com> - 2017-08-28 05:00 +0200

csiph-web