1235537Sgber/*- 2235537Sgber * Copyright (C) 2009-2012 Semihalf 3235537Sgber * All rights reserved. 4235537Sgber * 5235537Sgber * Redistribution and use in source and binary forms, with or without 6235537Sgber * modification, are permitted provided that the following conditions 7235537Sgber * are met: 8235537Sgber * 1. Redistributions of source code must retain the above copyright 9235537Sgber * notice, this list of conditions and the following disclaimer. 10235537Sgber * 2. Redistributions in binary form must reproduce the above copyright 11235537Sgber * notice, this list of conditions and the following disclaimer in the 12235537Sgber * documentation and/or other materials provided with the distribution. 13235537Sgber * 14235537Sgber * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15235537Sgber * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16235537Sgber * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17235537Sgber * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18235537Sgber * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19235537Sgber * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20235537Sgber * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21235537Sgber * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22235537Sgber * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23235537Sgber * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24235537Sgber * SUCH DAMAGE. 25235537Sgber * 26235537Sgber * $FreeBSD$ 27235537Sgber */ 28235537Sgber 29235537Sgber#ifndef _NANDSIM_LOG_H 30235537Sgber#define _NANDSIM_LOG_H 31235537Sgber 32235537Sgber#include <dev/nand/nandsim_chip.h> 33235537Sgber 34235537Sgber#define NANDSIM_ENTRY_SIZE 128 35235537Sgber#define NANDSIM_ENTRY_COUNT 1024 36235537Sgber#define NANDSIM_RAM_LOG_SIZE 16384 37235537Sgber#define TIME_STR_SIZE 40 38235537Sgber 39235537Sgber#define NANDSIM_LOG_ERR 1 40235537Sgber#define NANDSIM_LOG_SM 5 41235537Sgber#define NANDSIM_LOG_EV 10 42235537Sgber#define NANDSIM_LOG_DATA 15 43235537Sgber 44235537Sgberextern int nandsim_log_level; 45235537Sgberextern int nandsim_log_output; 46235537Sgber 47235537Sgberint nandsim_log_init(struct nandsim_softc *, char *); 48235537Sgbervoid nandsim_log_close(struct nandsim_softc *); 49235537Sgbervoid nandsim_log(struct nandsim_chip *, int, const char *, ...); 50235537Sgber 51235537Sgber#endif /* _NANDSIM_LOG_H */ 52235537Sgber 53