Lines Matching refs:hbdev

22 	struct hyperbus_device *hbdev = map_to_hbdev(map);  in hyperbus_read16()  local
23 struct hyperbus_ctlr *ctlr = hbdev->ctlr; in hyperbus_read16()
26 read_data.x[0] = ctlr->ops->read16(hbdev, addr); in hyperbus_read16()
34 struct hyperbus_device *hbdev = map_to_hbdev(map); in hyperbus_write16() local
35 struct hyperbus_ctlr *ctlr = hbdev->ctlr; in hyperbus_write16()
37 ctlr->ops->write16(hbdev, addr, d.x[0]); in hyperbus_write16()
43 struct hyperbus_device *hbdev = map_to_hbdev(map); in hyperbus_copy_from() local
44 struct hyperbus_ctlr *ctlr = hbdev->ctlr; in hyperbus_copy_from()
46 ctlr->ops->copy_from(hbdev, to, from, len); in hyperbus_copy_from()
52 struct hyperbus_device *hbdev = map_to_hbdev(map); in hyperbus_copy_to() local
53 struct hyperbus_ctlr *ctlr = hbdev->ctlr; in hyperbus_copy_to()
55 ctlr->ops->copy_to(hbdev, to, from, len); in hyperbus_copy_to()
58 int hyperbus_register_device(struct hyperbus_device *hbdev) in hyperbus_register_device() argument
67 if (!hbdev || !hbdev->np || !hbdev->ctlr || !hbdev->ctlr->dev) { in hyperbus_register_device()
72 np = hbdev->np; in hyperbus_register_device()
73 ctlr = hbdev->ctlr; in hyperbus_register_device()
79 hbdev->memtype = HYPERFLASH; in hyperbus_register_device()
82 map = &hbdev->map; in hyperbus_register_device()
100 ret = ops->calibrate(hbdev); in hyperbus_register_device()
109 hbdev->mtd = do_map_probe("cfi_probe", map); in hyperbus_register_device()
110 if (!hbdev->mtd) { in hyperbus_register_device()
115 hbdev->mtd->dev.parent = dev; in hyperbus_register_device()
116 mtd_set_of_node(hbdev->mtd, np); in hyperbus_register_device()
118 ret = mtd_device_register(hbdev->mtd, NULL, 0); in hyperbus_register_device()
121 map_destroy(hbdev->mtd); in hyperbus_register_device()
129 void hyperbus_unregister_device(struct hyperbus_device *hbdev) in hyperbus_unregister_device() argument
131 if (hbdev && hbdev->mtd) { in hyperbus_unregister_device()
132 WARN_ON(mtd_device_unregister(hbdev->mtd)); in hyperbus_unregister_device()
133 map_destroy(hbdev->mtd); in hyperbus_unregister_device()