All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joel Stanley <joel@jms.id.au>
To: Eddie James <eajames@linux.ibm.com>
Cc: OpenBMC Maillist <openbmc@lists.ozlabs.org>,
	Andrew Jeffery <andrew@aj.id.au>
Subject: Re: [PATCH linux dev-5.8 3/4] fsi: Aspeed master: Set clock frequency from devicetree
Date: Tue, 1 Sep 2020 06:39:12 +0000	[thread overview]
Message-ID: <CACPK8Xc5OCdWAMxF9tzvbP-rzd7HFdRU5gQD0GNFaYsiiXnj5A@mail.gmail.com> (raw)
In-Reply-To: <20200824221051.47972-4-eajames@linux.ibm.com>

On Mon, 24 Aug 2020 at 22:11, Eddie James <eajames@linux.ibm.com> wrote:
>
> Set the FSI clock frequency based on the value encoded in the
> devicetree, if present.

Should we default it to 166 if it's not present?

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

>
> Signed-off-by: Eddie James <eajames@linux.ibm.com>
> ---
>  drivers/fsi/fsi-master-aspeed.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/drivers/fsi/fsi-master-aspeed.c b/drivers/fsi/fsi-master-aspeed.c
> index c006ec008a1a..aedcc9be48ca 100644
> --- a/drivers/fsi/fsi-master-aspeed.c
> +++ b/drivers/fsi/fsi-master-aspeed.c
> @@ -515,6 +515,7 @@ static int fsi_master_aspeed_probe(struct platform_device *pdev)
>         struct fsi_master_aspeed *aspeed;
>         struct resource *res;
>         int rc, links, reg;
> +       u32 clk_freq;
>         __be32 raw;
>
>         rc = tacoma_cabled_fsi_fixup(&pdev->dev);
> @@ -539,6 +540,11 @@ static int fsi_master_aspeed_probe(struct platform_device *pdev)
>                 dev_err(aspeed->dev, "couldn't get clock\n");
>                 return PTR_ERR(aspeed->clk);
>         }
> +
> +       if (!of_property_read_u32(pdev->dev.of_node, "clock-frequency",
> +                                 &clk_freq))
> +               clk_set_rate(aspeed->clk, clk_freq);
> +
>         rc = clk_prepare_enable(aspeed->clk);
>         if (rc) {
>                 dev_err(aspeed->dev, "couldn't enable clock\n");
> --
> 2.26.2
>

  reply	other threads:[~2020-09-01  6:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-24 22:10 [PATCH linux dev-5.8 0/4] AST2600 clock and FSI: Add APLL to control FSI clock Eddie James
2020-08-24 22:10 ` [PATCH linux dev-5.8 1/4] clk: ast2600: Add functionality to the APLL clock Eddie James
2020-09-01  6:36   ` Joel Stanley
2020-09-02 15:28     ` Eddie James
2020-08-24 22:10 ` [PATCH linux dev-5.8 2/4] dt-bindings: fsi: Aspeed master: Add clock-frequency property Eddie James
2020-09-01  6:38   ` Joel Stanley
2020-08-24 22:10 ` [PATCH linux dev-5.8 3/4] fsi: Aspeed master: Set clock frequency from devicetree Eddie James
2020-09-01  6:39   ` Joel Stanley [this message]
2020-08-24 22:10 ` [PATCH linux dev-5.8 4/4] ARM: dts: Aspeed: Rainier: Set FSI clock frequency Eddie James

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=CACPK8Xc5OCdWAMxF9tzvbP-rzd7HFdRU5gQD0GNFaYsiiXnj5A@mail.gmail.com \
    --to=joel@jms.id.au \
    --cc=andrew@aj.id.au \
    --cc=eajames@linux.ibm.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.