[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6308d149-a16b-e737-355c-3edeb7a51e93@gmail.com>
Date: Tue, 31 Jul 2018 10:57:30 -0700
From: Florian Fainelli <f.fainelli@...il.com>
To: Arun Parameswaran <arun.parameswaran@...adcom.com>,
"David S. Miller" <davem@...emloft.net>,
Andrew Lunn <andrew@...n.ch>, Rob Herring <robh+dt@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Ray Jui <rjui@...adcom.com>,
Scott Branden <sbranden@...adcom.com>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will.deacon@....com>
Cc: netdev@...r.kernel.org, devicetree@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
bcm-kernel-feedback-list@...adcom.com
Subject: Re: [PATCH v2 6/7] net: phy: Add support to configure clock in
Broadcom iProc mdio mux
On 07/27/2018 02:23 PM, Arun Parameswaran wrote:
> Add support to configure the internal rate adjust register based on the
> core clock supplied through device tree in the Broadcom iProc mdio mux.
>
> The operating frequency of the mdio mux block is 11MHz. This is derrived
> by dividing the clock to the mdio mux with the rate adjust register.
>
> In some SoC's the default values of the rate adjust register do not yield
> 11MHz. These SoC's are required to specify the clock via the device tree
> for proper operation.
>
> Signed-off-by: Arun Parameswaran <arun.parameswaran@...adcom.com>
> ---
[snip]
> static int iproc_mdio_wait_for_idle(void __iomem *base, bool result)
> @@ -198,10 +219,22 @@ static int mdio_mux_iproc_probe(struct platform_device *pdev)
> return PTR_ERR(md->base);
> }
>
> + md->core_clk = devm_clk_get(&pdev->dev, NULL);
> + if (IS_ERR(md->core_clk)) {
> + md->core_clk = NULL;
You need to specifically check for -EPROBE_DEFER here and propagate that
to the caller, other errors could be ignored like you do it here, same
comment as in patch 7, if you make md->core_clk NULL, then you can drop
testing for that pointer being valid.
--
Florian
Powered by blists - more mailing lists