Lines Matching refs:region
88 static int of_fpga_region_get_bridges(struct fpga_region *region) in of_fpga_region_get_bridges() argument
90 struct device *dev = ®ion->dev; in of_fpga_region_get_bridges()
92 struct fpga_image_info *info = region->info; in of_fpga_region_get_bridges()
98 ®ion->bridge_list); in of_fpga_region_get_bridges()
130 ®ion->bridge_list); in of_fpga_region_get_bridges()
135 fpga_bridges_put(®ion->bridge_list); in of_fpga_region_get_bridges()
195 of_fpga_region_parse_ov(struct fpga_region *region, in of_fpga_region_parse_ov() argument
198 struct device *dev = ®ion->dev; in of_fpga_region_parse_ov()
203 if (region->info) { in of_fpga_region_parse_ov()
286 static int of_fpga_region_notify_pre_apply(struct fpga_region *region, in of_fpga_region_notify_pre_apply() argument
289 struct device *dev = ®ion->dev; in of_fpga_region_notify_pre_apply()
293 info = of_fpga_region_parse_ov(region, nd->overlay); in of_fpga_region_notify_pre_apply()
301 if (region->info) { in of_fpga_region_notify_pre_apply()
306 region->info = info; in of_fpga_region_notify_pre_apply()
307 ret = fpga_region_program_fpga(region); in of_fpga_region_notify_pre_apply()
311 region->info = NULL; in of_fpga_region_notify_pre_apply()
326 static void of_fpga_region_notify_post_remove(struct fpga_region *region, in of_fpga_region_notify_post_remove() argument
329 fpga_bridges_disable(®ion->bridge_list); in of_fpga_region_notify_post_remove()
330 fpga_bridges_put(®ion->bridge_list); in of_fpga_region_notify_post_remove()
331 fpga_image_info_free(region->info); in of_fpga_region_notify_post_remove()
332 region->info = NULL; in of_fpga_region_notify_post_remove()
350 struct fpga_region *region; in of_fpga_region_notify() local
370 region = of_fpga_region_find(nd->target); in of_fpga_region_notify()
371 if (!region) in of_fpga_region_notify()
377 ret = of_fpga_region_notify_pre_apply(region, nd); in of_fpga_region_notify()
381 of_fpga_region_notify_post_remove(region, nd); in of_fpga_region_notify()
385 put_device(®ion->dev); in of_fpga_region_notify()
401 struct fpga_region *region; in of_fpga_region_probe() local
410 region = fpga_region_register(dev, mgr, of_fpga_region_get_bridges); in of_fpga_region_probe()
411 if (IS_ERR(region)) { in of_fpga_region_probe()
412 ret = PTR_ERR(region); in of_fpga_region_probe()
416 of_platform_populate(np, fpga_region_of_match, NULL, ®ion->dev); in of_fpga_region_probe()
417 platform_set_drvdata(pdev, region); in of_fpga_region_probe()
430 struct fpga_region *region = platform_get_drvdata(pdev); in of_fpga_region_remove() local
431 struct fpga_manager *mgr = region->mgr; in of_fpga_region_remove()
433 fpga_region_unregister(region); in of_fpga_region_remove()