GUI: Fix Tomato RAF theme for all builds. Compilation typo.
[tomato.git] / release / src-rt-6.x.4708 / linux / linux-2.6.36 / drivers / staging / tidspbridge / include / dspbridge / io.h
blobbc346f9a01c1d81130f81e3b2bed46928db496fc
1 /*
2 * io.h
4 * DSP-BIOS Bridge driver support functions for TI OMAP processors.
6 * The io module manages IO between CHNL and msg_ctrl.
8 * Copyright (C) 2005-2006 Texas Instruments, Inc.
10 * This package is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
14 * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
15 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
16 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
19 #ifndef IO_
20 #define IO_
22 #include <dspbridge/cfgdefs.h>
23 #include <dspbridge/devdefs.h>
25 #include <dspbridge/iodefs.h>
28 * ======== io_create ========
29 * Purpose:
30 * Create an IO manager object, responsible for managing IO between
31 * CHNL and msg_ctrl.
32 * Parameters:
33 * channel_mgr: Location to store a channel manager object on
34 * output.
35 * hdev_obj: Handle to a device object.
36 * mgr_attrts: IO manager attributes.
37 * mgr_attrts->birq: I/O IRQ number.
38 * mgr_attrts->irq_shared: TRUE if the IRQ is shareable.
39 * mgr_attrts->word_size: DSP Word size in equivalent PC bytes..
40 * Returns:
41 * 0: Success;
42 * -ENOMEM: Insufficient memory for requested resources.
43 * -EIO: Unable to plug channel ISR for configured IRQ.
44 * -EINVAL: Invalid DSP word size (must be > 0).
45 * Invalid base address for DSP communications.
46 * Requires:
47 * io_init(void) called.
48 * io_man != NULL.
49 * mgr_attrts != NULL.
50 * Ensures:
52 extern int io_create(struct io_mgr **io_man,
53 struct dev_object *hdev_obj,
54 const struct io_attrs *mgr_attrts);
57 * ======== io_destroy ========
58 * Purpose:
59 * Destroy the IO manager.
60 * Parameters:
61 * hio_mgr: IOmanager object.
62 * Returns:
63 * 0: Success.
64 * -EFAULT: hio_mgr was invalid.
65 * Requires:
66 * io_init(void) called.
67 * Ensures:
69 extern int io_destroy(struct io_mgr *hio_mgr);
72 * ======== io_exit ========
73 * Purpose:
74 * Discontinue usage of the IO module.
75 * Parameters:
76 * Returns:
77 * Requires:
78 * io_init(void) previously called.
79 * Ensures:
80 * Resources, if any acquired in io_init(void), are freed when the last
81 * client of IO calls io_exit(void).
83 extern void io_exit(void);
86 * ======== io_init ========
87 * Purpose:
88 * Initialize the IO module's private state.
89 * Parameters:
90 * Returns:
91 * TRUE if initialized; FALSE if error occurred.
92 * Requires:
93 * Ensures:
94 * A requirement for each of the other public CHNL functions.
96 extern bool io_init(void);
99 * ======== io_on_loaded ========
100 * Purpose:
101 * Called when a program is loaded so IO manager can update its
102 * internal state.
103 * Parameters:
104 * hio_mgr: IOmanager object.
105 * Returns:
106 * 0: Success.
107 * -EFAULT: hio_mgr was invalid.
108 * Requires:
109 * io_init(void) called.
110 * Ensures:
112 extern int io_on_loaded(struct io_mgr *hio_mgr);
114 #endif /* CHNL_ */