1228940Sdelphij/*- 2228940Sdelphij * Copyright (c) 2011 HighPoint Technologies, Inc. 3228940Sdelphij * All rights reserved. 4228940Sdelphij * 5228940Sdelphij * Redistribution and use in source and binary forms, with or without 6228940Sdelphij * modification, are permitted provided that the following conditions 7228940Sdelphij * are met: 8228940Sdelphij * 1. Redistributions of source code must retain the above copyright 9228940Sdelphij * notice, this list of conditions and the following disclaimer. 10228940Sdelphij * 2. Redistributions in binary form must reproduce the above copyright 11228940Sdelphij * notice, this list of conditions and the following disclaimer in the 12228940Sdelphij * documentation and/or other materials provided with the distribution. 13228940Sdelphij * 14228940Sdelphij * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15228940Sdelphij * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16228940Sdelphij * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17228940Sdelphij * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18228940Sdelphij * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19228940Sdelphij * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20228940Sdelphij * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21228940Sdelphij * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22228940Sdelphij * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23228940Sdelphij * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24228940Sdelphij * SUCH DAMAGE. 25228940Sdelphij * 26228940Sdelphij * $FreeBSD: releng/11.0/sys/dev/hpt27xx/wj.h 228940 2011-12-28 23:26:58Z delphij $ 27228940Sdelphij */ 28228940Sdelphij 29228940Sdelphij#include <dev/hpt27xx/hpt27xx_config.h> 30228940Sdelphij/* 31228940Sdelphij * NVRAM write journaling interface. 32228940Sdelphij */ 33228940Sdelphij 34228940Sdelphij#ifndef _WJ_H_ 35228940Sdelphij#define _WJ_H_ 36228940Sdelphij 37228940Sdelphij#if defined(SUPPORT_BBU) || defined(SUPPORT_NVRAM) 38228940Sdelphij 39228940Sdelphijvoid wj_init(PVBUS vbus, void *nvram_addr, HPT_U32 nvram_size); 40228940Sdelphijvoid *wj_add_entry(PVBUS vbus, PVDEV vd, HPT_LBA lba, HPT_U16 sectors); 41228940Sdelphijvoid *wj_get_entry(PVBUS vbus, PVDEV *vd_p, HPT_LBA *lba_p, HPT_U16 *sectors_p); 42228940Sdelphijvoid wj_del_entry(PVBUS vbus, void *handle); 43228940Sdelphijvoid wj_del_vd(PVBUS vbus, PVDEV vd); 44228940Sdelphijvoid wj_sync_stamp(PVBUS vbus, PVDEV vd); 45228940Sdelphij 46228940Sdelphij#else 47228940Sdelphij 48228940Sdelphij#define wj_add_entry(vbus, vd, lba, sectors) 0 49228940Sdelphij#define wj_get_entry(vbus, vd_p, lba_p, sectors_p) 0 50228940Sdelphij#define wj_del_entry(vbus, handle) 0 51228940Sdelphij#define wj_del_vd(vbus, vd) 0 52228940Sdelphij#define wj_sync_stamp(vbus, vd) 0 53228940Sdelphij 54228940Sdelphij#endif 55228940Sdelphij 56228940Sdelphij#endif 57