xref: /freebsd/sys/dev/etherswitch/arswitch/arswitch_phy.h (revision 78549b94cd31ebed6073c0019f4a56b45b9c6703)
1a043e8c7SAdrian Chadd /*-
2a043e8c7SAdrian Chadd  * Copyright (c) 2011-2012 Stefan Bethke.
3a043e8c7SAdrian Chadd  * All rights reserved.
4a043e8c7SAdrian Chadd  *
5a043e8c7SAdrian Chadd  * Redistribution and use in source and binary forms, with or without
6a043e8c7SAdrian Chadd  * modification, are permitted provided that the following conditions
7a043e8c7SAdrian Chadd  * are met:
8a043e8c7SAdrian Chadd  * 1. Redistributions of source code must retain the above copyright
9a043e8c7SAdrian Chadd  *    notice, this list of conditions and the following disclaimer.
10a043e8c7SAdrian Chadd  * 2. Redistributions in binary form must reproduce the above copyright
11a043e8c7SAdrian Chadd  *    notice, this list of conditions and the following disclaimer in the
12a043e8c7SAdrian Chadd  *    documentation and/or other materials provided with the distribution.
13a043e8c7SAdrian Chadd  *
14a043e8c7SAdrian Chadd  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15a043e8c7SAdrian Chadd  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16a043e8c7SAdrian Chadd  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17a043e8c7SAdrian Chadd  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18a043e8c7SAdrian Chadd  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19a043e8c7SAdrian Chadd  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20a043e8c7SAdrian Chadd  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21a043e8c7SAdrian Chadd  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22a043e8c7SAdrian Chadd  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23a043e8c7SAdrian Chadd  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24a043e8c7SAdrian Chadd  * SUCH DAMAGE.
25a043e8c7SAdrian Chadd  *
26a043e8c7SAdrian Chadd  * $FreeBSD$
27a043e8c7SAdrian Chadd  */
28a043e8c7SAdrian Chadd #ifndef	__ARSWITCH_PHY_H__
29a043e8c7SAdrian Chadd #define	__ARSWITCH_PHY_H__
30a043e8c7SAdrian Chadd 
31*78549b94SAdrian Chadd extern	int arswitch_readphy_external(device_t dev, int phy, int reg);
32*78549b94SAdrian Chadd extern	int arswitch_writephy_external(device_t dev, int phy, int reg, int data);
33*78549b94SAdrian Chadd 
34*78549b94SAdrian Chadd extern	int arswitch_readphy_internal(device_t dev, int phy, int reg);
35*78549b94SAdrian Chadd extern	int arswitch_writephy_internal(device_t dev, int phy, int reg, int data);
36a043e8c7SAdrian Chadd 
37a043e8c7SAdrian Chadd #endif	/* __ARSWITCH_PHY_H__ */
38