Lines Matching full:hub
3 * FSI hub master driver
21 * FSI hub master support
23 * A hub master increases the number of potential target devices that the
25 * each of those links can in turn be chained to a hub master with multiple
28 * The hub is controlled by a set of control registers exposed as a regular fsi
29 * device (the hub->upstream device), and provides access to the downstream FSI
48 struct fsi_master_hub *hub = to_fsi_master_hub(master);
53 addr += hub->addr + (link * FSI_HUB_LINK_SIZE);
54 return fsi_slave_read(hub->upstream->slave, addr, val, size);
60 struct fsi_master_hub *hub = to_fsi_master_hub(master);
65 addr += hub->addr + (link * FSI_HUB_LINK_SIZE);
66 return fsi_slave_write(hub->upstream->slave, addr, val, size);
83 struct fsi_master_hub *hub = to_fsi_master_hub(master);
94 return fsi_device_write(hub->upstream, FSI_MCENP0 + (4 * idx),
97 rc = fsi_device_write(hub->upstream, FSI_MSENP0 + (4 * idx), ®, 4);
108 struct fsi_master_hub *hub = to_fsi_master_hub(to_fsi_master(dev));
110 kfree(hub);
124 static int hub_master_init(struct fsi_master_hub *hub)
126 struct fsi_device *dev = hub->upstream;
136 /* Initialize the MFSI (hub master) engine */
198 struct fsi_master_hub *hub;
209 dev_dbg(dev, "hub version %08x (%d links)\n", reg, links);
218 hub = kzalloc(sizeof(*hub), GFP_KERNEL);
219 if (!hub) {
224 hub->addr = FSI_HUB_LINK_OFFSET;
225 hub->size = FSI_HUB_LINK_SIZE * links;
226 hub->upstream = fsi_dev;
228 hub->master.dev.parent = dev;
229 hub->master.dev.release = hub_master_release;
230 hub->master.dev.of_node = of_node_get(dev_of_node(dev));
232 hub->master.n_links = links;
233 hub->master.read = hub_master_read;
234 hub->master.write = hub_master_write;
235 hub->master.send_break = hub_master_break;
236 hub->master.link_enable = hub_master_link_enable;
238 dev_set_drvdata(dev, hub);
240 hub_master_init(hub);
242 rc = fsi_master_register(&hub->master);
253 get_device(&hub->master.dev);
264 struct fsi_master_hub *hub = dev_get_drvdata(dev);
266 fsi_master_unregister(&hub->master);
267 fsi_slave_release_range(hub->upstream->slave, hub->addr, hub->size);
268 of_node_put(hub->master.dev.of_node);
272 * the hub
274 put_device(&hub->master.dev);
290 .name = "fsi-master-hub",
298 MODULE_DESCRIPTION("FSI hub master driver");