1718cf2ccSPedro F. Giffuni /*- 2*4d846d26SWarner Losh * SPDX-License-Identifier: BSD-2-Clause 3718cf2ccSPedro F. Giffuni * 4d2bd3ab9SScott Long * Copyright (c) 2004-2005 HighPoint Technologies, Inc. 51713e81bSScott Long * All rights reserved. 61713e81bSScott Long * 71713e81bSScott Long * Redistribution and use in source and binary forms, with or without 81713e81bSScott Long * modification, are permitted provided that the following conditions 91713e81bSScott Long * are met: 101713e81bSScott Long * 1. Redistributions of source code must retain the above copyright 111713e81bSScott Long * notice, this list of conditions and the following disclaimer. 121713e81bSScott Long * 2. Redistributions in binary form must reproduce the above copyright 131713e81bSScott Long * notice, this list of conditions and the following disclaimer in the 141713e81bSScott Long * documentation and/or other materials provided with the distribution. 151713e81bSScott Long * 161713e81bSScott Long * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 171713e81bSScott Long * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 181713e81bSScott Long * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 191713e81bSScott Long * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 201713e81bSScott Long * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 211713e81bSScott Long * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 221713e81bSScott Long * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 231713e81bSScott Long * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 241713e81bSScott Long * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 251713e81bSScott Long * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 261713e81bSScott Long * SUCH DAMAGE. 271713e81bSScott Long */ 281713e81bSScott Long #ifndef _ACCESS601_H_ 291713e81bSScott Long #define _ACCESS601_H_ 301713e81bSScott Long 3164470755SXin LI #ifndef FOR_DEMO 3264470755SXin LI 331713e81bSScott Long void HPTLIBAPI BeepOn(MV_BUS_ADDR_T BaseAddr); 341713e81bSScott Long void HPTLIBAPI BeepOff(MV_BUS_ADDR_T BaseAddr); 351713e81bSScott Long UCHAR HPTLIBAPI check_protect_circuit(MV_BUS_ADDR_T BaseAddr); 361713e81bSScott Long 371713e81bSScott Long #ifdef SUPPORT_FAIL_LED 381713e81bSScott Long void HPTLIBAPI set_fail_led(MV_SATA_ADAPTER *pAdapter, UCHAR channel, UCHAR state); 391713e81bSScott Long void HPTLIBAPI set_fail_leds(MV_SATA_ADAPTER *pAdapter, UCHAR mask); 401713e81bSScott Long #else 411713e81bSScott Long #define set_fail_led(pAdapter, channel, state) 421713e81bSScott Long #define set_fail_leds(pAdapter, mask) 431713e81bSScott Long #endif 441713e81bSScott Long 4564470755SXin LI int HPTLIBAPI sx508x_ioctl(MV_SATA_ADAPTER *pSataAdapter, UCHAR *indata, ULONG inlen, 4664470755SXin LI UCHAR *outdata, ULONG maxoutlen, ULONG *poutlen); 4764470755SXin LI 4864470755SXin LI MV_BOOLEAN HPTLIBAPI sx508x_flash_access(MV_SATA_ADAPTER *pSataAdapter, 4964470755SXin LI MV_U32 offset, void *value, int size, int reading); 5064470755SXin LI #else 5164470755SXin LI 5264470755SXin LI #define BeepOn(addr) 5364470755SXin LI #define BeepOff(addr) 5464470755SXin LI #define check_protect_circuit(addr) 1 5564470755SXin LI #define set_fail_led(pAdapter, channel, state) 5664470755SXin LI #define set_fail_leds(pAdapter, mask) 5764470755SXin LI #define sx508x_ioctl(pSataAdapter, indata, inlen, outdata, maxoutlen, poutlen) 0 5864470755SXin LI #define sx508x_flash_access(pSataAdapter, offset, value, size, reading) 0 5964470755SXin LI 6064470755SXin LI #endif 6164470755SXin LI 621713e81bSScott Long #endif 63