linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Oleksandr Shamray <oleksandrs@mellanox.com>
Cc: gregkh <gregkh@linuxfoundation.org>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	"Linux ARM" <linux-arm-kernel@lists.infradead.org>,
	devicetree@vger.kernel.org,
	"OpenBMC Maillist" <openbmc@lists.ozlabs.org>,
	"Joel Stanley" <joel@jms.id.au>, "Jiří Pírko" <jiri@resnulli.us>,
	"Tobias Klauser" <tklauser@distanz.ch>,
	linux-serial@vger.kernel.org, mec@shout.net,
	vadimp@maellanox.com, system-sw-low-level@mellanox.com,
	"Jiri Pirko" <jiri@mellanox.com>
Subject: Re: [patch v1 2/2] drivers: jtag: Add Aspeed SoC 24xx and 25xx families JTAG master driver
Date: Wed, 2 Aug 2017 16:54:57 +0200	[thread overview]
Message-ID: <CAK8P3a02O4Xrt+HECjs+GQLw8s9novYLdUUmk_V+oK=EX-HqfQ@mail.gmail.com> (raw)
In-Reply-To: <1501679918-20486-3-git-send-email-oleksandrs@mellanox.com>

On Wed, Aug 2, 2017 at 3:18 PM, Oleksandr Shamray
<oleksandrs@mellanox.com> wrote:
> Driver adds support of Aspeed 2500/2400 series SOC JTAG master controller.
>
> Driver implements the following jtag ops:
> - freq_get;
> - freq_set;
> - status_get;
> - idle;
> - xfer;
>
> It has been tested on Mellanox system with BMC equipped with
> Aspeed 2520 SoC for programming CPLD devices.
>
> Signed-off-by: Oleksandr Shamray <oleksandrs@mellanox.com>
> Signed-off-by: Jiri Pirko <jiri@mellanox.com>

Looking at this one before the subsystem. Overall looks really nice,
it seems you got a good abstraction between the subsystem and the
driver.

> +
> +static int aspeed_jtag_freq_set(struct jtag *jtag, unsigned long freq);
> +static int aspeed_jtag_freq_get(struct jtag *jtag, unsigned long *frq);
> +static int aspeed_jtag_status_get(struct jtag *jtag,
> +                                 enum jtag_endstate *status);
> +static int aspeed_jtag_idle(struct jtag *jtag,
> +                           struct jtag_run_test_idle *runtest);
> +static int aspeed_jtag_xfer(struct jtag *jtag, struct jtag_xfer *xfer);

Please try to reorder the functions definitions in a way that lets you
remove the forward declarations.

> +
> +static void aspeed_jtag_run_test_idle_sw(struct aspeed_jtag *aspeed_jtag,
> +                                        struct jtag_run_test_idle *runtest)
> +{
> +       char sm_pause_irpause[] = {1, 1, 1, 1, 0, 1, 0};
> +       char sm_pause_drpause[] = {1, 1, 1, 0, 1, 0};
> +       char sm_idle_irpause[] = {1, 1, 0, 1, 0};
> +       char sm_idle_drpause[] = {1, 0, 1, 0};
> +       char sm_pause_idle[] = {1, 1, 0};

These could be 'static const' if you adapt the aspeed_jtag_sm_cycle
prototype accordingly.

> +
> +static const struct of_device_id aspeed_jtag_of_match[] = {
> +       { .compatible = "aspeed,aspeed-jtag", },
> +       {}
> +};

The series should include a patch for the DT binding for this device.
You may want to be a little more specific here, to avoid problems if
aspeed ever makes an updated version of this device with a slightly
different register interface. Usually we include the full name of the
SoC in the "compatible" string for that.

       Arnd

  parent reply	other threads:[~2017-08-02 14:55 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-02 13:18 [patch v1 0/2] JTAG driver introduction Oleksandr Shamray
2017-08-02 13:18 ` [patch v1 1/2] drivers: jtag: Add JTAG core driver Oleksandr Shamray
2017-08-02 13:44   ` Greg KH
2017-08-02 13:44   ` Greg KH
2017-08-02 14:16   ` Andrew Lunn
2017-08-02 14:24   ` Neil Armstrong
2017-08-02 15:37   ` Arnd Bergmann
2017-08-03  9:28   ` Tobias Klauser
2017-08-02 13:18 ` [patch v1 2/2] drivers: jtag: Add Aspeed SoC 24xx and 25xx families JTAG master driver Oleksandr Shamray
2017-08-02 14:30   ` Neil Armstrong
2017-08-02 14:56     ` Arnd Bergmann
2017-08-02 14:54   ` Arnd Bergmann [this message]
2017-08-02 15:31   ` Randy Dunlap
2017-08-03 12:12   ` kbuild test robot
2017-08-03 14:35   ` [PATCH] drivers: jtag: fix resource_size.cocci warnings kbuild test robot
2017-08-03 14:48     ` Oleksandr Shamray
2017-08-03 14:35   ` [patch v1 2/2] drivers: jtag: Add Aspeed SoC 24xx and 25xx families JTAG master driver kbuild test robot
2017-08-02 14:12 ` [patch v1 0/2] JTAG driver introduction Andrew Lunn
2017-08-03 15:26   ` Oleksandr Shamray
2017-08-03 17:48     ` Andrew Lunn
2017-08-28 20:03       ` Pavel Machek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAK8P3a02O4Xrt+HECjs+GQLw8s9novYLdUUmk_V+oK=EX-HqfQ@mail.gmail.com' \
    --to=arnd@arndb.de \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jiri@mellanox.com \
    --cc=jiri@resnulli.us \
    --cc=joel@jms.id.au \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=mec@shout.net \
    --cc=oleksandrs@mellanox.com \
    --cc=openbmc@lists.ozlabs.org \
    --cc=system-sw-low-level@mellanox.com \
    --cc=tklauser@distanz.ch \
    --cc=vadimp@maellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).