2020-04-20 19:10:49

by Kamal Dasu

[permalink] [raw]
Subject: [Patch v3 1/9] spi: bcm-qspi: Handle clock probe deferral

From: Florian Fainelli <[email protected]>

The clock provider may not be ready by the time spi-bcm-qspi gets
probed, handle probe deferral using devm_clk_get_optional().

Signed-off-by: Florian Fainelli <[email protected]>
Signed-off-by: Kamal Dasu <[email protected]>
---
drivers/spi/spi-bcm-qspi.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/spi/spi-bcm-qspi.c b/drivers/spi/spi-bcm-qspi.c
index 23d295f36c80..74f4579c3f6a 100644
--- a/drivers/spi/spi-bcm-qspi.c
+++ b/drivers/spi/spi-bcm-qspi.c
@@ -1222,6 +1222,11 @@ int bcm_qspi_probe(struct platform_device *pdev,
}

qspi = spi_master_get_devdata(master);
+
+ qspi->clk = devm_clk_get_optional(&pdev->dev, NULL);
+ if (IS_ERR(qspi->clk))
+ return PTR_ERR(qspi->clk);
+
qspi->pdev = pdev;
qspi->trans_pos.trans = NULL;
qspi->trans_pos.byte = 0;
@@ -1335,13 +1340,6 @@ int bcm_qspi_probe(struct platform_device *pdev,
qspi->soc_intc = NULL;
}

