diff options
author | Colin Ngam <cngam@sgi.com> | 2005-05-10 12:12:00 -0400 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2005-06-28 12:48:53 -0400 |
commit | 71030994a77e7689a7a792128b131ef7a10b9f74 (patch) | |
tree | 439eb24d866600ef3e5bfe0c2c6124fbaf10c8a6 | |
parent | 71a5d027c90dd7e14ddaaf22358ff5138ba89ec9 (diff) |
[IA64-SGI] Fix TIO IOSPACE MMR Addres
This patches provides support on Shub2 for the separate TIO IOSPACE MMR. This
patch is SN specific.
Signed-off-by: Colin Ngam <cngam@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
-rw-r--r-- | include/asm-ia64/sn/addrs.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/include/asm-ia64/sn/addrs.h b/include/asm-ia64/sn/addrs.h index 1bfdfb4d7b01..103d745dc5f2 100644 --- a/include/asm-ia64/sn/addrs.h +++ b/include/asm-ia64/sn/addrs.h | |||
@@ -216,6 +216,10 @@ | |||
216 | #define TIO_SWIN_WIDGETNUM(x) (((x) >> TIO_SWIN_SIZE_BITS) & TIO_SWIN_WIDGET_MASK) | 216 | #define TIO_SWIN_WIDGETNUM(x) (((x) >> TIO_SWIN_SIZE_BITS) & TIO_SWIN_WIDGET_MASK) |
217 | 217 | ||
218 | 218 | ||
219 | #define TIO_IOSPACE_ADDR(n,x) \ | ||
220 | /* Move in the Chiplet ID for TIO Local Block MMR */ \ | ||
221 | (REMOTE_ADDR(n,x) | 1UL << (NASID_SHIFT - 2)) | ||
222 | |||
219 | /* | 223 | /* |
220 | * The following macros produce the correct base virtual address for | 224 | * The following macros produce the correct base virtual address for |
221 | * the hub registers. The REMOTE_HUB_* macro produce | 225 | * the hub registers. The REMOTE_HUB_* macro produce |
@@ -233,13 +237,16 @@ | |||
233 | #define REMOTE_HUB_ADDR(n,x) \ | 237 | #define REMOTE_HUB_ADDR(n,x) \ |
234 | ((n & 1) ? \ | 238 | ((n & 1) ? \ |
235 | /* TIO: */ \ | 239 | /* TIO: */ \ |
236 | ((volatile u64 *)(GLOBAL_MMR_ADDR(n,x))) \ | 240 | (is_shub2() ? \ |
237 | : /* SHUB: */ \ | 241 | /* TIO on Shub2 */ \ |
238 | (((x) & BWIN_TOP) ? ((volatile u64 *)(GLOBAL_MMR_ADDR(n,x)))\ | 242 | (volatile u64 *)(TIO_IOSPACE_ADDR(n,x)) \ |
243 | : /* TIO on shub1 */ \ | ||
244 | (volatile u64 *)(GLOBAL_MMR_ADDR(n,x))) \ | ||
245 | \ | ||
246 | : /* SHUB1 and SHUB2 MMRs: */ \ | ||
247 | (((x) & BWIN_TOP) ? ((volatile u64 *)(GLOBAL_MMR_ADDR(n,x))) \ | ||
239 | : ((volatile u64 *)(NODE_SWIN_BASE(n,1) + 0x800000 + (x))))) | 248 | : ((volatile u64 *)(NODE_SWIN_BASE(n,1) + 0x800000 + (x))))) |
240 | 249 | ||
241 | |||
242 | |||
243 | #define HUB_L(x) (*((volatile typeof(*x) *)x)) | 250 | #define HUB_L(x) (*((volatile typeof(*x) *)x)) |
244 | #define HUB_S(x,d) (*((volatile typeof(*x) *)x) = (d)) | 251 | #define HUB_S(x,d) (*((volatile typeof(*x) *)x) = (d)) |
245 | 252 | ||