summaryrefslogtreecommitdiff
path: root/drivers/fsi/fsi-core.c
diff options
context:
space:
mode:
authorEddie James <eajames@linux.ibm.com>2023-06-12 22:56:44 +0300
committerJoel Stanley <joel@jms.id.au>2023-08-09 09:11:59 +0300
commitd5d8dfb01e1041836cef4d2d69b1c1c991c850fb (patch)
tree8c666d6f499e6cd2affc9a39db61427cab1ccef8 /drivers/fsi/fsi-core.c
parent23ad7ec1ed79b270a63004f43a301591647f65e8 (diff)
downloadlinux-d5d8dfb01e1041836cef4d2d69b1c1c991c850fb.tar.xz
fsi: Move fsi_slave structure definition to header
Some FSI drivers may have need of the slave definition, so move it to a header file. Also use one macro for obtaining a pointer to the fsi_master structure. Signed-off-by: Eddie James <eajames@linux.ibm.com> Link: https://lore.kernel.org/r/20230612195657.245125-2-eajames@linux.ibm.com Signed-off-by: Joel Stanley <joel@jms.id.au>
Diffstat (limited to 'drivers/fsi/fsi-core.c')
-rw-r--r--drivers/fsi/fsi-core.c24
1 files changed, 4 insertions, 20 deletions
diff --git a/drivers/fsi/fsi-core.c b/drivers/fsi/fsi-core.c
index 19c4d5b3bde9..66706e7de010 100644
--- a/drivers/fsi/fsi-core.c
+++ b/drivers/fsi/fsi-core.c
@@ -24,6 +24,10 @@
#include <linux/uaccess.h>
#include "fsi-master.h"
+#include "fsi-slave.h"
+
+#define CREATE_TRACE_POINTS
+#include <trace/events/fsi.h>
#define FSI_SLAVE_CONF_NEXT_MASK GENMASK(31, 31)
#define FSI_SLAVE_CONF_SLOTS_MASK GENMASK(23, 16)
@@ -79,26 +83,6 @@ static const int engine_page_size = 0x400;
static DEFINE_IDA(master_ida);
-struct fsi_slave {
- struct device dev;
- struct fsi_master *master;
- struct cdev cdev;
- int cdev_idx;
- int id; /* FSI address */
- int link; /* FSI link# */
- u32 cfam_id;
- int chip_id;
- uint32_t size; /* size of slave address space */
- u8 t_send_delay;
- u8 t_echo_delay;
-};
-
-#define CREATE_TRACE_POINTS
-#include <trace/events/fsi.h>
-
-#define to_fsi_master(d) container_of(d, struct fsi_master, dev)
-#define to_fsi_slave(d) container_of(d, struct fsi_slave, dev)
-
static const int slave_retries = 2;
static int discard_errors;