Lines Matching full:sdc
36 static void aspeed_sdc_configure_8bit_mode(struct aspeed_sdc *sdc, in aspeed_sdc_configure_8bit_mode() argument
43 spin_lock(&sdc->lock); in aspeed_sdc_configure_8bit_mode()
44 info = readl(sdc->regs + ASPEED_SDC_INFO); in aspeed_sdc_configure_8bit_mode()
49 writel(info, sdc->regs + ASPEED_SDC_INFO); in aspeed_sdc_configure_8bit_mode()
50 spin_unlock(&sdc->lock); in aspeed_sdc_configure_8bit_mode()
254 struct aspeed_sdc *sdc; in aspeed_sdc_probe() local
257 sdc = devm_kzalloc(&pdev->dev, sizeof(*sdc), GFP_KERNEL); in aspeed_sdc_probe()
258 if (!sdc) in aspeed_sdc_probe()
261 spin_lock_init(&sdc->lock); in aspeed_sdc_probe()
263 sdc->clk = devm_clk_get(&pdev->dev, NULL); in aspeed_sdc_probe()
264 if (IS_ERR(sdc->clk)) in aspeed_sdc_probe()
265 return PTR_ERR(sdc->clk); in aspeed_sdc_probe()
267 ret = clk_prepare_enable(sdc->clk); in aspeed_sdc_probe()
273 sdc->res = platform_get_resource(pdev, IORESOURCE_MEM, 0); in aspeed_sdc_probe()
274 sdc->regs = devm_ioremap_resource(&pdev->dev, sdc->res); in aspeed_sdc_probe()
275 if (IS_ERR(sdc->regs)) { in aspeed_sdc_probe()
276 ret = PTR_ERR(sdc->regs); in aspeed_sdc_probe()
280 dev_set_drvdata(&pdev->dev, sdc); in aspeed_sdc_probe()
297 clk_disable_unprepare(sdc->clk); in aspeed_sdc_probe()
303 struct aspeed_sdc *sdc = dev_get_drvdata(&pdev->dev); in aspeed_sdc_remove() local
305 clk_disable_unprepare(sdc->clk); in aspeed_sdc_remove()