devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@kernel.org>
To: Chunyan Zhang <zhang.lyra@gmail.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Michael Turquette <mturquette@baylibre.com>,
	Rob Herring <robh+dt@kernel.org>
Cc: linux-clk@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, Orson Zhai <orsonzhai@gmail.com>,
	Baolin Wang <baolin.wang7@gmail.com>,
	Chunyan Zhang <zhang.lyra@gmail.com>,
	Chunyan Zhang <chunyan.zhang@unisoc.com>
Subject: Re: [PATCH V2 6/6] clk: sprd: add clocks support for SC9863A
Date: Sat, 04 Jan 2020 23:20:06 -0800	[thread overview]
Message-ID: <20200105072007.910862085B@mail.kernel.org> (raw)
In-Reply-To: <20191216121932.22967-7-zhang.lyra@gmail.com>

Quoting Chunyan Zhang (2019-12-16 04:19:32)
> diff --git a/drivers/clk/sprd/sc9863a-clk.c b/drivers/clk/sprd/sc9863a-clk.c
> new file mode 100644
> index 000000000000..145bb0a78740
> --- /dev/null
> +++ b/drivers/clk/sprd/sc9863a-clk.c
> @@ -0,0 +1,1835 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +/*
> + * Unisoc SC9863A clock driver
> + *
> + * Copyright (C) 2019 Unisoc, Inc.
> + * Author: Chunyan Zhang <chunyan.zhang@unisoc.com>
> + */
> +
> +#include <linux/clk-provider.h>
> +#include <linux/err.h>
> +#include <linux/io.h>
> +#include <linux/module.h>
> +#include <linux/of_device.h>

Is this include used?

> +#include <linux/platform_device.h>
> +#include <linux/slab.h>
> +
> +#include <dt-bindings/clock/sprd,sc9863a-clk.h>
> +
> +#include "common.h"
> +#include "composite.h"
> +#include "div.h"
> +#include "gate.h"
> +#include "mux.h"
> +#include "pll.h"
> +
[...]
> +                               0x1000, BIT(12), 0, 0);
> +static SPRD_SC_GATE_CLK_FW_NAME(uart0_eb,      "uart0-eb",     "ext-26m", 0x0,
> +                               0x1000, BIT(13), CLK_IGNORE_UNUSED, 0);

Why are we CLK_IGNORE_UNUSED marking these clks? Please add a comment to
explain why this should stay instead of being marked as critical.

> +static SPRD_SC_GATE_CLK_FW_NAME(uart1_eb,      "uart1-eb",     "ext-26m", 0x0,
> +                               0x1000, BIT(14), CLK_IGNORE_UNUSED, 0);
> +static SPRD_SC_GATE_CLK_FW_NAME(uart2_eb,      "uart2-eb",     "ext-26m", 0x0,
> +                               0x1000, BIT(15), CLK_IGNORE_UNUSED, 0);
> +static SPRD_SC_GATE_CLK_FW_NAME(uart3_eb,      "uart3-eb",     "ext-26m", 0x0,
> +                               0x1000, BIT(16), CLK_IGNORE_UNUSED, 0);
> +static SPRD_SC_GATE_CLK_FW_NAME(uart4_eb,      "uart4-eb",     "ext-26m", 0x0,
> +                               0x1000, BIT(17), CLK_IGNORE_UNUSED, 0);
> +static SPRD_SC_GATE_CLK_FW_NAME(sim0_32k_eb,   "sim0_32k-eb",  "ext-26m", 0x0,
> +                               0x1000, BIT(18), 0, 0);
> +static SPRD_SC_GATE_CLK_FW_NAME(spi3_eb,       "spi3-eb",      "ext-26m", 0x0,
> +                               0x1000, BIT(19), 0, 0);
> +static SPRD_SC_GATE_CLK_FW_NAME(i2c5_eb,       "i2c5-eb",      "ext-26m", 0x0,
> +                               0x1000, BIT(20), 0, 0);
> +static SPRD_SC_GATE_CLK_FW_NAME(i2c6_eb,       "i2c6-eb",      "ext-26m", 0x0,
> +                               0x1000, BIT(21), 0, 0);
> +
> +
> +static int sc9863a_clk_probe(struct platform_device *pdev)
> +{
> +       const struct sprd_clk_desc *desc;
> +
> +       desc = device_get_match_data(&pdev->dev);
> +       if (!desc)
> +               return -ENODEV;
> +
> +       sprd_clk_regmap_init(pdev, desc);

Can this fail?

> +
> +       return sprd_clk_probe(&pdev->dev, desc->hw_clks);
> +}
> +

      reply	other threads:[~2020-01-05  7:20 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-16 12:19 [PATCH V2 0/6] Add clocks for Unisoc's SC9863A Chunyan Zhang
2019-12-16 12:19 ` [PATCH V2 1/6] clk: sprd: add gate for pll clocks Chunyan Zhang
2019-12-16 12:19 ` [PATCH V2 2/6] dt-bindings: clk: sprd: rename the common file name sprd.txt to SoC specific Chunyan Zhang
2019-12-16 12:19 ` [PATCH V2 3/6] dt-bindings: clk: sprd: add bindings for sc9863a clock controller Chunyan Zhang
2019-12-26 18:56   ` Rob Herring
2019-12-31  3:06     ` Chunyan Zhang
2020-01-02 22:42       ` Rob Herring
2019-12-16 12:19 ` [PATCH V2 4/6] clk: sprd: Add dt-bindings include file for SC9863A Chunyan Zhang
2019-12-26 18:57   ` Rob Herring
2019-12-16 12:19 ` [PATCH V2 5/6] clk: sprd: Add macros for referencing parents without strings Chunyan Zhang
2019-12-16 12:19 ` [PATCH V2 6/6] clk: sprd: add clocks support for SC9863A Chunyan Zhang
2020-01-05  7:20   ` Stephen Boyd [this message]

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=20200105072007.910862085B@mail.kernel.org \
    --to=sboyd@kernel.org \
    --cc=baolin.wang7@gmail.com \
    --cc=chunyan.zhang@unisoc.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mturquette@baylibre.com \
    --cc=orsonzhai@gmail.com \
    --cc=robh+dt@kernel.org \
    --cc=zhang.lyra@gmail.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).