diff options
author | Zhang Wei <wei.zhang@freescale.com> | 2008-04-18 16:33:42 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-04-29 05:40:28 -0400 |
commit | e042323607f5c14844b1c59aebbca8d1251c7d89 (patch) | |
tree | 10c9eac3d5146f3611af9220740e4ec27bf2ade0 /include/linux/rio.h | |
parent | cc2bb6968a2c842149d285d77cb35200d2d37b15 (diff) |
[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 'include/linux/rio.h')
-rw-r--r-- | include/linux/rio.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/include/linux/rio.h b/include/linux/rio.h index 258c453f43f6..4a064bcd7c0c 100644 --- a/include/linux/rio.h +++ b/include/linux/rio.h | |||
@@ -23,7 +23,6 @@ | |||
23 | #include <linux/device.h> | 23 | #include <linux/device.h> |
24 | #include <linux/rio_regs.h> | 24 | #include <linux/rio_regs.h> |
25 | 25 | ||
26 | #define RIO_ANY_DESTID 0xff | ||
27 | #define RIO_NO_HOPCOUNT -1 | 26 | #define RIO_NO_HOPCOUNT -1 |
28 | #define RIO_INVALID_DESTID 0xffff | 27 | #define RIO_INVALID_DESTID 0xffff |
29 | 28 | ||
@@ -39,11 +38,8 @@ | |||
39 | entry is invalid (no route | 38 | entry is invalid (no route |
40 | exists for the device ID) */ | 39 | exists for the device ID) */ |
41 | 40 | ||
42 | #ifdef CONFIG_RAPIDIO_8_BIT_TRANSPORT | 41 | #define RIO_MAX_ROUTE_ENTRIES(size) (size ? (1 << 16) : (1 << 8)) |
43 | #define RIO_MAX_ROUTE_ENTRIES (1 << 8) | 42 | #define RIO_ANY_DESTID(size) (size ? 0xffff : 0xff) |
44 | #else | ||
45 | #define RIO_MAX_ROUTE_ENTRIES (1 << 16) | ||
46 | #endif | ||
47 | 43 | ||
48 | #define RIO_MAX_MBOX 4 | 44 | #define RIO_MAX_MBOX 4 |
49 | #define RIO_MAX_MSG_SIZE 0x1000 | 45 | #define RIO_MAX_MSG_SIZE 0x1000 |
@@ -178,6 +174,10 @@ struct rio_mport { | |||
178 | unsigned char id; /* port ID, unique among all ports */ | 174 | unsigned char id; /* port ID, unique among all ports */ |
179 | unsigned char index; /* port index, unique among all port | 175 | unsigned char index; /* port index, unique among all port |
180 | interfaces of the same type */ | 176 | interfaces of the same type */ |
177 | unsigned int sys_size; /* RapidIO common transport system size. | ||
178 | * 0 - Small size. 256 devices. | ||
179 | * 1 - Large size, 65536 devices. | ||
180 | */ | ||
181 | unsigned char name[40]; | 181 | unsigned char name[40]; |
182 | void *priv; /* Master port private data */ | 182 | void *priv; /* Master port private data */ |
183 | }; | 183 | }; |
@@ -213,7 +213,7 @@ struct rio_switch { | |||
213 | u16 switchid; | 213 | u16 switchid; |
214 | u16 hopcount; | 214 | u16 hopcount; |
215 | u16 destid; | 215 | u16 destid; |
216 | u8 route_table[RIO_MAX_ROUTE_ENTRIES]; | 216 | u8 *route_table; |
217 | int (*add_entry) (struct rio_mport * mport, u16 destid, u8 hopcount, | 217 | int (*add_entry) (struct rio_mport * mport, u16 destid, u8 hopcount, |
218 | u16 table, u16 route_destid, u8 route_port); | 218 | u16 table, u16 route_destid, u8 route_port); |
219 | int (*get_entry) (struct rio_mport * mport, u16 destid, u8 hopcount, | 219 | int (*get_entry) (struct rio_mport * mport, u16 destid, u8 hopcount, |