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.
22 #include <dspbridge/cfgdefs.h>
23 #include <dspbridge/devdefs.h>
25 #include <dspbridge/iodefs.h>
28 * ======== io_create ========
30 * Create an IO manager object, responsible for managing IO between
33 * channel_mgr: Location to store a channel manager object on
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..
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.
47 * io_init(void) called.
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 ========
59 * Destroy the IO manager.
61 * hio_mgr: IOmanager object.
64 * -EFAULT: hio_mgr was invalid.
66 * io_init(void) called.
69 extern int io_destroy(struct io_mgr *hio_mgr);
72 * ======== io_exit ========
74 * Discontinue usage of the IO module.
78 * io_init(void) previously called.
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 ========
88 * Initialize the IO module's private state.
91 * TRUE if initialized; FALSE if error occurred.
94 * A requirement for each of the other public CHNL functions.
96 extern bool io_init(void);
99 * ======== io_on_loaded ========
101 * Called when a program is loaded so IO manager can update its
104 * hio_mgr: IOmanager object.
107 * -EFAULT: hio_mgr was invalid.
109 * io_init(void) called.
112 extern int io_on_loaded(struct io_mgr *hio_mgr);