1252867Sdelphij/* $Id: wj.h,v 1.1 2007/11/01 03:05:51 gmm Exp $ */
2252867Sdelphij/*-
3252867Sdelphij * Copyright (c) 2011 HighPoint Technologies, Inc.
4252867Sdelphij * All rights reserved.
5252867Sdelphij *
6252867Sdelphij * Redistribution and use in source and binary forms, with or without
7252867Sdelphij * modification, are permitted provided that the following conditions
8252867Sdelphij * are met:
9252867Sdelphij * 1. Redistributions of source code must retain the above copyright
10252867Sdelphij *    notice, this list of conditions and the following disclaimer.
11252867Sdelphij * 2. Redistributions in binary form must reproduce the above copyright
12252867Sdelphij *    notice, this list of conditions and the following disclaimer in the
13252867Sdelphij *    documentation and/or other materials provided with the distribution.
14252867Sdelphij *
15252867Sdelphij * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16252867Sdelphij * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17252867Sdelphij * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18252867Sdelphij * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19252867Sdelphij * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20252867Sdelphij * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21252867Sdelphij * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22252867Sdelphij * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23252867Sdelphij * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24252867Sdelphij * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25252867Sdelphij * SUCH DAMAGE.
26252867Sdelphij *
27252867Sdelphij * $FreeBSD: releng/11.0/sys/dev/hptnr/wj.h 252867 2013-07-06 07:49:41Z delphij $
28252867Sdelphij */
29252867Sdelphij
30252867Sdelphij#include <dev/hptnr/hptnr_config.h>
31252867Sdelphij *
32252867Sdelphij * NVRAM write journaling interface.
33252867Sdelphij */
34252867Sdelphij
35252867Sdelphij#ifndef _WJ_H_
36252867Sdelphij#define _WJ_H_
37252867Sdelphij
38252867Sdelphij#if defined(SUPPORT_BBU) || defined(SUPPORT_NVRAM)
39252867Sdelphij
40252867Sdelphijvoid wj_init(PVBUS vbus, void *nvram_addr, HPT_U32 nvram_size);
41252867Sdelphijvoid *wj_add_entry(PVBUS vbus, PVDEV vd, HPT_LBA lba, HPT_U16 sectors);
42252867Sdelphijvoid *wj_get_entry(PVBUS vbus, PVDEV *vd_p, HPT_LBA *lba_p, HPT_U16 *sectors_p);
43252867Sdelphijvoid wj_del_entry(PVBUS vbus, void *handle);
44252867Sdelphijvoid wj_del_vd(PVBUS vbus, PVDEV vd);
45252867Sdelphijvoid wj_sync_stamp(PVBUS vbus, PVDEV vd);
46252867Sdelphij
47252867Sdelphij#else
48252867Sdelphij
49252867Sdelphij#define wj_add_entry(vbus, vd, lba, sectors) 0
50252867Sdelphij#define wj_get_entry(vbus, vd_p, lba_p, sectors_p) 0
51252867Sdelphij#define wj_del_entry(vbus, handle) 0
52252867Sdelphij#define wj_del_vd(vbus, vd) 0
53252867Sdelphij#define wj_sync_stamp(vbus, vd) 0
54252867Sdelphij
55252867Sdelphij#endif
56252867Sdelphij
57252867Sdelphij#endif
58