Lines Matching refs:at91_shdwc
104 static struct shdwc *at91_shdwc; variable
163 : "r" (at91_shdwc->mpddrc_base), in at91_poweroff()
165 "r" (at91_shdwc->shdwc_base), in at91_poweroff()
167 "r" (at91_shdwc->pmc_base), in at91_poweroff()
168 "r" (at91_shdwc->rcfg->pmc.mckr) in at91_poweroff()
343 if (at91_shdwc) in at91_shdwc_probe()
346 at91_shdwc = devm_kzalloc(&pdev->dev, sizeof(*at91_shdwc), GFP_KERNEL); in at91_shdwc_probe()
347 if (!at91_shdwc) in at91_shdwc_probe()
350 platform_set_drvdata(pdev, at91_shdwc); in at91_shdwc_probe()
353 at91_shdwc->shdwc_base = devm_ioremap_resource(&pdev->dev, res); in at91_shdwc_probe()
354 if (IS_ERR(at91_shdwc->shdwc_base)) in at91_shdwc_probe()
355 return PTR_ERR(at91_shdwc->shdwc_base); in at91_shdwc_probe()
358 at91_shdwc->rcfg = match->data; in at91_shdwc_probe()
360 at91_shdwc->sclk = devm_clk_get(&pdev->dev, NULL); in at91_shdwc_probe()
361 if (IS_ERR(at91_shdwc->sclk)) in at91_shdwc_probe()
362 return PTR_ERR(at91_shdwc->sclk); in at91_shdwc_probe()
364 ret = clk_prepare_enable(at91_shdwc->sclk); in at91_shdwc_probe()
380 at91_shdwc->pmc_base = of_iomap(np, 0); in at91_shdwc_probe()
383 if (!at91_shdwc->pmc_base) { in at91_shdwc_probe()
388 if (at91_shdwc->rcfg->ddrc.type_mask) { in at91_shdwc_probe()
396 at91_shdwc->mpddrc_base = of_iomap(np, 0); in at91_shdwc_probe()
399 if (!at91_shdwc->mpddrc_base) { in at91_shdwc_probe()
404 ddr_type = readl(at91_shdwc->mpddrc_base + in at91_shdwc_probe()
405 at91_shdwc->rcfg->ddrc.type_offset) & in at91_shdwc_probe()
406 at91_shdwc->rcfg->ddrc.type_mask; in at91_shdwc_probe()
409 iounmap(at91_shdwc->mpddrc_base); in at91_shdwc_probe()
410 at91_shdwc->mpddrc_base = NULL; in at91_shdwc_probe()
419 iounmap(at91_shdwc->pmc_base); in at91_shdwc_probe()
421 clk_disable_unprepare(at91_shdwc->sclk); in at91_shdwc_probe()