openbmc.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Joel Stanley <joel@jms.id.au>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linux-aspeed@lists.ozlabs.org,
	OpenBMC Maillist <openbmc@lists.ozlabs.org>,
	devicetree <devicetree@vger.kernel.org>,
	Andrew Jeffery <andrew@aj.id.au>,
	 Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 03/14] fsi: Add mechanism to set the tSendDelay and tEchoDelay values
Date: Thu, 28 Jun 2018 13:40:48 +0930	[thread overview]
Message-ID: <CACPK8XdRk+qgomCV3wZfje_SzLEV12jnqfD_idXOwH=qoZOXZg@mail.gmail.com> (raw)
In-Reply-To: <20180626232605.13420-4-benh@kernel.crashing.org>

On 27 June 2018 at 08:55, Benjamin Herrenschmidt
<benh@kernel.crashing.org> wrote:
> Those values control the amount of "dummy" clocks between commands and
> between a command and its response.
>
> This adds a way to configure them from sysfs (to be later extended to
> defaults in the device-tree). The default remains 16 (the HW default).

We should add these to  Documentation/ABI/testing/sysfs-bus-fsi.

> This is only supported if the backend supports the new link_config()
> callback to configure the generation of those delays.
>
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

Reviewed-by: Joel Stanley <joel@jms.id.au>

> ---
> ---
>  drivers/fsi/fsi-core.c   | 109 ++++++++++++++++++++++++++++++++-------
>  drivers/fsi/fsi-master.h |   2 +
>  2 files changed, 93 insertions(+), 18 deletions(-)
>
> diff --git a/drivers/fsi/fsi-core.c b/drivers/fsi/fsi-core.c
> index 2f6f9b8c75e4..1ae5be31b4bf 100644
> --- a/drivers/fsi/fsi-core.c
> +++ b/drivers/fsi/fsi-core.c
> @@ -81,6 +81,8 @@ struct fsi_slave {
>         int                     id;
>         int                     link;
>         uint32_t                size;   /* size of slave address space */
> +       u8                      t_send_delay;
> +       u8                      t_echo_delay;
>  };
>
>  #define to_fsi_master(d) container_of(d, struct fsi_master, dev)
> @@ -239,15 +241,15 @@ static inline uint32_t fsi_smode_sid(int x)
>         return (x & FSI_SMODE_SID_MASK) << FSI_SMODE_SID_SHIFT;
>  }
>
> -static uint32_t fsi_slave_smode(int id)
> +static uint32_t fsi_slave_smode(int id, u8 t_senddly, u8 t_echodly)

Can I buy you a vowel? :)

>  {
>         return FSI_SMODE_WSC | FSI_SMODE_ECRC
>                 | fsi_smode_sid(id)
> -               | fsi_smode_echodly(0xf) | fsi_smode_senddly(0xf)
> +               | fsi_smode_echodly(t_echodly - 1) | fsi_smode_senddly(t_senddly - 1)
>                 | fsi_smode_lbcrr(0x8);
>  }
>

  reply	other threads:[~2018-06-28  4:11 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-26 23:25 [PATCH 00/14] fsi: Fixes and Coldfire coprocessor offload Benjamin Herrenschmidt
2018-06-26 23:25 ` [PATCH 01/14] devres: Add devm_of_iomap() Benjamin Herrenschmidt
2018-06-26 23:25 ` [PATCH 02/14] fsi: Move code around to avoid forward declaration Benjamin Herrenschmidt
2018-06-26 23:25 ` [PATCH 03/14] fsi: Add mechanism to set the tSendDelay and tEchoDelay values Benjamin Herrenschmidt
2018-06-28  4:10   ` Joel Stanley [this message]
2018-06-26 23:25 ` [PATCH 04/14] fsi: master-gpio: Rename and adjust send delay Benjamin Herrenschmidt
2018-06-26 23:25 ` [PATCH 05/14] fsi: master-gpio: Add support for link_config Benjamin Herrenschmidt
2018-06-28  4:11   ` Joel Stanley
2018-06-26 23:25 ` [PATCH 06/14] fsi: master-gpio: Add more tracepoints Benjamin Herrenschmidt
2018-06-28  4:11   ` Joel Stanley
2018-07-12  2:01     ` Benjamin Herrenschmidt
2018-06-26 23:25 ` [PATCH 07/14] fsi: master-gpio: Remove unused definitions Benjamin Herrenschmidt
2018-06-28  4:11   ` Joel Stanley
2018-06-26 23:25 ` [PATCH 08/14] fsi: master-gpio: Remove "GPIO" prefix on some definitions Benjamin Herrenschmidt
2018-06-28  4:11   ` Joel Stanley
2018-06-26 23:26 ` [PATCH 09/14] fsi: master-gpio: Add missing release function Benjamin Herrenschmidt
2018-06-28  4:12   ` Joel Stanley
2018-06-26 23:26 ` [PATCH 10/14] fsi: Move various master definitions to a common header Benjamin Herrenschmidt
2018-06-28  4:12   ` Joel Stanley
2018-06-26 23:26 ` [PATCH 11/14] dt-bindings: fsi: Document binding for the fsi-master-ast-cf "device" Benjamin Herrenschmidt
2018-06-28  4:12   ` Joel Stanley
2018-07-03 22:30   ` Rob Herring
2018-07-04  1:16     ` Benjamin Herrenschmidt
2018-07-05 16:08       ` Rob Herring
2018-07-07  1:50         ` Benjamin Herrenschmidt
2018-06-26 23:26 ` [PATCH 12/14] fsi: master-ast-cf: Add new FSI master using Aspeed ColdFire Benjamin Herrenschmidt
2018-06-28  5:03   ` Joel Stanley
2018-06-26 23:26 ` [PATCH 13/14] arm: dts: OpenPower Romulus system can use coprocessor for FSI Benjamin Herrenschmidt
2018-06-28  4:12   ` Joel Stanley
2018-06-26 23:26 ` [PATCH 14/14] arm: dts: OpenPower Palmetto " Benjamin Herrenschmidt
2018-06-28  4:13   ` Joel Stanley
  -- strict thread matches above, loose matches on Subject: below --
2018-06-26 23:23 [PATCH 00/14] fsi: Fixes and Coldfire coprocessor offload Benjamin Herrenschmidt
2018-06-26 23:23 ` [PATCH 03/14] fsi: Add mechanism to set the tSendDelay and tEchoDelay values Benjamin Herrenschmidt

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='CACPK8XdRk+qgomCV3wZfje_SzLEV12jnqfD_idXOwH=qoZOXZg@mail.gmail.com' \
    --to=joel@jms.id.au \
    --cc=andrew@aj.id.au \
    --cc=benh@kernel.crashing.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-aspeed@lists.ozlabs.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=openbmc@lists.ozlabs.org \
    /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).