4
* DSP-BIOS Bridge driver support functions for TI OMAP processors.
6
* Definitions, types and function prototypes for the io (r/w external mem).
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.
23
* Symbol that defines beginning of shared memory.
24
* For OMAP (Helen) this is the DSP Virtual base address of SDRAM.
25
* This will be used to program DSP MMU to map DSP Virt to GPP phys.
26
* (see dspMmuTlbEntry()).
28
#define SHMBASENAME "SHM_BEG"
29
#define EXTBASE "EXT_BEG"
30
#define EXTEND "_EXT_END"
31
#define DYNEXTBASE "_DYNEXT_BEG"
32
#define DYNEXTEND "_DYNEXT_END"
33
#define IVAEXTMEMBASE "_IVAEXTMEM_BEG"
34
#define IVAEXTMEMEND "_IVAEXTMEM_END"
36
#define DSP_TRACESEC_BEG "_BRIDGE_TRACE_BEG"
37
#define DSP_TRACESEC_END "_BRIDGE_TRACE_END"
39
#define SYS_PUTCBEG "_SYS_PUTCBEG"
40
#define SYS_PUTCEND "_SYS_PUTCEND"
41
#define BRIDGE_SYS_PUTC_CURRENT "_BRIDGE_SYS_PUTC_current"
43
#define WORDSWAP_ENABLE 0x3 /* Enable word swap */
46
* ======== read_ext_dsp_data ========
47
* Reads it from DSP External memory. The external memory for the DSP
48
* is configured by the combination of DSP MMU and shm Memory manager in the CDB
50
extern int read_ext_dsp_data(struct bridge_dev_context *dev_ctxt,
51
u8 *host_buff, u32 dsp_addr,
52
u32 ul_num_bytes, u32 mem_type);
55
* ======== write_dsp_data ========
57
extern int write_dsp_data(struct bridge_dev_context *dev_context,
58
u8 *host_buff, u32 dsp_addr,
59
u32 ul_num_bytes, u32 mem_type);
62
* ======== write_ext_dsp_data ========
63
* Writes to the DSP External memory for external program.
64
* The ext mem for progra is configured by the combination of DSP MMU and
65
* shm Memory manager in the CDB
67
extern int write_ext_dsp_data(struct bridge_dev_context *dev_context,
68
u8 *host_buff, u32 dsp_addr,
69
u32 ul_num_bytes, u32 mem_type,
73
* ======== write_ext32_bit_dsp_data ========
74
* Writes 32 bit data to the external memory
76
extern inline void write_ext32_bit_dsp_data(const
77
struct bridge_dev_context *dev_context,
78
u32 dsp_addr, u32 val)
80
*(u32 *) dsp_addr = ((dev_context->tc_word_swap_on) ? (((val << 16) &
88
* ======== read_ext32_bit_dsp_data ========
89
* Reads 32 bit data from the external memory
91
extern inline u32 read_ext32_bit_dsp_data(const struct bridge_dev_context
92
*dev_context, u32 dsp_addr)
95
ret = *(u32 *) dsp_addr;
97
ret = ((dev_context->tc_word_swap_on) ? (((ret << 16)
98
& 0xFFFF0000) | ((ret >> 16) &
104
#endif /* _TIOMAP_IO_ */