Browse Source

drivers/fsi: Add slave definition

Add the initial fsi slave device, which is private to the core code.
This will be a child of the master, and parent to endpoint devices.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Chris Bostic <cbostic@linux.vnet.ibm.com>
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jeremy Kerr 8 years ago
parent
commit
faf0b116de
1 changed files with 10 additions and 0 deletions
  1. 10 0
      drivers/fsi/fsi-core.c

+ 10 - 0
drivers/fsi/fsi-core.c

@@ -22,6 +22,16 @@
 
 
 static DEFINE_IDA(master_ida);
 static DEFINE_IDA(master_ida);
 
 
+struct fsi_slave {
+	struct device		dev;
+	struct fsi_master	*master;
+	int			id;
+	int			link;
+	uint32_t		size;	/* size of slave address space */
+};
+
+#define to_fsi_slave(d) container_of(d, struct fsi_slave, dev)
+
 /* FSI master support */
 /* FSI master support */
 int fsi_master_register(struct fsi_master *master)
 int fsi_master_register(struct fsi_master *master)
 {
 {