summaryrefslogtreecommitdiffstats
path: root/drivers/rapidio/rio.h
diff options
context:
space:
mode:
authorZhang Wei2008-04-18 22:33:42 +0200
committerPaul Mackerras2008-04-29 11:40:28 +0200
commite042323607f5c14844b1c59aebbca8d1251c7d89 (patch)
tree10c9eac3d5146f3611af9220740e4ec27bf2ade0 /drivers/rapidio/rio.h
parent[RAPIDIO] Add OF-tree support to RapidIO controller driver (diff)
downloadkernel-qcow2-linux-e042323607f5c14844b1c59aebbca8d1251c7d89.tar.gz
kernel-qcow2-linux-e042323607f5c14844b1c59aebbca8d1251c7d89.tar.xz
kernel-qcow2-linux-e042323607f5c14844b1c59aebbca8d1251c7d89.zip
[RAPIDIO] Auto-probe the RapidIO system size
The RapidIO system size will auto probe in RIO setup. The route table and rionet_active in rionet.c are changed to be allocated dynamically according to the size of the system. Signed-off-by: Zhang Wei <wei.zhang@freescale.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'drivers/rapidio/rio.h')
-rw-r--r--drivers/rapidio/rio.h9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/rapidio/rio.h b/drivers/rapidio/rio.h
index 80e3f03b5041..7786d02581f2 100644
--- a/drivers/rapidio/rio.h
+++ b/drivers/rapidio/rio.h
@@ -51,10 +51,5 @@ extern struct rio_route_ops __end_rio_route_ops[];
DECLARE_RIO_ROUTE_SECTION(.rio_route_ops, \
vid, did, add_hook, get_hook)
-#ifdef CONFIG_RAPIDIO_8_BIT_TRANSPORT
-#define RIO_GET_DID(x) ((x & 0x00ff0000) >> 16)
-#define RIO_SET_DID(x) ((x & 0x000000ff) << 16)
-#else
-#define RIO_GET_DID(x) (x & 0xffff)
-#define RIO_SET_DID(x) (x & 0xffff)
-#endif
+#define RIO_GET_DID(size, x) (size ? (x & 0xffff) : ((x & 0x00ff0000) >> 16))
+#define RIO_SET_DID(size, x) (size ? (x & 0xffff) : ((x & 0x000000ff) << 16))