• Home
  • Raw
  • Download

Lines Matching refs:prm

38 	struct omap_prm *prm;  member
72 struct omap_prm *prm; member
239 readl_relaxed(prmd->prm->base + prmd->pwrstctrl), in omap_prm_domain_show_state()
240 readl_relaxed(prmd->prm->base + prmd->pwrstst)); in omap_prm_domain_show_state()
264 v = readl_relaxed(prmd->prm->base + prmd->pwrstctrl); in omap_prm_domain_power_on()
267 prmd->prm->base + prmd->pwrstctrl); in omap_prm_domain_power_on()
270 ret = readl_relaxed_poll_timeout(prmd->prm->base + prmd->pwrstst, in omap_prm_domain_power_on()
300 v = readl_relaxed(prmd->prm->base + prmd->pwrstctrl); in omap_prm_domain_power_off()
313 writel_relaxed(v, prmd->prm->base + prmd->pwrstctrl); in omap_prm_domain_power_off()
316 ret = readl_relaxed_poll_timeout(prmd->prm->base + prmd->pwrstst, in omap_prm_domain_power_off()
364 static int omap_prm_domain_init(struct device *dev, struct omap_prm *prm) in omap_prm_domain_init() argument
381 data = prm->data; in omap_prm_domain_init()
386 prmd->prm = prm; in omap_prm_domain_init()
387 prmd->cap = prmd->prm->data->dmap; in omap_prm_domain_init()
388 prmd->pwrstctrl = prmd->prm->data->pwrstctrl; in omap_prm_domain_init()
389 prmd->pwrstst = prmd->prm->data->pwrstst; in omap_prm_domain_init()
402 prm->prmd = prmd; in omap_prm_domain_init()
418 const struct omap_rst_map *map = reset->prm->data->rstmap; in omap_reset_get_st_bit()
436 bool has_rstst = reset->prm->data->rstst || in omap_reset_status()
437 (reset->prm->data->flags & OMAP_PRM_HAS_RSTST); in omap_reset_status()
444 v = readl_relaxed(reset->prm->base + reset->prm->data->rstctrl); in omap_reset_status()
452 v = readl_relaxed(reset->prm->base + reset->prm->data->rstst); in omap_reset_status()
468 v = readl_relaxed(reset->prm->base + reset->prm->data->rstctrl); in omap_reset_assert()
470 writel_relaxed(v, reset->prm->base + reset->prm->data->rstctrl); in omap_reset_assert()
491 has_rstst = reset->prm->data->rstst || in omap_reset_deassert()
492 (reset->prm->data->flags & OMAP_PRM_HAS_RSTST); in omap_reset_deassert()
499 writel_relaxed(v, reset->prm->base + reset->prm->data->rstst); in omap_reset_deassert()
507 v = readl_relaxed(reset->prm->base + reset->prm->data->rstctrl); in omap_reset_deassert()
509 writel_relaxed(v, reset->prm->base + reset->prm->data->rstctrl); in omap_reset_deassert()
513 ret = readl_relaxed_poll_timeout_atomic(reset->prm->base + in omap_reset_deassert()
514 reset->prm->data->rstctrl, in omap_reset_deassert()
519 reset->prm->data->name, id); in omap_reset_deassert()
523 ret = readl_relaxed_poll_timeout_atomic(reset->prm->base + in omap_reset_deassert()
524 reset->prm->data->rstst, in omap_reset_deassert()
529 reset->prm->data->name, id); in omap_reset_deassert()
556 struct omap_prm *prm) in omap_prm_reset_init() argument
569 if (!prm->data->rstctrl && !(prm->data->flags & OMAP_PRM_HAS_RSTCTRL)) in omap_prm_reset_init()
577 map = prm->data->rstmap; in omap_prm_reset_init()
594 reset->prm = prm; in omap_prm_reset_init()
596 sprintf(buf, "%s_clkdm", prm->data->clkdm_name ? prm->data->clkdm_name : in omap_prm_reset_init()
597 prm->data->name); in omap_prm_reset_init()
599 if (!(prm->data->flags & OMAP_PRM_HAS_NO_CLKDM)) { in omap_prm_reset_init()
611 if (prm->data->rstmap == rst_map_012) { in omap_prm_reset_init()
612 v = readl_relaxed(reset->prm->base + reset->prm->data->rstctrl); in omap_prm_reset_init()
615 writel_relaxed(reset->mask, reset->prm->base + in omap_prm_reset_init()
616 reset->prm->data->rstctrl); in omap_prm_reset_init()
627 struct omap_prm *prm; in omap_prm_probe() local
639 prm = devm_kzalloc(&pdev->dev, sizeof(*prm), GFP_KERNEL); in omap_prm_probe()
640 if (!prm) in omap_prm_probe()
651 prm->data = data; in omap_prm_probe()
653 prm->base = devm_ioremap_resource(&pdev->dev, res); in omap_prm_probe()
654 if (IS_ERR(prm->base)) in omap_prm_probe()
655 return PTR_ERR(prm->base); in omap_prm_probe()
657 ret = omap_prm_domain_init(&pdev->dev, prm); in omap_prm_probe()
661 ret = omap_prm_reset_init(pdev, prm); in omap_prm_probe()
669 pm_genpd_remove(&prm->prmd->pd); in omap_prm_probe()