Lines Matching refs:hbdev
23 struct hyperbus_device *hbdev = map_to_hbdev(map); in hyperbus_read16() local
24 struct hyperbus_ctlr *ctlr = hbdev->ctlr; in hyperbus_read16()
27 read_data.x[0] = ctlr->ops->read16(hbdev, addr); in hyperbus_read16()
35 struct hyperbus_device *hbdev = map_to_hbdev(map); in hyperbus_write16() local
36 struct hyperbus_ctlr *ctlr = hbdev->ctlr; in hyperbus_write16()
38 ctlr->ops->write16(hbdev, addr, d.x[0]); in hyperbus_write16()
44 struct hyperbus_device *hbdev = map_to_hbdev(map); in hyperbus_copy_from() local
45 struct hyperbus_ctlr *ctlr = hbdev->ctlr; in hyperbus_copy_from()
47 ctlr->ops->copy_from(hbdev, to, from, len); in hyperbus_copy_from()
53 struct hyperbus_device *hbdev = map_to_hbdev(map); in hyperbus_copy_to() local
54 struct hyperbus_ctlr *ctlr = hbdev->ctlr; in hyperbus_copy_to()
56 ctlr->ops->copy_to(hbdev, to, from, len); in hyperbus_copy_to()
59 int hyperbus_register_device(struct hyperbus_device *hbdev) in hyperbus_register_device() argument
69 if (!hbdev || !hbdev->np || !hbdev->ctlr || !hbdev->ctlr->dev) { in hyperbus_register_device()
74 np = hbdev->np; in hyperbus_register_device()
75 ctlr = hbdev->ctlr; in hyperbus_register_device()
79 hbdev->memtype = HYPERFLASH; in hyperbus_register_device()
86 map = &hbdev->map; in hyperbus_register_device()
109 ret = ops->calibrate(hbdev); in hyperbus_register_device()
118 hbdev->mtd = do_map_probe("cfi_probe", map); in hyperbus_register_device()
119 if (!hbdev->mtd) { in hyperbus_register_device()
124 hbdev->mtd->dev.parent = dev; in hyperbus_register_device()
125 mtd_set_of_node(hbdev->mtd, np); in hyperbus_register_device()
127 ret = mtd_device_register(hbdev->mtd, NULL, 0); in hyperbus_register_device()
130 map_destroy(hbdev->mtd); in hyperbus_register_device()
138 int hyperbus_unregister_device(struct hyperbus_device *hbdev) in hyperbus_unregister_device() argument
142 if (hbdev && hbdev->mtd) { in hyperbus_unregister_device()
143 ret = mtd_device_unregister(hbdev->mtd); in hyperbus_unregister_device()
144 map_destroy(hbdev->mtd); in hyperbus_unregister_device()