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>
28 /* IO manager attributes: */
30 u8 birq; /* Channel's I/O IRQ number. */
31 bool irq_shared; /* TRUE if the IRQ is shareable. */
32 u32 word_size; /* DSP Word size. */
33 u32 shm_base; /* Physical base address of shared memory. */
34 u32 sm_length; /* Size (in bytes) of shared memory. */
39 * ======== io_create ========
41 * Create an IO manager object, responsible for managing IO between
44 * channel_mgr: Location to store a channel manager object on
46 * hdev_obj: Handle to a device object.
47 * mgr_attrts: IO manager attributes.
48 * mgr_attrts->birq: I/O IRQ number.
49 * mgr_attrts->irq_shared: TRUE if the IRQ is shareable.
50 * mgr_attrts->word_size: DSP Word size in equivalent PC bytes..
53 * -ENOMEM: Insufficient memory for requested resources.
54 * -EIO: Unable to plug channel ISR for configured IRQ.
55 * -EINVAL: Invalid DSP word size (must be > 0).
56 * Invalid base address for DSP communications.
62 extern int io_create(struct io_mgr **io_man,
63 struct dev_object *hdev_obj,
64 const struct io_attrs *mgr_attrts);
67 * ======== io_destroy ========
69 * Destroy the IO manager.
71 * hio_mgr: IOmanager object.
74 * -EFAULT: hio_mgr was invalid.
78 extern int io_destroy(struct io_mgr *hio_mgr);