162306a36Sopenharmony_ci/* 262306a36Sopenharmony_ci * This file is subject to the terms and conditions of the GNU General Public 362306a36Sopenharmony_ci * License. See the file "COPYING" in the main directory of this archive 462306a36Sopenharmony_ci * for more details. 562306a36Sopenharmony_ci * 662306a36Sopenharmony_ci * xtalk.h -- platform-independent crosstalk interface, derived from 762306a36Sopenharmony_ci * IRIX <sys/PCI/bridge.h>, revision 1.38. 862306a36Sopenharmony_ci * 962306a36Sopenharmony_ci * Copyright (C) 1995 - 1997, 1999 Silcon Graphics, Inc. 1062306a36Sopenharmony_ci * Copyright (C) 1999 Ralf Baechle (ralf@gnu.org) 1162306a36Sopenharmony_ci */ 1262306a36Sopenharmony_ci#ifndef _ASM_XTALK_XTALK_H 1362306a36Sopenharmony_ci#define _ASM_XTALK_XTALK_H 1462306a36Sopenharmony_ci 1562306a36Sopenharmony_ci#ifndef __ASSEMBLY__ 1662306a36Sopenharmony_ci/* 1762306a36Sopenharmony_ci * User-level device driver visible types 1862306a36Sopenharmony_ci */ 1962306a36Sopenharmony_citypedef char xwidgetnum_t; /* xtalk widget number (0..15) */ 2062306a36Sopenharmony_ci 2162306a36Sopenharmony_ci#define XWIDGET_NONE -1 2262306a36Sopenharmony_ci 2362306a36Sopenharmony_citypedef int xwidget_part_num_t; /* xtalk widget part number */ 2462306a36Sopenharmony_ci 2562306a36Sopenharmony_ci#define XWIDGET_PART_NUM_NONE -1 2662306a36Sopenharmony_ci 2762306a36Sopenharmony_citypedef int xwidget_rev_num_t; /* xtalk widget revision number */ 2862306a36Sopenharmony_ci 2962306a36Sopenharmony_ci#define XWIDGET_REV_NUM_NONE -1 3062306a36Sopenharmony_ci 3162306a36Sopenharmony_citypedef int xwidget_mfg_num_t; /* xtalk widget manufacturing ID */ 3262306a36Sopenharmony_ci 3362306a36Sopenharmony_ci#define XWIDGET_MFG_NUM_NONE -1 3462306a36Sopenharmony_ci 3562306a36Sopenharmony_citypedef struct xtalk_piomap_s *xtalk_piomap_t; 3662306a36Sopenharmony_ci 3762306a36Sopenharmony_ci/* It is often convenient to fold the XIO target port 3862306a36Sopenharmony_ci * number into the XIO address. 3962306a36Sopenharmony_ci */ 4062306a36Sopenharmony_ci#define XIO_NOWHERE (0xFFFFFFFFFFFFFFFFull) 4162306a36Sopenharmony_ci#define XIO_ADDR_BITS (0x0000FFFFFFFFFFFFull) 4262306a36Sopenharmony_ci#define XIO_PORT_BITS (0xF000000000000000ull) 4362306a36Sopenharmony_ci#define XIO_PORT_SHIFT (60) 4462306a36Sopenharmony_ci 4562306a36Sopenharmony_ci#define XIO_PACKED(x) (((x)&XIO_PORT_BITS) != 0) 4662306a36Sopenharmony_ci#define XIO_ADDR(x) ((x)&XIO_ADDR_BITS) 4762306a36Sopenharmony_ci#define XIO_PORT(x) ((xwidgetnum_t)(((x)&XIO_PORT_BITS) >> XIO_PORT_SHIFT)) 4862306a36Sopenharmony_ci#define XIO_PACK(p, o) ((((uint64_t)(p))<<XIO_PORT_SHIFT) | ((o)&XIO_ADDR_BITS)) 4962306a36Sopenharmony_ci 5062306a36Sopenharmony_ci#endif /* !__ASSEMBLY__ */ 5162306a36Sopenharmony_ci 5262306a36Sopenharmony_ci#endif /* _ASM_XTALK_XTALK_H */ 53