1139749Simp/*-
2103285Sikob * Copyright (c) 1998-2002 Katsushi Kobayashi and Hidetoshi Shimokawa
3103285Sikob * All rights reserved.
4103285Sikob *
5103285Sikob * Redistribution and use in source and binary forms, with or without
6103285Sikob * modification, are permitted provided that the following conditions
7103285Sikob * are met:
8103285Sikob * 1. Redistributions of source code must retain the above copyright
9103285Sikob *    notice, this list of conditions and the following disclaimer.
10103285Sikob * 2. Redistributions in binary form must reproduce the above copyright
11103285Sikob *    notice, this list of conditions and the following disclaimer in the
12103285Sikob *    documentation and/or other materials provided with the distribution.
13103285Sikob * 3. All advertising materials mentioning features or use of this software
14103285Sikob *    must display the acknowledgement as bellow:
15103285Sikob *
16103285Sikob *    This product includes software developed by K. Kobayashi and H. Shimokawa
17103285Sikob *
18103285Sikob * 4. The name of the author may not be used to endorse or promote products
19103285Sikob *    derived from this software without specific prior written permission.
20103285Sikob *
21103285Sikob * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
22103285Sikob * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
23103285Sikob * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24103285Sikob * DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
25103285Sikob * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
26103285Sikob * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27103285Sikob * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28103285Sikob * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
29103285Sikob * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
30103285Sikob * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31103285Sikob * POSSIBILITY OF SUCH DAMAGE.
32103285Sikob *
33103285Sikob * $FreeBSD: releng/10.2/sys/dev/firewire/firewire_phy.h 139749 2005-01-06 01:43:34Z imp $
34103285Sikob *
35103285Sikob */
36103285Sikob
37103285Sikob#define	FW_PHY_PHYSID_REG		0x00
38103285Sikob#define	FW_PHY_PHYSID			(63<<2)
39103285Sikob#define	FW_PHY_ROOT_REG			0x00
40103285Sikob#define	FW_PHY_ROOT			(1<<1)
41103285Sikob#define	FW_PHY_CPS_REG			0x00
42103285Sikob#define	FW_PHY_CPS			(1<<0)
43103285Sikob
44103285Sikob#define	FW_PHY_RHB_REG			0x01
45103285Sikob#define	FW_PHY_RHB			(1<<7)
46103285Sikob#define	FW_PHY_IBR_REG			0x01
47103285Sikob#define	FW_PHY_IBR			(1<<6)
48103285Sikob#define	FW_PHY_ISBR_REG			0x05
49103285Sikob#define	FW_PHY_ISBR			(1<<6)
50103285Sikob#define	FW_PHY_GC_REG			0x01
51103285Sikob
52103285Sikob#define	FW_PHY_SPD_REG			0x02
53103285Sikob#define	FW_PHY_SPD			(3<<6)
54103285Sikob#define	FW_PHY_REV_REG			0x02
55103285Sikob#define	FW_PHY_REV			(3<<4)
56103285Sikob#define	FW_PHY_NP_REG			0x02
57103285Sikob#define	FW_PHY_NP			(15<<0)
58103285Sikob
59103285Sikob#define	FW_PHY_P1_REG			0x03
60103285Sikob#define	FW_PHY_P2_REG			0x04
61103285Sikob#define	FW_PHY_P3_REG			0x05
62103285Sikob
63103285Sikob#define	FW_PHY_P_ASTAT			(3<<6)
64103285Sikob#define	FW_PHY_P_BSTAT			(3<<4)
65103285Sikob#define	FW_PHY_P_CH			(1<<3)
66103285Sikob#define	FW_PHY_P_CON			(1<<2)
67103285Sikob
68103285Sikob#define FW_PHY_LOOPINT_REG		0x06
69103285Sikob#define FW_PHY_LOOPINT			(1<<7)
70103285Sikob#define FW_PHY_CPSINT_REG		0x06
71103285Sikob#define FW_PHY_CPSNT			(1<<6)
72103285Sikob/*
73103285Sikob#define FW_PHY_CPS_REG			0x06
74103285Sikob#define FW_PHY_CPS			(1<<5)
75103285Sikob*/
76103285Sikob#define FW_PHY_IR_REG			0x06
77103285Sikob#define FW_PHY_IR			(1<<4)
78103285Sikob#define FW_PHY_C_REG			0x06
79103285Sikob#define FW_PHY_C			(1<<0)
80103285Sikob
81103285Sikob#define FW_PHY_ESPD_REG			0x03
82103285Sikob#define	FW_PHY_ESPD			(7<<5)
83103285Sikob
84103285Sikob#define FW_PHY_EDEL_REG			0x03
85103285Sikob#define FW_PHY_EDEL			15<<0
86