- qspi->clk = devm_clk_get(&pdev->dev, NULL);
- if (IS_ERR(qspi->clk)) {
- dev_warn(dev, "unable to get clock\n");
- ret = PTR_ERR(qspi->clk);
- goto qspi_probe_err;
- }
-
ret = clk_prepare_enable(qspi->clk);
if (ret) {
dev_err(dev, "failed to prepare clock\n");
--
2.17.1


2020-04-21 15:10:02

by Mark Brown

[permalink] [raw]
Subject: Re: [Patch v3 1/9] spi: bcm-qspi: Handle clock probe deferral

On Mon, 20 Apr 2020 15:08:45 -0400, Kamal Dasu wrote:
> From: Florian Fainelli <[email protected]>
>
> The clock provider may not be ready by the time spi-bcm-qspi gets
> probed, handle probe deferral using devm_clk_get_optional().
>
> Signed-off-by: Florian Fainelli <[email protected]>
> Signed-off-by: Kamal Dasu <[email protected]>
>
> [...]

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-5.7

Thanks!

[1/9] spi: bcm-qspi: Handle clock probe deferral
commit: 0392727c261bab65a35cd4f82ee9459bc237591d
[2/9] dt: bindings: spi: Add support for mspi on brcmstb SoCs
(not applied)
[3/9] spi: bcm-qspi: Handle lack of MSPI_REV offset
(not applied)
[4/9] spi: bcm-qspi: Drive MSPI peripheral SSb pin on cs_change
commit: 742d5958062488d03082a9ff01a6afb3cf7bd634
[5/9] spi: bcm-qspi: when tx/rx buffer is NULL set to 0
commit: 4df3bea7f9d2ddd9ac2c29ba945c7c4db2def29c
[6/9] spi: bcm-qspi: Make PM suspend/resume work with SCMI clock management
commit: 1b7ad8c405c3dc0ad6c2dc61fe21fe7a446cceeb
[7/9] spi: bcm-qspi: Use fastbr setting to allow faster MSPI speeds
(not applied)
[8/9] spi: bcm-qspi: add support for MSPI sys clk 108Mhz
(not applied)
[9/9] spi: bcm-qspi: MSPI_SPCR0_MSB MSTR bit exists only on legacy controllers
(not applied)

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

2020-04-21 17:14:04

by Florian Fainelli

[permalink] [raw]
Subject: Re: [Patch v3 1/9] spi: bcm-qspi: Handle clock probe deferral



On 4/21/2020 8:06 AM, Mark Brown wrote:
> On Mon, 20 Apr 2020 15:08:45 -0400, Kamal Dasu wrote:
>> From: Florian Fainelli <[email protected]>
>>
>> The clock provider may not be ready by the time spi-bcm-qspi gets
>> probed, handle probe deferral using devm_clk_get_optional().
>>
>> Signed-off-by: Florian Fainelli <[email protected]>
>> Signed-off-by: Kamal Dasu <[email protected]>
>>
>> [...]
>
> Applied to
>
> https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-5.7

It would be nice if the URL could be clickable, e.g.:

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git/log/?h=for-5.7

>
> Thanks!
>
> [1/9] spi: bcm-qspi: Handle clock probe deferral
> commit: 0392727c261bab65a35cd4f82ee9459bc237591d
> [2/9] dt: bindings: spi: Add support for mspi on brcmstb SoCs
> (not applied)
> [3/9] spi: bcm-qspi: Handle lack of MSPI_REV offset
> (not applied)
> [4/9] spi: bcm-qspi: Drive MSPI peripheral SSb pin on cs_change
> commit: 742d5958062488d03082a9ff01a6afb3cf7bd634
> [5/9] spi: bcm-qspi: when tx/rx buffer is NULL set to 0
> commit: 4df3bea7f9d2ddd9ac2c29ba945c7c4db2def29c
> [6/9] spi: bcm-qspi: Make PM suspend/resume work with SCMI clock management
> commit: 1b7ad8c405c3dc0ad6c2dc61fe21fe7a446cceeb
> [7/9] spi: bcm-qspi: Use fastbr setting to allow faster MSPI speeds
> (not applied)
> [8/9] spi: bcm-qspi: add support for MSPI sys clk 108Mhz
> (not applied)
> [9/9] spi: bcm-qspi: MSPI_SPCR0_MSB MSTR bit exists only on legacy controllers
> (not applied)
>
> All being well this means that it will be integrated into the linux-next
> tree (usually sometime in the next 24 hours) and sent to Linus during
> the next merge window (or sooner if it is a bug fix), however if
> problems are discovered then the patch may be dropped or reverted.
>
> You may get further e-mails resulting from automated or manual testing
> and review of the tree, please engage with people reporting problems and
> send followup patches addressing any issues that are reported if needed.
>
> If any updates are required or you are submitting further changes they
> should be sent as incremental updates against current git, existing
> patches will not be replaced.
>
> Please add any relevant lists and maintainers to the CCs when replying
> to this mail.
>
> Thanks,
> Mark
>

--
Florian

2020-04-21 17:17:41

by Mark Brown

[permalink] [raw]
Subject: Re: [Patch v3 1/9] spi: bcm-qspi: Handle clock probe deferral

On Tue, Apr 21, 2020 at 10:11:52AM -0700, Florian Fainelli wrote:

> > Applied to

> > https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-5.7

> It would be nice if the URL could be clickable, e.g.:

> https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git/log/?h=for-5.7

That then doesn't work with git itself unfortunately, someone's got to
loose out :/


Attachments:
(No filename) (399.00 B)
signature.asc (499.00 B)
Download all attachments

2020-04-21 17:21:36

by Florian Fainelli

[permalink] [raw]
Subject: Re: [Patch v3 1/9] spi: bcm-qspi: Handle clock probe deferral



On 4/21/2020 10:15 AM, Mark Brown wrote:
> On Tue, Apr 21, 2020 at 10:11:52AM -0700, Florian Fainelli wrote:
>
>>> Applied to
>
>>> https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-5.7
>
>> It would be nice if the URL could be clickable, e.g.:
>
>> https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git/log/?h=for-5.7
>
> That then doesn't work with git itself unfortunately, someone's got to
> loose out :/
>

Could you provide both links with a market at the front, e.g.:

Git URL: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git
for-5.7
CGIT URL:
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git/log/?h=for-5.7
--
Florian

2020-04-21 17:21:40

by Mark Brown

[permalink] [raw]
Subject: Re: [Patch v3 1/9] spi: bcm-qspi: Handle clock probe deferral

On Tue, Apr 21, 2020 at 10:17:10AM -0700, Florian Fainelli wrote:

> > That then doesn't work with git itself unfortunately, someone's got to
> > loose out :/

> Could you provide both links with a market at the front, e.g.:

> Git URL: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git
> for-5.7
> CGIT URL: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git/log/?h=for-5.7

Ask Konstantin to implement it (I'm using b4 ty now) and I might!


Attachments:
(No filename) (481.00 B)
signature.asc (499.00 B)
Download all attachments

2020-04-21 18:35:08

by Konstantin Ryabitsev

[permalink] [raw]
Subject: Re: [Patch v3 1/9] spi: bcm-qspi: Handle clock probe deferral

On Tue, Apr 21, 2020 at 06:20:05PM +0100, Mark Brown wrote:
> > Could you provide both links with a market at the front, e.g.:
>
> > Git URL: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git
> > for-5.7
> > CGIT URL: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git/log/?h=for-5.7
>
> Ask Konstantin to implement it (I'm using b4 ty now) and I might!

You can do this already in the template, if your treename is set to the
https URL.

----
Applied to

Git: ${treename} ${branch}
Link: ${treename}/log/?h=${branch}
----

-K

2020-04-21 18:57:17

by Mark Brown

[permalink] [raw]
Subject: Re: [Patch v3 1/9] spi: bcm-qspi: Handle clock probe deferral

On Mon, 20 Apr 2020 15:08:45 -0400, Kamal Dasu wrote:
> From: Florian Fainelli <[email protected]>
>
> The clock provider may not be ready by the time spi-bcm-qspi gets
> probed, handle probe deferral using devm_clk_get_optional().
>
> Signed-off-by: Florian Fainelli <[email protected]>
> Signed-off-by: Kamal Dasu <[email protected]>
>
> [...]

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-5.7

Thanks!

[1/9] spi: bcm-qspi: Handle clock probe deferral
commit: 0392727c261bab65a35cd4f82ee9459bc237591d
[2/9] dt: bindings: spi: Add support for mspi on brcmstb SoCs
(not applied)
[3/9] spi: bcm-qspi: Handle lack of MSPI_REV offset
(not applied)
[4/9] spi: bcm-qspi: Drive MSPI peripheral SSb pin on cs_change
commit: 742d5958062488d03082a9ff01a6afb3cf7bd634
[5/9] spi: bcm-qspi: when tx/rx buffer is NULL set to 0
commit: 4df3bea7f9d2ddd9ac2c29ba945c7c4db2def29c
[6/9] spi: bcm-qspi: Make PM suspend/resume work with SCMI clock management
commit: 1b7ad8c405c3dc0ad6c2dc61fe21fe7a446cceeb
[7/9] spi: bcm-qspi: Use fastbr setting to allow faster MSPI speeds
(not applied)
[8/9] spi: bcm-qspi: add support for MSPI sys clk 108Mhz
(not applied)
[9/9] spi: bcm-qspi: MSPI_SPCR0_MSB MSTR bit exists only on legacy controllers
(not applied)

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark