Lines Matching refs:pdev
65 static int mchp_sparx5_map_syscon(struct platform_device *pdev, char *name,
72 syscon_np = of_parse_phandle(pdev->dev.of_node, name, 0);
79 dev_err(&pdev->dev, "No '%s' map: %d\n", name, err);
86 static int mchp_sparx5_map_io(struct platform_device *pdev, int index,
93 mem = devm_platform_get_and_ioremap_resource(pdev, index, &res);
95 dev_err(&pdev->dev, "Could not map resource %d\n", index);
99 map = devm_regmap_init_mmio(&pdev->dev, mem, &sparx5_reset_regmap_config);
106 static int mchp_sparx5_reset_probe(struct platform_device *pdev)
108 struct device_node *dn = pdev->dev.of_node;
112 ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL);
116 err = mchp_sparx5_map_syscon(pdev, "cpu-syscon", &ctx->cpu_ctrl);
119 err = mchp_sparx5_map_io(pdev, 0, &ctx->gcb_ctrl);
127 ctx->props = device_get_match_data(&pdev->dev);
134 return devm_reset_controller_register(&pdev->dev, &ctx->rcdev);