Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'net-mscc-miim-switch-reset'

Herve Codina says:

====================
Handle switch reset in mscc-miim

These two patches were previously sent as part of a bigger series:
https://lore.kernel.org/lkml/20240527161450.326615-1-herve.codina@bootlin.com/

v1 and v2 iterations were handled during the v1 and v2 reviews of this
bigger series. As theses two patches are now ready to be applied, they
were extracted from the bigger series and sent alone in this current
series.

This current v3 series takes into account feedback received during the
bigger series v2 review.

Changes v2 -> v3
- patch 1
Drop one useless sentence.
Add 'Reviewed-by: Andrew Lunn <andrew@lunn.ch>'
Add 'Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>'

- patch 2
Add 'Reviewed-by: Andrew Lunn <andrew@lunn.ch>'

Changes v1 -> v2 (as part of the bigger series iterations)
- Patch 1
Improve the reset property description

- Patch 2
Fix a wrong reverse x-mass tree declaration
====================

Signed-off-by: David S. Miller <davem@davemloft.net>

+18
+10
Documentation/devicetree/bindings/net/mscc,miim.yaml
··· 38 38 39 39 clock-frequency: true 40 40 41 + resets: 42 + items: 43 + - description: 44 + Reset shared with all blocks attached to the Switch Core Register 45 + Bus (CSR) including VRAP slave. 46 + 47 + reset-names: 48 + items: 49 + - const: switch 50 + 41 51 required: 42 52 - compatible 43 53 - reg
+8
drivers/net/mdio/mdio-mscc-miim.c
··· 19 19 #include <linux/platform_device.h> 20 20 #include <linux/property.h> 21 21 #include <linux/regmap.h> 22 + #include <linux/reset.h> 22 23 23 24 #define MSCC_MIIM_REG_STATUS 0x0 24 25 #define MSCC_MIIM_STATUS_STAT_PENDING BIT(2) ··· 272 271 struct device_node *np = pdev->dev.of_node; 273 272 struct regmap *mii_regmap, *phy_regmap; 274 273 struct device *dev = &pdev->dev; 274 + struct reset_control *reset; 275 275 struct mscc_miim_dev *miim; 276 276 struct mii_bus *bus; 277 277 int ret; 278 + 279 + reset = devm_reset_control_get_optional_shared(dev, "switch"); 280 + if (IS_ERR(reset)) 281 + return dev_err_probe(dev, PTR_ERR(reset), "Failed to get reset\n"); 282 + 283 + reset_control_reset(reset); 278 284 279 285 mii_regmap = ocelot_regmap_from_resource(pdev, 0, 280 286 &mscc_miim_regmap_config);