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()
342 if (at91_shdwc) in at91_shdwc_probe()
345 at91_shdwc = devm_kzalloc(&pdev->dev, sizeof(*at91_shdwc), GFP_KERNEL); in at91_shdwc_probe()
346 if (!at91_shdwc) in at91_shdwc_probe()
349 platform_set_drvdata(pdev, at91_shdwc); in at91_shdwc_probe()
351 at91_shdwc->shdwc_base = devm_platform_ioremap_resource(pdev, 0); in at91_shdwc_probe()
352 if (IS_ERR(at91_shdwc->shdwc_base)) in at91_shdwc_probe()
353 return PTR_ERR(at91_shdwc->shdwc_base); in at91_shdwc_probe()
356 at91_shdwc->rcfg = match->data; in at91_shdwc_probe()
358 at91_shdwc->sclk = devm_clk_get(&pdev->dev, NULL); in at91_shdwc_probe()
359 if (IS_ERR(at91_shdwc->sclk)) in at91_shdwc_probe()
360 return PTR_ERR(at91_shdwc->sclk); in at91_shdwc_probe()
362 ret = clk_prepare_enable(at91_shdwc->sclk); in at91_shdwc_probe()
378 at91_shdwc->pmc_base = of_iomap(np, 0); in at91_shdwc_probe()
381 if (!at91_shdwc->pmc_base) { in at91_shdwc_probe()
386 if (at91_shdwc->rcfg->ddrc.type_mask) { in at91_shdwc_probe()
394 at91_shdwc->mpddrc_base = of_iomap(np, 0); in at91_shdwc_probe()
397 if (!at91_shdwc->mpddrc_base) { in at91_shdwc_probe()
402 ddr_type = readl(at91_shdwc->mpddrc_base + in at91_shdwc_probe()
403 at91_shdwc->rcfg->ddrc.type_offset) & in at91_shdwc_probe()
404 at91_shdwc->rcfg->ddrc.type_mask; in at91_shdwc_probe()
407 iounmap(at91_shdwc->mpddrc_base); in at91_shdwc_probe()
408 at91_shdwc->mpddrc_base = NULL; in at91_shdwc_probe()
417 iounmap(at91_shdwc->pmc_base); in at91_shdwc_probe()
419 clk_disable_unprepare(at91_shdwc->sclk); in at91_shdwc_probe()