Add fatal_signal_pending
[linux-2.6/mini2440.git] / include / linux / cycx_drv.h
blob12fe6b0bfcff8e45de8b52b2710543a4a7da7c20
1 /*
2 * cycx_drv.h CYCX Support Module. Kernel API Definitions.
4 * Author: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
6 * Copyright: (c) 1998-2003 Arnaldo Carvalho de Melo
8 * Based on sdladrv.h by Gene Kozin <genek@compuserve.com>
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License
12 * as published by the Free Software Foundation; either version
13 * 2 of the License, or (at your option) any later version.
14 * ============================================================================
15 * 1999/10/23 acme cycxhw_t cleanup
16 * 1999/01/03 acme more judicious use of data types...
17 * uclong, ucchar, etc deleted, the u8, u16, u32
18 * types are the portable way to go.
19 * 1999/01/03 acme judicious use of data types... u16, u32, etc
20 * 1998/12/26 acme FIXED_BUFFERS, CONF_OFFSET,
21 * removal of cy_read{bwl}
22 * 1998/08/08 acme Initial version.
24 #ifndef _CYCX_DRV_H
25 #define _CYCX_DRV_H
27 #define CYCX_WINDOWSIZE 0x4000 /* default dual-port memory window size */
28 #define GEN_CYCX_INTR 0x02
29 #define RST_ENABLE 0x04
30 #define START_CPU 0x06
31 #define RST_DISABLE 0x08
32 #define FIXED_BUFFERS 0x08
33 #define TEST_PATTERN 0xaa55
34 #define CMD_OFFSET 0x20
35 #define CONF_OFFSET 0x0380
36 #define RESET_OFFSET 0x3c00 /* For reset file load */
37 #define DATA_OFFSET 0x0100 /* For code and data files load */
38 #define START_OFFSET 0x3ff0 /* 80186 starts here */
40 /**
41 * struct cycx_hw - Adapter hardware configuration
42 * @fwid - firmware ID
43 * @irq - interrupt request level
44 * @dpmbase - dual-port memory base
45 * @dpmsize - dual-port memory size
46 * @reserved - reserved for future use
48 struct cycx_hw {
49 u32 fwid;
50 int irq;
51 void __iomem *dpmbase;
52 u32 dpmsize;
53 u32 reserved[5];
56 /* Function Prototypes */
57 extern int cycx_setup(struct cycx_hw *hw, void *sfm, u32 len, unsigned long base);
58 extern int cycx_down(struct cycx_hw *hw);
59 extern int cycx_peek(struct cycx_hw *hw, u32 addr, void *buf, u32 len);
60 extern int cycx_poke(struct cycx_hw *hw, u32 addr, void *buf, u32 len);
61 extern int cycx_exec(void __iomem *addr);
63 extern void cycx_intr(struct cycx_hw *hw);
64 #endif /* _CYCX_DRV_H */