Lines Matching defs:adev

56 static int pl172_timing_prop(struct amba_device *adev,
60 struct pl172_data *pl172 = amba_get_drvdata(adev);
69 dev_err(&adev->dev, "%s timing too tight\n", name);
76 dev_dbg(&adev->dev, "%s: %u cycle(s)\n", name, start +
82 static int pl172_setup_static(struct amba_device *adev,
85 struct pl172_data *pl172 = amba_get_drvdata(adev);
98 dev_err(&adev->dev, "invalid memory width cs%u\n", cs);
102 dev_err(&adev->dev, "memory-width property required\n");
118 if (amba_part(adev) == 0x172 &&
126 dev_dbg(&adev->dev, "mpmc static config cs%u: 0x%08x\n", cs, cfg);
129 ret = pl172_timing_prop(adev, np, "mpmc,write-enable-delay",
135 ret = pl172_timing_prop(adev, np, "mpmc,output-enable-delay",
141 ret = pl172_timing_prop(adev, np, "mpmc,read-access-delay",
147 ret = pl172_timing_prop(adev, np, "mpmc,page-mode-read-delay",
153 ret = pl172_timing_prop(adev, np, "mpmc,write-access-delay",
159 ret = pl172_timing_prop(adev, np, "mpmc,turn-round-delay",
167 dev_err(&adev->dev, "failed to configure cs%u\n", cs);
171 static int pl172_parse_cs_config(struct amba_device *adev,
178 dev_err(&adev->dev, "cs%u invalid\n", cs);
182 return pl172_setup_static(adev, np, cs);
185 dev_err(&adev->dev, "cs property required\n");
194 static int pl172_probe(struct amba_device *adev, const struct amba_id *id)
196 struct device_node *child_np, *np = adev->dev.of_node;
197 struct device *dev = &adev->dev;
202 if (amba_part(adev) == 0x172) {
203 if (amba_rev(adev) < ARRAY_SIZE(pl172_revisions))
204 rev = pl172_revisions[amba_rev(adev)];
205 } else if (amba_part(adev) == 0x175) {
206 if (amba_rev(adev) < ARRAY_SIZE(pl175_revisions))
207 rev = pl175_revisions[amba_rev(adev)];
208 } else if (amba_part(adev) == 0x176) {
209 if (amba_rev(adev) < ARRAY_SIZE(pl176_revisions))
210 rev = pl176_revisions[amba_rev(adev)];
213 dev_info(dev, "ARM PL%x revision %s\n", amba_part(adev), rev);
238 ret = amba_request_regions(adev, NULL);
244 pl172->base = devm_ioremap(dev, adev->res.start,
245 resource_size(&adev->res));
252 amba_set_drvdata(adev, pl172);
260 ret = pl172_parse_cs_config(adev, child_np);
270 amba_release_regions(adev);
276 static void pl172_remove(struct amba_device *adev)
278 struct pl172_data *pl172 = amba_get_drvdata(adev);
281 amba_release_regions(adev);