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