1235288Sadrian/*- 2235288Sadrian * Copyright (c) 2011-2012 Stefan Bethke. 3235288Sadrian * All rights reserved. 4235288Sadrian * 5235288Sadrian * Redistribution and use in source and binary forms, with or without 6235288Sadrian * modification, are permitted provided that the following conditions 7235288Sadrian * are met: 8235288Sadrian * 1. Redistributions of source code must retain the above copyright 9235288Sadrian * notice, this list of conditions and the following disclaimer. 10235288Sadrian * 2. Redistributions in binary form must reproduce the above copyright 11235288Sadrian * notice, this list of conditions and the following disclaimer in the 12235288Sadrian * documentation and/or other materials provided with the distribution. 13235288Sadrian * 14235288Sadrian * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15235288Sadrian * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16235288Sadrian * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17235288Sadrian * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18235288Sadrian * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19235288Sadrian * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20235288Sadrian * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21235288Sadrian * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22235288Sadrian * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23235288Sadrian * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24235288Sadrian * SUCH DAMAGE. 25235288Sadrian * 26235288Sadrian * $FreeBSD: releng/10.2/sys/dev/etherswitch/arswitch/arswitch_reg.h 253572 2013-07-23 14:24:22Z loos $ 27235288Sadrian */ 28235288Sadrian#ifndef __ARSWITCH_REG_H__ 29235288Sadrian#define __ARSWITCH_REG_H__ 30235288Sadrian 31235288Sadrianextern void arswitch_writedbg(device_t dev, int phy, uint16_t dbg_addr, 32235288Sadrian uint16_t dbg_data); 33235288Sadrian 34235288Sadrianextern int arswitch_readreg(device_t dev, int addr); 35235288Sadrianextern int arswitch_writereg(device_t dev, int addr, int value); 36235288Sadrianextern int arswitch_modifyreg(device_t dev, int addr, int mask, int set); 37253572Sloosextern int arswitch_waitreg(device_t, int, int, int, int); 38235288Sadrian 39235288Sadrianextern int arswitch_readreg_lsb(device_t dev, int addr); 40235288Sadrianextern int arswitch_readreg_msb(device_t dev, int addr); 41235288Sadrian 42235288Sadrianextern int arswitch_writereg_lsb(device_t dev, int addr, int data); 43235288Sadrianextern int arswitch_writereg_msb(device_t dev, int addr, int data); 44235288Sadrian 45235288Sadrian#endif /* __ARSWITCH_REG_H__ */ 46