/** 
 * fxcpldlocal.h
 *
 * Copyright (C) 2012, 2013 Fuji Xerox Co.,Ltd. All rights reserved.
 *
 * This is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program; if not, write to the Free Software Foundation, Inc., 59
 * Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 *
 * The full GNU General Public License is included in this distribution in the
 * file called COPYING.
 */
#ifndef __FX_CPLD_LOCAL_H
#define __FX_CPLD_LOCAL_H 
#ifdef __cplusplus
extern "C" {
#endif
#define FXCPLD_DRIVER_VERSION "FX CPLD Driver Ver0.5.3"
#define FXCPLD_DRIVER_AUTHOR "Fuji Xerox Co.,Ltd."
#define FXCPLD_MINOR_NUM0 0
#define FXCPLD_MINOR_COUNT 1
#define FXCPLD_DRIVER_NAME "fxcpld"
typedef struct {
        struct of_device *pdev;
        unsigned int irq;
        struct cdev *cdev;
        dev_t dev_first;
        atomic_t open_flag;
        int fx_cpld_len;
        unsigned long fx_cpld_base;
        void *pfx_cpld_map;
#define FXCPLD_MAX_INT_QUE 2
        int int_enq;
        int int_deq;
        unsigned int int_que[FXCPLD_MAX_INT_QUE];
        wait_queue_head_t wq[FX_CPLD_MAX_INT_FACTOR];
        spinlock_t update_lock;
        spinlock_t m_write_lock;
        int suspend_state;
        unsigned int int_factor;
        unsigned int callback_factor;
        irq_handler_t handler;
        int handler_irq;
        void *handler_devid;
        struct tasklet_struct tasklet;
} fxcpld_dev_tbl;
#ifdef __cplusplus
}
#endif
#endif
