access601.h revision 285830
197403Sobrien/*
297403Sobrien * Copyright (c) 2004-2005 HighPoint Technologies, Inc.
397403Sobrien * All rights reserved.
497403Sobrien *
597403Sobrien * Redistribution and use in source and binary forms, with or without
697403Sobrien * modification, are permitted provided that the following conditions
797403Sobrien * are met:
897403Sobrien * 1. Redistributions of source code must retain the above copyright
997403Sobrien *    notice, this list of conditions and the following disclaimer.
1097403Sobrien * 2. Redistributions in binary form must reproduce the above copyright
1197403Sobrien *    notice, this list of conditions and the following disclaimer in the
1297403Sobrien *    documentation and/or other materials provided with the distribution.
1397403Sobrien *
1497403Sobrien * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
1597403Sobrien * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1697403Sobrien * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1797403Sobrien * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
1897403Sobrien * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1997403Sobrien * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2097403Sobrien * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2197403Sobrien * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2297403Sobrien * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2397403Sobrien * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2497403Sobrien * SUCH DAMAGE.
2597403Sobrien *
2697403Sobrien * $FreeBSD: releng/10.2/sys/dev/hptmv/access601.h 190809 2009-04-07 16:38:25Z delphij $
2797403Sobrien */
2897403Sobrien#ifndef _ACCESS601_H_
2997403Sobrien#define _ACCESS601_H_
3097403Sobrien
3197403Sobrien#ifndef FOR_DEMO
3297403Sobrien
3397403Sobrienvoid HPTLIBAPI BeepOn(MV_BUS_ADDR_T BaseAddr);
3497403Sobrienvoid HPTLIBAPI BeepOff(MV_BUS_ADDR_T BaseAddr);
3597403SobrienUCHAR HPTLIBAPI check_protect_circuit(MV_BUS_ADDR_T BaseAddr);
3697403Sobrien
3797403Sobrien#ifdef SUPPORT_FAIL_LED
3897403Sobrienvoid HPTLIBAPI set_fail_led(MV_SATA_ADAPTER *pAdapter, UCHAR channel, UCHAR state);
3997403Sobrienvoid HPTLIBAPI set_fail_leds(MV_SATA_ADAPTER *pAdapter, UCHAR mask);
4097403Sobrien#else
4197403Sobrien#define set_fail_led(pAdapter, channel, state)
4297403Sobrien#define set_fail_leds(pAdapter, mask)
4397403Sobrien#endif
4497403Sobrien
4597403Sobrienint HPTLIBAPI sx508x_ioctl(MV_SATA_ADAPTER *pSataAdapter, UCHAR *indata, ULONG inlen,
4697403Sobrien			UCHAR *outdata, ULONG maxoutlen, ULONG *poutlen);
4797403Sobrien
4897403SobrienMV_BOOLEAN HPTLIBAPI sx508x_flash_access(MV_SATA_ADAPTER *pSataAdapter,
4997403Sobrien			MV_U32 offset, void *value, int size, int reading);
5097403Sobrien#else
5197403Sobrien
52102782Skan#define BeepOn(addr)
5397403Sobrien#define BeepOff(addr)
5497403Sobrien#define check_protect_circuit(addr) 1
5597403Sobrien#define set_fail_led(pAdapter, channel, state)
5697403Sobrien#define set_fail_leds(pAdapter, mask)
5797403Sobrien#define sx508x_ioctl(pSataAdapter, indata, inlen, outdata, maxoutlen, poutlen) 0
5897403Sobrien#define sx508x_flash_access(pSataAdapter, offset, value, size, reading) 0
5997403Sobrien
6097403Sobrien#endif
6197403Sobrien
6297403Sobrien#endif
6397403Sobrien