Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752528AbdI1JCR (ORCPT ); Thu, 28 Sep 2017 05:02:17 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:45286 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752392AbdI1JCN (ORCPT ); Thu, 28 Sep 2017 05:02:13 -0400 X-Google-Smtp-Source: AOwi7QABqUCPPd4e9SYSYljs3C62h4SmYVMqoXc6U86sfd7wiHmnNS1NiPlDSCQPLDGDDfFE5cVKdzUO+gnuEm7FGwA= MIME-Version: 1.0 In-Reply-To: References: <1505985932-27568-1-git-send-email-oleksandrs@mellanox.com> From: Geert Uytterhoeven Date: Thu, 28 Sep 2017 11:02:10 +0200 X-Google-Sender-Auth: yqjJszmxOFubJPBq44r3ySY7E7Y Message-ID: Subject: Re: [patch v9 0/4] JTAG driver introduction To: Oleksandr Shamray Cc: Greg KH , Arnd Bergmann , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "devicetree@vger.kernel.org" , "openbmc@lists.ozlabs.org" , Joel Stanley , Jiri Pirko , Tobias Klauser , "linux-serial@vger.kernel.org" , "mec@shout.net" , Vadim Pasternak , system-sw-low-level , Rob Herring , "openocd-devel-owner@lists.sourceforge.net" , "linux-api@vger.kernel.org" , "David S. Miller" , Mauro Carvalho Chehab , linux-spi , Mark Brown Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2324 Lines: 57 Hi Oleksandr, On Thu, Sep 28, 2017 at 10:53 AM, Oleksandr Shamray wrote: >> [My attention was drawn by >> https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flwn.net >> %2FArticles%2F734440%2F&data=02%7C01%7Coleksandrs%40mellanox.com%7 >> C97b8ba88686a42daaace08d5064b92eb%7Ca652971c7d2e4d9ba6a4d149256f >> 461b%7C0%7C0%7C636421844026854216&sdata=TeHD4a3%2FBN6a5XG3Jizf5 >> pmsyJHJjzkEzkpnqsXC6S0%3D&reserved=0] >> [CC linux-spi, which was never included, while linux-serial was] >> >> On Thu, Sep 21, 2017 at 11:25 AM, Oleksandr Shamray >> wrote: >> > When a need raise up to use JTAG interface for system's devices >> > programming or CPU debugging, usually the user layer application >> > implements jtag protocol by bit-bang or using a proprietary connection >> > to vendor hardware. >> > This method can be slow and not generic. >> > > > > [..] > >> > >> > Initial version provides the system calls set for: >> > - SIR (Scan Instruction Register, IEEE 1149.1 Data Register scan); >> > - SDR (Scan Data Register, IEEE 1149.1 Instruction Register scan); >> > - RUNTEST (Forces the IEEE 1149.1 bus to a run state for a specified >> > number of clocks. >> > >> > 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. >> >> Or by using an SPI master? >> > > I think it depends on how flexible the SPI interface is. If you can set it to transfer > from 1 to n bits at a time, and you control the TMS line in software, you should > be able to use it. If the SPI interface can only transfer a multiple of 8 bits > at a time, then in general it would not be suitable for JTAG. Sure, that depends on the actual SPI master interface. But I guess you can write a generic JTAG-over-SPI driver, and use a tms-gpios property in DT to specify how to control TMS. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org 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