aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/rio_regs.h
diff options
context:
space:
mode:
authorAlexandre Bounine <alexandre.bounine@idt.com>2010-10-27 18:34:29 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-10-27 21:03:15 -0400
commitae05cbd5adef897d405ce8f90484c1239f79e086 (patch)
tree1b235d02a42e40ae2071f2ce0983de1f0feadaf1 /include/linux/rio_regs.h
parent93e2cbd24e71f5eedf6e49e075973fda9b2135e8 (diff)
rapidio: use stored ingress port number instead of register read
The switch port information is obtained and stored during RIO device setup. Therefore repeated reads from Switch Port Information CAR may be removed. Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com> Cc: Thomas Moll <thomas.moll@sysgo.com> Cc: Matt Porter <mporter@kernel.crashing.org> Cc: Li Yang <leoli@freescale.com> Cc: Kumar Gala <galak@kernel.crashing.org> Cc: Micha Nelissen <micha@neli.hopto.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/rio_regs.h')
-rw-r--r--include/linux/rio_regs.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/rio_regs.h b/include/linux/rio_regs.h
index aedee0489fb4..be80b1b21815 100644
--- a/include/linux/rio_regs.h
+++ b/include/linux/rio_regs.h
@@ -33,6 +33,7 @@
33#define RIO_PEF_MEMORY 0x40000000 /* [I] MMIO */ 33#define RIO_PEF_MEMORY 0x40000000 /* [I] MMIO */
34#define RIO_PEF_PROCESSOR 0x20000000 /* [I] Processor */ 34#define RIO_PEF_PROCESSOR 0x20000000 /* [I] Processor */
35#define RIO_PEF_SWITCH 0x10000000 /* [I] Switch */ 35#define RIO_PEF_SWITCH 0x10000000 /* [I] Switch */
36#define RIO_PEF_MULTIPORT 0x08000000 /* [VI, 2.1] Multiport */
36#define RIO_PEF_INB_MBOX 0x00f00000 /* [II] Mailboxes */ 37#define RIO_PEF_INB_MBOX 0x00f00000 /* [II] Mailboxes */
37#define RIO_PEF_INB_MBOX0 0x00800000 /* [II] Mailbox 0 */ 38#define RIO_PEF_INB_MBOX0 0x00800000 /* [II] Mailbox 0 */
38#define RIO_PEF_INB_MBOX1 0x00400000 /* [II] Mailbox 1 */ 39#define RIO_PEF_INB_MBOX1 0x00400000 /* [II] Mailbox 1 */
@@ -51,6 +52,7 @@
51#define RIO_SWP_INFO_PORT_TOTAL_MASK 0x0000ff00 /* [I] Total number of ports */ 52#define RIO_SWP_INFO_PORT_TOTAL_MASK 0x0000ff00 /* [I] Total number of ports */
52#define RIO_SWP_INFO_PORT_NUM_MASK 0x000000ff /* [I] Maintenance transaction port number */ 53#define RIO_SWP_INFO_PORT_NUM_MASK 0x000000ff /* [I] Maintenance transaction port number */
53#define RIO_GET_TOTAL_PORTS(x) ((x & RIO_SWP_INFO_PORT_TOTAL_MASK) >> 8) 54#define RIO_GET_TOTAL_PORTS(x) ((x & RIO_SWP_INFO_PORT_TOTAL_MASK) >> 8)
55#define RIO_GET_PORT_NUM(x) (x & RIO_SWP_INFO_PORT_NUM_MASK)
54 56
55#define RIO_SRC_OPS_CAR 0x18 /* [I] Source Operations CAR */ 57#define RIO_SRC_OPS_CAR 0x18 /* [I] Source Operations CAR */
56#define RIO_SRC_OPS_READ 0x00008000 /* [I] Read op */ 58#define RIO_SRC_OPS_READ 0x00008000 /* [I] Read op */