Skip to contentSkip to conversation

Couple of reset-brcmstb fixes

PATCH In review Florian Fainelli 2 participants 6 messages Nov 4, 2019 – Dec 11, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover Couple of reset-brcmstb fixes

Hi Philipp,

This series replaces the previously submitted fixes to the reset-brcmstb driver and also fix the dt binding example.

Thank you!

Florian Fainelli (2):
dt-bindings: reset: Fix brcmstb-reset example
reset: brcmstb: Remove resource checks

 .../devicetree/bindings/reset/brcm,brcmstb-reset.txt        | 2 +-
 drivers/reset/reset-brcmstb.c                               | 6 ------
 2 files changed, 1 insertion(+), 7 deletions(-)
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/2 dt-bindings: reset: Fix brcmstb-reset example

The reset controller has a #reset-cells value of 1, so we should see a phandle plus a register identifier, fix the example.

Fixes 0807caf647dd ("dt-bindings: reset: Add document for Broadcom STB reset controller")
---
 Documentation/devicetree/bindings/reset/brcm,brcmstb-reset.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/reset/brcm,brcmstb-reset.txt +1 -1
index 6e5341b4f891..ee59409640f2 100644
@@ -22,6 +22,6 @@ Example:
 	};
 
 	&ethernet_switch {
-		resets = <&reset>;
+		resets = <&reset 26>;
 		reset-names = "switch";
 	};
Signature · 1 line
2.17.1
#2 lore raw

PATCH 2/2 reset: brcmstb: Remove resource checks

In reply to Florian Fainelli

The use of IS_ALIGNED() is incorrect, the typical resource we pass looks like this: start: 0x8404318, size: 0x30. When using IS_ALIGNED() we will get the following 0x8404318 & (0x18 - 1) = 0x10 which is definitively not equal to 0, same goes with the size. These two checks would make the driver fail probing.

Remove the resource checks, since there should be no constraint on the base addresse or size.

Fixes 77750bc089e4 ("reset: Add Broadcom STB SW_INIT reset controller driver")
---
 drivers/reset/reset-brcmstb.c | 6 ------
 1 file changed, 6 deletions(-)
drivers/reset/reset-brcmstb.c +0 -6
index a608f445dad6..f213264c8567 100644
@@ -91,12 +91,6 @@ static int brcmstb_reset_probe(struct platform_device *pdev)
 		return -ENOMEM;
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!IS_ALIGNED(res->start, SW_INIT_BANK_SIZE) ||
-	    !IS_ALIGNED(resource_size(res), SW_INIT_BANK_SIZE)) {
-		dev_err(kdev, "incorrect register range\n");
-		return -EINVAL;
-	}
-
 	priv->base = devm_ioremap_resource(kdev, res);
 	if (IS_ERR(priv->base))
 		return PTR_ERR(priv->base);
Signature · 1 line
2.17.1
#4 lore raw
Quoted 11 lines · Philipp Zabel

Hi Florian,

Quoted 6 lines · Florian Fainelli

Hi Philipp,

This series replaces the previously submitted fixes to the reset-brcmstb driver and also fix the dt binding example.

Thank you!

Thank you. Both applied to reset/fixes.

Philipp, when do you expect these patches to hit Linus' tree? Thanks!

Signature · 1 line
Florian
maintainer
#5 lore raw

Hi Florian,

Quoted 6 lines · Florian Fainelli
Quoted 5 lines · Philipp Zabel

Hi Florian,

Quoted 2 lines · Florian Fainelli

Hi Philipp,

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

This series replaces the previously submitted fixes to the reset-brcmstb driver and also fix the dt binding example.

Thank you!

Thank you. Both applied to reset/fixes.

Philipp, when do you expect these patches to hit Linus' tree? Thanks!

I have just sent out a pull request for v5.5, I hope we can get them into -rc2.

regards
Philipp