xref: /OK3568_Linux_fs/kernel/drivers/char/xilinx_hwicap/fifo_icap.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /*****************************************************************************
2*4882a593Smuzhiyun  *
3*4882a593Smuzhiyun  *     Author: Xilinx, Inc.
4*4882a593Smuzhiyun  *
5*4882a593Smuzhiyun  *     This program is free software; you can redistribute it and/or modify it
6*4882a593Smuzhiyun  *     under the terms of the GNU General Public License as published by the
7*4882a593Smuzhiyun  *     Free Software Foundation; either version 2 of the License, or (at your
8*4882a593Smuzhiyun  *     option) any later version.
9*4882a593Smuzhiyun  *
10*4882a593Smuzhiyun  *     XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS"
11*4882a593Smuzhiyun  *     AS A COURTESY TO YOU, SOLELY FOR USE IN DEVELOPING PROGRAMS AND
12*4882a593Smuzhiyun  *     SOLUTIONS FOR XILINX DEVICES.  BY PROVIDING THIS DESIGN, CODE,
13*4882a593Smuzhiyun  *     OR INFORMATION AS ONE POSSIBLE IMPLEMENTATION OF THIS FEATURE,
14*4882a593Smuzhiyun  *     APPLICATION OR STANDARD, XILINX IS MAKING NO REPRESENTATION
15*4882a593Smuzhiyun  *     THAT THIS IMPLEMENTATION IS FREE FROM ANY CLAIMS OF INFRINGEMENT,
16*4882a593Smuzhiyun  *     AND YOU ARE RESPONSIBLE FOR OBTAINING ANY RIGHTS YOU MAY REQUIRE
17*4882a593Smuzhiyun  *     FOR YOUR IMPLEMENTATION.  XILINX EXPRESSLY DISCLAIMS ANY
18*4882a593Smuzhiyun  *     WARRANTY WHATSOEVER WITH RESPECT TO THE ADEQUACY OF THE
19*4882a593Smuzhiyun  *     IMPLEMENTATION, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OR
20*4882a593Smuzhiyun  *     REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE FROM CLAIMS OF
21*4882a593Smuzhiyun  *     INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
22*4882a593Smuzhiyun  *     FOR A PARTICULAR PURPOSE.
23*4882a593Smuzhiyun  *
24*4882a593Smuzhiyun  *     (c) Copyright 2007-2008 Xilinx Inc.
25*4882a593Smuzhiyun  *     All rights reserved.
26*4882a593Smuzhiyun  *
27*4882a593Smuzhiyun  *     You should have received a copy of the GNU General Public License along
28*4882a593Smuzhiyun  *     with this program; if not, write to the Free Software Foundation, Inc.,
29*4882a593Smuzhiyun  *     675 Mass Ave, Cambridge, MA 02139, USA.
30*4882a593Smuzhiyun  *
31*4882a593Smuzhiyun  *****************************************************************************/
32*4882a593Smuzhiyun 
33*4882a593Smuzhiyun #ifndef XILINX_FIFO_ICAP_H_	/* prevent circular inclusions */
34*4882a593Smuzhiyun #define XILINX_FIFO_ICAP_H_	/* by using protection macros */
35*4882a593Smuzhiyun 
36*4882a593Smuzhiyun #include <linux/types.h>
37*4882a593Smuzhiyun #include <linux/cdev.h>
38*4882a593Smuzhiyun #include <linux/platform_device.h>
39*4882a593Smuzhiyun 
40*4882a593Smuzhiyun #include <asm/io.h>
41*4882a593Smuzhiyun #include "xilinx_hwicap.h"
42*4882a593Smuzhiyun 
43*4882a593Smuzhiyun /* Reads integers from the device into the storage buffer. */
44*4882a593Smuzhiyun int fifo_icap_get_configuration(
45*4882a593Smuzhiyun 		struct hwicap_drvdata *drvdata,
46*4882a593Smuzhiyun 		u32 *FrameBuffer,
47*4882a593Smuzhiyun 		u32 NumWords);
48*4882a593Smuzhiyun 
49*4882a593Smuzhiyun /* Writes integers to the device from the storage buffer. */
50*4882a593Smuzhiyun int fifo_icap_set_configuration(
51*4882a593Smuzhiyun 		struct hwicap_drvdata *drvdata,
52*4882a593Smuzhiyun 		u32 *FrameBuffer,
53*4882a593Smuzhiyun 		u32 NumWords);
54*4882a593Smuzhiyun 
55*4882a593Smuzhiyun u32 fifo_icap_get_status(struct hwicap_drvdata *drvdata);
56*4882a593Smuzhiyun void fifo_icap_reset(struct hwicap_drvdata *drvdata);
57*4882a593Smuzhiyun void fifo_icap_flush_fifo(struct hwicap_drvdata *drvdata);
58*4882a593Smuzhiyun 
59*4882a593Smuzhiyun #endif
60