From b6cb95e8eb97e51a1a1b5609b59df859cc6dc2f2 Mon Sep 17 00:00:00 2001 From: Alexandre Bounine Date: Tue, 22 Mar 2016 14:26:41 -0700 Subject: rapidio: move rio_pw_enable into core code Make rio_pw_enable() routine available to other RapidIO drivers. Signed-off-by: Alexandre Bounine Cc: Matt Porter Cc: Aurelien Jacquiot Cc: Andre van Herk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/rio.h | 2 ++ include/linux/rio_drv.h | 1 + 2 files changed, 3 insertions(+) (limited to 'include') diff --git a/include/linux/rio.h b/include/linux/rio.h index 948f60550ae5..cb3c47543bb0 100644 --- a/include/linux/rio.h +++ b/include/linux/rio.h @@ -266,6 +266,7 @@ 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 */ @@ -296,6 +297,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) diff --git a/include/linux/rio_drv.h b/include/linux/rio_drv.h index 341b3bf78333..9fb2bcd0a987 100644 --- a/include/linux/rio_drv.h +++ b/include/linux/rio_drv.h @@ -375,6 +375,7 @@ extern int rio_request_inb_pwrite(struct rio_dev *, int (*)(struct rio_dev *, union rio_pw_msg*, int)); extern int rio_release_inb_pwrite(struct rio_dev *); extern int rio_inb_pwrite_handler(union rio_pw_msg *pw_msg); +extern void rio_pw_enable(struct rio_mport *mport, int enable); /* LDM support */ int rio_register_driver(struct rio_driver *); -- cgit v1.2.3