aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rapidio
diff options
context:
space:
mode:
authorAlexandre Bounine <alexandre.bounine@idt.com>2016-03-22 17:26:38 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-03-22 18:36:02 -0400
commit5024622f583eb242ed8040d0b9d1e0d2458d1db8 (patch)
treedcfb1c09c13adaa0dc188667fa6169791e3ab72c /drivers/rapidio
parenta7b4c636d83034f0e89d58651ef2e9b96564489a (diff)
rapidio: move rio_local_set_device_id function to the common core
Make function rio_local_set_device_id() common for all components of RapidIO subsystem. Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com> Cc: Matt Porter <mporter@kernel.crashing.org> Cc: Aurelien Jacquiot <a-jacquiot@ti.com> Cc: Andre van Herk <andre.van.herk@prodrive-technologies.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/rapidio')
-rw-r--r--drivers/rapidio/rio-scan.c13
-rw-r--r--drivers/rapidio/rio.c14
2 files changed, 14 insertions, 13 deletions
diff --git a/drivers/rapidio/rio-scan.c b/drivers/rapidio/rio-scan.c
index 764dc5fd30b2..f730914f6ff6 100644
--- a/drivers/rapidio/rio-scan.c
+++ b/drivers/rapidio/rio-scan.c
@@ -194,19 +194,6 @@ static void rio_set_device_id(struct rio_mport *port, u16 destid, u8 hopcount, u
194} 194}
195 195
196/** 196/**
197 * rio_local_set_device_id - Set the base/extended device id for a port
198 * @port: RIO master port
199 * @did: Device ID value to be written
200 *
201 * Writes the base/extended device id from a device.
202 */
203static void rio_local_set_device_id(struct rio_mport *port, u16 did)
204{
205 rio_local_write_config_32(port, RIO_DID_CSR, RIO_SET_DID(port->sys_size,
206 did));
207}
208
209/**
210 * rio_clear_locks- Release all host locks and signal enumeration complete 197 * rio_clear_locks- Release all host locks and signal enumeration complete
211 * @net: RIO network to run on 198 * @net: RIO network to run on
212 * 199 *
diff --git a/drivers/rapidio/rio.c b/drivers/rapidio/rio.c
index e42f97e9e62a..095801c4d239 100644
--- a/drivers/rapidio/rio.c
+++ b/drivers/rapidio/rio.c
@@ -138,6 +138,20 @@ void rio_free_net(struct rio_net *net)
138EXPORT_SYMBOL_GPL(rio_free_net); 138EXPORT_SYMBOL_GPL(rio_free_net);
139 139
140/** 140/**
141 * rio_local_set_device_id - Set the base/extended device id for a port
142 * @port: RIO master port
143 * @did: Device ID value to be written
144 *
145 * Writes the base/extended device id from a device.
146 */
147void rio_local_set_device_id(struct rio_mport *port, u16 did)
148{
149 rio_local_write_config_32(port, RIO_DID_CSR,
150 RIO_SET_DID(port->sys_size, did));
151}
152EXPORT_SYMBOL_GPL(rio_local_set_device_id);
153
154/**
141 * rio_add_device- Adds a RIO device to the device model 155 * rio_add_device- Adds a RIO device to the device model
142 * @rdev: RIO device 156 * @rdev: RIO device
143 * 157 *