aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/rio.h
diff options
context:
space:
mode:
authorZhang Wei <wei.zhang@freescale.com>2008-04-18 16:33:41 -0400
committerPaul Mackerras <paulus@samba.org>2008-04-29 05:40:28 -0400
commitad1e9380b17addf112f89ce5a57d4d0bee129b7a (patch)
tree41bb74c91533f0a2f4a7bfbfb1036ba250cbf50b /include/linux/rio.h
parent5a7b60ed8892756b137496b629f2e7c689fe6d8d (diff)
[RAPIDIO] Add RapidIO multi mport support
The original RapidIO driver suppose there is only one mpc85xx RIO controller in system. So, some data structures are defined as mpc85xx_rio global, such as 'regs_win', 'dbell_ring', 'msg_tx_ring'. Now, I changed them to mport's private members. And you can define multi RIO OF-nodes in dts file for multi RapidIO controller in one processor, such as PCI/PCI-Ex host controllers in Freescale's silicon. And the mport operation function declaration should be changed to know which RapidIO controller is target. 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.h18
1 files changed, 11 insertions, 7 deletions
diff --git a/include/linux/rio.h b/include/linux/rio.h
index 68e3f6853fa6..258c453f43f6 100644
--- a/include/linux/rio.h
+++ b/include/linux/rio.h
@@ -163,6 +163,7 @@ struct rio_dbell {
163 * @id: Port ID, unique among all ports 163 * @id: Port ID, unique among all ports
164 * @index: Port index, unique among all port interfaces of the same type 164 * @index: Port index, unique among all port interfaces of the same type
165 * @name: Port name string 165 * @name: Port name string
166 * @priv: Master port private data
166 */ 167 */
167struct rio_mport { 168struct rio_mport {
168 struct list_head dbells; /* list of doorbell events */ 169 struct list_head dbells; /* list of doorbell events */
@@ -178,6 +179,7 @@ struct rio_mport {
178 unsigned char index; /* port index, unique among all port 179 unsigned char index; /* port index, unique among all port
179 interfaces of the same type */ 180 interfaces of the same type */
180 unsigned char name[40]; 181 unsigned char name[40];
182 void *priv; /* Master port private data */
181}; 183};
182 184
183/** 185/**
@@ -229,13 +231,15 @@ struct rio_switch {
229 * @dsend: Callback to send a doorbell message. 231 * @dsend: Callback to send a doorbell message.
230 */ 232 */
231struct rio_ops { 233struct rio_ops {
232 int (*lcread) (int index, u32 offset, int len, u32 * data); 234 int (*lcread) (struct rio_mport *mport, int index, u32 offset, int len,
233 int (*lcwrite) (int index, u32 offset, int len, u32 data); 235 u32 *data);
234 int (*cread) (int index, u16 destid, u8 hopcount, u32 offset, int len, 236 int (*lcwrite) (struct rio_mport *mport, int index, u32 offset, int len,
235 u32 * data); 237 u32 data);
236 int (*cwrite) (int index, u16 destid, u8 hopcount, u32 offset, int len, 238 int (*cread) (struct rio_mport *mport, int index, u16 destid,
237 u32 data); 239 u8 hopcount, u32 offset, int len, u32 *data);
238 int (*dsend) (int index, u16 destid, u16 data); 240 int (*cwrite) (struct rio_mport *mport, int index, u16 destid,
241 u8 hopcount, u32 offset, int len, u32 data);
242 int (*dsend) (struct rio_mport *mport, int index, u16 destid, u16 data);
239}; 243};
240 244
241#define RIO_RESOURCE_MEM 0x00000100 245#define RIO_RESOURCE_MEM 0x00000100