nandsim_log.h revision 235537
1291464Sadrian/*- 2291464Sadrian * Copyright (C) 2009-2012 Semihalf 3291464Sadrian * All rights reserved. 4291464Sadrian * 5291464Sadrian * Redistribution and use in source and binary forms, with or without 6291464Sadrian * modification, are permitted provided that the following conditions 7291464Sadrian * are met: 8291464Sadrian * 1. Redistributions of source code must retain the above copyright 9291464Sadrian * notice, this list of conditions and the following disclaimer. 10291464Sadrian * 2. Redistributions in binary form must reproduce the above copyright 11291464Sadrian * notice, this list of conditions and the following disclaimer in the 12291464Sadrian * documentation and/or other materials provided with the distribution. 13291464Sadrian * 14291464Sadrian * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15291464Sadrian * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16291464Sadrian * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17291464Sadrian * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18291464Sadrian * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19291464Sadrian * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20291464Sadrian * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21291464Sadrian * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22291464Sadrian * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23291464Sadrian * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24291464Sadrian * SUCH DAMAGE. 25291464Sadrian * 26291464Sadrian * $FreeBSD: head/sys/dev/nand/nandsim_log.h 235537 2012-05-17 10:11:18Z gber $ 27291464Sadrian */ 28291464Sadrian 29291464Sadrian#ifndef _NANDSIM_LOG_H 30291464Sadrian#define _NANDSIM_LOG_H 31291464Sadrian 32291464Sadrian#include <dev/nand/nandsim_chip.h> 33291464Sadrian 34291464Sadrian#define NANDSIM_ENTRY_SIZE 128 35291464Sadrian#define NANDSIM_ENTRY_COUNT 1024 36291464Sadrian#define NANDSIM_RAM_LOG_SIZE 16384 37291464Sadrian#define TIME_STR_SIZE 40 38291464Sadrian 39291464Sadrian#define NANDSIM_LOG_ERR 1 40291464Sadrian#define NANDSIM_LOG_SM 5 41291464Sadrian#define NANDSIM_LOG_EV 10 42291464Sadrian#define NANDSIM_LOG_DATA 15 43291464Sadrian 44291464Sadrianextern int nandsim_log_level; 45291464Sadrianextern int nandsim_log_output; 46291464Sadrian 47291464Sadrianint nandsim_log_init(struct nandsim_softc *, char *); 48291464Sadrianvoid nandsim_log_close(struct nandsim_softc *); 49291464Sadrianvoid nandsim_log(struct nandsim_chip *, int, const char *, ...); 50291464Sadrian 51291464Sadrian#endif /* _NANDSIM_LOG_H */ 52291464Sadrian 53291464Sadrian