Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752751AbdI1LMF (ORCPT ); Thu, 28 Sep 2017 07:12:05 -0400 Received: from mail-ve1eur01on0067.outbound.protection.outlook.com ([104.47.1.67]:29472 "EHLO EUR01-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751816AbdI1LLs (ORCPT ); Thu, 28 Sep 2017 07:11:48 -0400 From: Oleksandr Shamray To: Geert Uytterhoeven 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 Subject: RE: [patch v9 0/4] JTAG driver introduction Thread-Topic: [patch v9 0/4] JTAG driver introduction Thread-Index: AQHTMru4M5azt7XbqEuLkdSxxS/sN6LKA2cAgAAE/MCAAAMUAIAAIqNQ Date: Thu, 28 Sep 2017 11:11:42 +0000 Message-ID: References: <1505985932-27568-1-git-send-email-oleksandrs@mellanox.com> In-Reply-To: Accept-Language: en-US, uk-UA Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=oleksandrs@mellanox.com; x-originating-ip: [80.90.224.13] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;VI1PR05MB3343;6:no5mxZ/+rBgQR4VUQ9EIsDKHlGLze6N9DQ9neeKWeCAjkm1GQK44xulUH2kOr9pQG5ZAXWQTERvbGV0gQ9eUftrmm7PvEF3fwGw4bHqar0QvDWtG9Tst9SrLlM5D5WNaDweBzyr46n55RAoY/g0CBjwxWhqBRCgJ9HUiRJnr/T8iTsE9MZQExViCwPqQ4c4YviMJ/Coz5oz9Cl03OpwO/m/GIqmkqc55PIC+uDdLHw3OjA52p3sLWc3kph0Gn/d9TyqWcAJq1QeDSXTXXMBmqkpUXhi+L1gFviSo+TcqfFJF93NWpZRW/xUQPnVd0nFrCDShDpj4EDirliny18ZjfA==;5:bSeEanLLST/NB8olvOlpyz3Jz2kAklRfiU5bmNiIJi0aA9Ma9Auf/XqNqlY31gJMMkf96R5tJD1X4DMu4xhe3tGntJieYkHJbXit+q8xbaZa7NwPyf9J7fmhqOsiUsOsoCfjrw/pJc3uWvs2/ZRA/w==;24:S8LdIrYUnF/LZ4jm2BIzpHAe2Ev2Cs9AbEwTzy1BawX7MN8sGwaH6Po5NtVLRBOwqTSFvfHLl18ujGuojsF2JBwRZFSoXVN6pb/M13A4+vo=;7:ObfCEA2lL3SNjvnn1TEJtf0N6nE+DTSV+SH+IXGflSnkgVLG8xUBn1MFD2kF1CCpVNT7AH8uUXuXasBHBFC1YnS3M9uBnO+FikzzoVgSsvfElxjGoEf1Ib/Bw7XdRTMLUNUdXiWG4K2n/dd4CDCHpK96dvKOujROZq00omPZVWpMsJrKUpeg9Q1lOOd39N4lf2D3C8WxdlCseL79DdTpkJ4h91Q/QnPBuhaaM8ueBGk= x-ms-office365-filtering-correlation-id: 79a4c72b-661c-4866-8de8-08d50661b2ed x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(2017030254152)(48565401081)(2017052603199)(201703131423075)(201703031133081)(201702281549075);SRVR:VI1PR05MB3343; x-ms-traffictypediagnostic: VI1PR05MB3343: x-exchange-antispam-report-test: UriScan:(143289334528602)(9452136761055)(189930954265078)(65623756079841)(258649278758335)(42262312472803)(45079756050767); x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(93006095)(93001095)(10201501046)(100000703101)(100105400095)(3002001)(6055026)(6041248)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123562025)(20161123555025)(20161123558100)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:VI1PR05MB3343;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:VI1PR05MB3343; x-forefront-prvs: 0444EB1997 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(6009001)(376002)(346002)(39860400002)(189002)(13464003)(377454003)(199003)(24454002)(6306002)(2906002)(3660700001)(86362001)(14454004)(93886005)(55016002)(8676002)(8936002)(33656002)(3280700002)(25786009)(99286003)(81166006)(966005)(68736007)(81156014)(478600001)(229853002)(189998001)(4326008)(45080400002)(54906003)(5250100002)(53936002)(316002)(6506006)(97736004)(6436002)(3846002)(7736002)(53546010)(50986999)(5660300001)(7696004)(2950100002)(106356001)(105586002)(2900100001)(6246003)(9686003)(74316002)(101416001)(76176999)(6916009)(7416002)(305945005)(66066001)(54356999)(6116002)(102836003);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR05MB3343;H:AM4PR0501MB2194.eurprd05.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Sep 2017 11:11:42.4581 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB3343 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by nfs id v8SBCA5s013735 Content-Length: 3544 Lines: 84 > -----Original Message----- > From: geert.uytterhoeven@gmail.com [mailto:geert.uytterhoeven@gmail.com] > On Behalf Of Geert Uytterhoeven > Sent: Thursday, September 28, 2017 12:02 PM > 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 level@mellanox.com>; Rob Herring ; openocd-devel- > owner@lists.sourceforge.net; linux-api@vger.kernel.org; David S. Miller > ; Mauro Carvalho Chehab ; > linux-spi ; Mark Brown > Subject: Re: [patch v9 0/4] JTAG driver introduction > > 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%2Flw > >> n.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. > Yes, this is a good idea for SoC which are not equipped with JTAG hardware. > 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