Merge tag 'topic/drm-misc-2016-05-04' of git://anongit.freedesktop.org/drm-intel...
[deliverable/linux.git] / include / linux / rio.h
index f833773cdc68e783ab62d21c992c08cd513824a9..aa2323893e8d68b8156fa6b9422ac12b20dc96a6 100644 (file)
@@ -245,9 +245,11 @@ enum rio_phy_type {
 /**
  * struct rio_mport - RIO master port info
  * @dbells: List of doorbell events
+ * @pwrites: List of portwrite events
  * @node: Node in global list of master ports
  * @nnode: Node in network list of master ports
  * @net: RIO net this mport is attached to
+ * @lock: lock to synchronize lists manipulations
  * @iores: I/O mem resource that this master port interface owns
  * @riores: RIO resources that this master port interfaces owns
  * @inb_msg: RIO inbound message event descriptors
@@ -265,12 +267,15 @@ enum rio_phy_type {
  * @dma: DMA device associated with mport
  * @nscan: RapidIO network enumeration/discovery operations
  * @state: mport device state
+ * @pwe_refcnt: port-write enable ref counter to track enable/disable requests
  */
 struct rio_mport {
        struct list_head dbells;        /* list of doorbell events */
+       struct list_head pwrites;       /* list of portwrite events */
        struct list_head node;  /* node in global list of ports */
        struct list_head nnode; /* node in net list of ports */
        struct rio_net *net;    /* RIO net this mport is attached to */
+       struct mutex lock;
        struct resource iores;
        struct resource riores[RIO_MAX_MPORT_RESOURCES];
        struct rio_msg inb_msg[RIO_MAX_MBOX];
@@ -294,6 +299,7 @@ struct rio_mport {
 #endif
        struct rio_scan *nscan;
        atomic_t state;
+       unsigned int pwe_refcnt;
 };
 
 static inline int rio_mport_is_running(struct rio_mport *mport)
@@ -394,6 +400,8 @@ struct rio_mport_attr {
  * @map_inb: Callback to map RapidIO address region into local memory space.
  * @unmap_inb: Callback to unmap RapidIO address region mapped with map_inb().
  * @query_mport: Callback to query mport device attributes.
+ * @map_outb: Callback to map outbound address region into local memory space.
+ * @unmap_outb: Callback to unmap outbound RapidIO address region.
  */
 struct rio_ops {
        int (*lcread) (struct rio_mport *mport, int index, u32 offset, int len,
@@ -421,6 +429,9 @@ struct rio_ops {
        void (*unmap_inb)(struct rio_mport *mport, dma_addr_t lstart);
        int (*query_mport)(struct rio_mport *mport,
                           struct rio_mport_attr *attr);
+       int (*map_outb)(struct rio_mport *mport, u16 destid, u64 rstart,
+                       u32 size, u32 flags, dma_addr_t *laddr);
+       void (*unmap_outb)(struct rio_mport *mport, u16 destid, u64 rstart);
 };
 
 #define RIO_RESOURCE_MEM       0x00000100
This page took 0.033268 seconds and 5 git commands to generate.