Lines Matching refs:aemif

175 	struct aemif_device *aemif = platform_get_drvdata(pdev);  in aemif_config_abus()  local
176 struct aemif_cs_data *data = &aemif->cs_data[csnum]; in aemif_config_abus()
178 unsigned long clk_rate = aemif->clk_rate; in aemif_config_abus()
182 offset = A1CR_OFFSET + (data->cs - aemif->cs_offset) * 4; in aemif_config_abus()
208 val = readl(aemif->base + offset); in aemif_config_abus()
211 writel(val, aemif->base + offset); in aemif_config_abus()
232 struct aemif_device *aemif = platform_get_drvdata(pdev); in aemif_get_hw_params() local
233 struct aemif_cs_data *data = &aemif->cs_data[csnum]; in aemif_get_hw_params()
234 unsigned long clk_rate = aemif->clk_rate; in aemif_get_hw_params()
237 offset = A1CR_OFFSET + (data->cs - aemif->cs_offset) * 4; in aemif_get_hw_params()
238 val = readl(aemif->base + offset); in aemif_get_hw_params()
263 struct aemif_device *aemif = platform_get_drvdata(pdev); in of_aemif_parse_abus_config() local
273 if (cs - aemif->cs_offset >= NUM_CS || cs < aemif->cs_offset) { in of_aemif_parse_abus_config()
278 if (aemif->num_cs >= NUM_CS) { in of_aemif_parse_abus_config()
283 data = &aemif->cs_data[aemif->num_cs]; in of_aemif_parse_abus_config()
287 aemif_get_hw_params(pdev, aemif->num_cs++); in of_aemif_parse_abus_config()
332 struct aemif_device *aemif; in aemif_probe() local
334 aemif = devm_kzalloc(dev, sizeof(*aemif), GFP_KERNEL); in aemif_probe()
335 if (!aemif) in aemif_probe()
338 platform_set_drvdata(pdev, aemif); in aemif_probe()
340 aemif->clk = devm_clk_get_enabled(dev, NULL); in aemif_probe()
341 if (IS_ERR(aemif->clk)) in aemif_probe()
342 return dev_err_probe(dev, PTR_ERR(aemif->clk), in aemif_probe()
345 aemif->clk_rate = clk_get_rate(aemif->clk) / MSEC_PER_SEC; in aemif_probe()
348 aemif->cs_offset = 2; in aemif_probe()
350 aemif->base = devm_platform_ioremap_resource(pdev, 0); in aemif_probe()
351 if (IS_ERR(aemif->base)) in aemif_probe()
352 return PTR_ERR(aemif->base); in aemif_probe()
368 for (i = 0; i < aemif->num_cs; i++) { in aemif_probe()
372 aemif->cs_data[i].cs); in aemif_probe()