From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7C399C433E0 for ; Fri, 15 Jan 2021 10:48:23 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0E9D123730 for ; Fri, 15 Jan 2021 10:48:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0E9D123730 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=XyOFIjwXXweJc8rMqxq6mIpthwOOqnVXIPDraDhFlkw=; b=wbSyc0DHL9n3R5TBuKazBbeyr 0eVs2CNFiZHlckTCE0vC8xnZ3mrUcQ/QKRcnfZfvbYnHLBSFUCDvb7tD1w4aqlp/+gaF0weORsK7R psX/QtRxBNNjnX6sWIybEh4UCzNT2QRU33yYIYgT54cPoXuQ3XBhNuKf0Ci1ILh23VOzlMogBwe60 GllHBFFE9TeigJNPbcQz5rB0DOrZiOjPdgRI7/q1kFC8vJTT/pbl1cuIQK9eEkMehmsWltjUvV7AU 9+/8aEg0DI1XJ9B8tC8bQCcNDfglsc6riXDuvqdpPv4H/VJy/razcCiO2xKOUO6dB5r1F4K4Q0x7y lp4m5heUg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l0Mcv-0004EI-S8; Fri, 15 Jan 2021 10:46:45 +0000 Received: from mail-lj1-x231.google.com ([2a00:1450:4864:20::231]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l0Mcs-0004DN-TP for linux-arm-kernel@lists.infradead.org; Fri, 15 Jan 2021 10:46:44 +0000 Received: by mail-lj1-x231.google.com with SMTP id f17so9838926ljg.12 for ; Fri, 15 Jan 2021 02:46:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=HFix5lhrDvWuvTYP+J9B23RG/cixkCW5Vh+giTcORR4=; b=IfKiigvw7rabeBypXKMIk+HUS/nn4+nBWb+Q5dVSfhEH0O2Slqb2RczTz+6MU7p9wm ttWhUOu3v8cUhJJan0fmOqejf2/w7xcZhoqkR46tyE0l1mMP86tSgW1q4Z31Wdj+fy3R nuyrVHpgPaCdn+Losuyyk78q+NtJEcOrLE0rDEi4CMWChYeI+rq7VHIrOX7vZ32PiZNb 9m5ErrMvG2Qg7KcXOiWUY4rqNJWh5fizktu81DF7iCbKBb6l0y4k5Z1X/Rq19m6B3FEZ vvnGMOcnhr6xu1cOBHQY7EPi32fZ6wCvOmBe7PUlJSXppDAefemAFo7hXsZBdoP+hljP k5pA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=HFix5lhrDvWuvTYP+J9B23RG/cixkCW5Vh+giTcORR4=; b=m1PHRWJdgd+WHHyfBvLCu9DU0qLrWUPXCoC1G7Sgmi4nVIYf8/Os/FYQDxJyQYxfEl RwPoFfYmwF48Z2mG9AxC0JqTnq7rqqI60lsM+NNA9H2dlCpXP/4IWQ3FJALc2Nx5rZT1 D7V+E7B/04nRWrtbBMEORf15KMpvRzA1dDUqYsJ6kGqKpvnO5GMRZcJD3rz7xKX3tmp7 qiVx2XuNHZHk1gYq3dQWZ8WsDdQwL6zzOFjWRjagFgnmBUEYjc3Ne2spQ9OmYDjVpHQh GmjANX1UO5VKN4lkLlT8jVuqX6ecBx9uYrddYQ7xoauiK0mVq9UmXKwBp6bvtQjeeBWJ i/sQ== X-Gm-Message-State: AOAM53101fHdU6SJOaD8H4HBjjDORK1q+musIfcVjyk6RwEFj49kb2rt dDR29BapZaZFyV9IGR1HPi8= X-Google-Smtp-Source: ABdhPJywQNSylPcjzVHIN5StuUgLOe9rq9AjfMuFfjtSMpvP39Hjj4VxWqmJJF0xcw/sff47Y2cGHg== X-Received: by 2002:a2e:a377:: with SMTP id i23mr5424974ljn.103.1610707600305; Fri, 15 Jan 2021 02:46:40 -0800 (PST) Received: from home.paul.comp (paulfertser.info. [2001:470:26:54b:226:9eff:fe70:80c2]) by smtp.gmail.com with ESMTPSA id 12sm853414lfm.235.2021.01.15.02.46.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jan 2021 02:46:39 -0800 (PST) Received: from home.paul.comp (home.paul.comp [IPv6:0:0:0:0:0:0:0:1]) by home.paul.comp (8.15.2/8.15.2/Debian-14~deb10u1) with ESMTP id 10FAkao0004477; Fri, 15 Jan 2021 13:46:37 +0300 Received: (from paul@localhost) by home.paul.comp (8.15.2/8.15.2/Submit) id 10FAkZc3004476; Fri, 15 Jan 2021 13:46:35 +0300 Date: Fri, 15 Jan 2021 13:46:35 +0300 From: Paul Fertser To: Ernesto Corona Subject: Re: [PATCH v29 0/6] JTAG driver introduction Message-ID: <20210115104635.GA2971@home.paul.comp> References: <20200413222920.4722-1-ernesto.corona@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200413222920.4722-1-ernesto.corona@intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210115_054642_962941_7B3FD0FD X-CRM114-Status: GOOD ( 17.84 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hello, This is a multi-part review of the series, with general notes inline in this message, and specific points raised as replies to the individual patches. On Mon, Apr 13, 2020 at 03:29:14PM -0700, Ernesto Corona wrote: > We propose to implement general JTAG interface and infrastructure > to communicate with user layer application. Working with a Tioga Pass server platform I needed to use the JTAG master controller of an ASPEED AST2500 SoC to configure a Lattice LCMXO2-4000HC CPLD. I'm mentioning these fine details because that's the only proper runtime testing I performed, but my review is not limited to that. Being a long-time OpenOCD community member, I got familiar with many different facilities and protocols offered by hardware JTAG adapters, and of wide range of usecases as I was providing end-user support. This is my perspective when looking at these patches. I have to note that the current v29 version of the series is broken in several aspects: 1. The aspeed driver fails probe(), see the driver review for details; 2. The uapi include header is unusable; 3. The offered userspace implementation wasn't updated to the latest API, but even with the changes to make it compile it's still a mess too horrible to be used in production; Points 1 and 2 will be addressed in separate mails. To workaround point 3 I prepared a recipe with an additional patch[0] so that mlnx_cpldprog can be at least compiled and used for some minimal testing. The shortcomings of mlnx_cpldprog are numerous: 1. It doesn't consistently choose between hardware and bitbang modes; 2. Even though it checks TDO it doesn't print any errors on mismatch and continues playing back the SVF as if it's all right; 3. It has JTAG speed hardcoded; 4. It doesn't implement RUNTEST so with the CPLD I'm using it's always _not_ working properly, failing silently; 5. It is just awfully slow, taking about 40 minutes to play back a file that takes 1.5 minutes with OpenOCD with the same hardware and kernel driver. So I added support for the proposed API to OpenOCD: patch that applies to the version in OpenBMC[1], patch for the latest version[2]. And since it can do much more than just playing back SVF I hope this can highlight some essential API shortcomings if it's meant to be generic. My impression is that in its current state it's not adequate for the purpose. [0] https://bitbucket.org/paulfertser/mlnx_cpldprog_bitbake [1] http://openocd.zylin.com/#/c/5976/ [2] http://openocd.zylin.com/#/c/5975/ -- Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software! mailto:fercerpav@gmail.com _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel