diff options
author | Margarita Olaya <x0080101@ti.com> | 2009-10-09 21:40:40 -0500 |
---|---|---|
committer | Margarita Olaya Cabrera <x0080101@ti.com> | 2009-11-06 11:22:57 -0600 |
commit | 6035e41db3020a6ad7bd3e6a19c81d3046b5aefe (patch) | |
tree | 3f699749027df4c323f2209b5dace2e0ab8fe756 | |
parent | 5a75f9d6df293aed38292d2120dfa55fbe456303 (diff) |
ASoC: ABE: Mapping abe physical address to virtual address
Mapping the physical address to virtual address for ABE memory.
Signed-off-by: Margarita Olaya <x0080101@ti.com>
-rw-r--r-- | sound/soc/codecs/abe/abe_ext.h | 23 | ||||
-rw-r--r-- | sound/soc/codecs/abe/abe_lib.c | 28 |
2 files changed, 28 insertions, 23 deletions
diff --git a/sound/soc/codecs/abe/abe_ext.h b/sound/soc/codecs/abe/abe_ext.h index 2b6ee60e5f10..c5edf0efccc5 100644 --- a/sound/soc/codecs/abe/abe_ext.h +++ b/sound/soc/codecs/abe/abe_ext.h @@ -11,19 +11,24 @@ #ifndef _ABE_EXT_H_ #define _ABE_EXT_H_ +#include <linux/io.h> #define PC_SIMULATION 0 /* Tuning is done on PC ? */ /* * OS DEPENDENT MMU CONFIGURATION */ - -#define ABE_ATC_BASE_ADDRESS_L3 0x490F1000L /* base address used for L3/DMA access */ -#define ABE_DMEM_BASE_ADDRESS_L3 0x49080000L /* 64kB as seen from DMA access */ - -#define ABE_PMEM_BASE_ADDRESS_MPU 0x401E0000L /* 8kB as seen from MPU access */ -#define ABE_CMEM_BASE_ADDRESS_MPU 0x401A0000L /* 8kB +++++++++++++++++++++++ */ -#define ABE_SMEM_BASE_ADDRESS_MPU 0x401C0000L /* 24kB */ -#define ABE_DMEM_BASE_ADDRESS_MPU 0x40180000L /* 64kB */ -#define ABE_ATC_BASE_ADDRESS_MPU 0x401F1000L +#define ABE_ATC_BASE_ADDRESS_L3 L4_ABE_44XX_PHYS + 0xf1000 + /* base address used for L3/DMA access */ +#define ABE_DMEM_BASE_ADDRESS_L3 L4_ABE_44XX_PHYS + 0x80000 + /* 64kB as seen from DMA access */ +#define ABE_PMEM_BASE_ADDRESS_MPU OMAP2_L4_IO_ADDRESS(L4_ABE_44XX_PHYS) + 0xe0000 + /* 8kB as seen from MPU access */ +#define ABE_CMEM_BASE_ADDRESS_MPU OMAP2_L4_IO_ADDRESS(L4_ABE_44XX_PHYS) + 0xa0000 + /* 8kB */ +#define ABE_SMEM_BASE_ADDRESS_MPU OMAP2_L4_IO_ADDRESS(L4_ABE_44XX_PHYS) + 0xc0000 + /* 24kB */ +#define ABE_DMEM_BASE_ADDRESS_MPU OMAP2_L4_IO_ADDRESS(L4_ABE_44XX_PHYS) + 0x80000 + /* 64kB */ +#define ABE_ATC_BASE_ADDRESS_MPU OMAP2_L4_IO_ADDRESS(L4_ABE_44XX_PHYS) + 0xf1000 #endif /* _ABE_EXT_H_ */ diff --git a/sound/soc/codecs/abe/abe_lib.c b/sound/soc/codecs/abe/abe_lib.c index b988fdb8bfdb..3c8bd827324b 100644 --- a/sound/soc/codecs/abe/abe_lib.c +++ b/sound/soc/codecs/abe/abe_lib.c @@ -339,7 +339,7 @@ void abe_clear_memory(abe_int32 memory_bank, abe_int32 address, abe_uint32 nb_by } } #else - abe_uint32 base_address, *dst_ptr, *src_ptr; + abe_uint32 base_address = 0, *dst_ptr, *src_ptr; nb_bytes = (nb_bytes + 3) & (-4L); /* copy is done on 32bits boundaries */ if (address & (3L)) /* error ifstart address is not 32bits aligned */ @@ -347,22 +347,22 @@ void abe_clear_memory(abe_int32 memory_bank, abe_int32 address, abe_uint32 nb_by switch (memory_bank) { case ABE_PMEM: - base_address = ABE_PMEM_BASE_ADDRESS_MPU; + base_address = (abe_uint32) ABE_PMEM_BASE_ADDRESS_MPU; break; case ABE_CMEM: - base_address = ABE_CMEM_BASE_ADDRESS_MPU; + base_address = (abe_uint32) ABE_CMEM_BASE_ADDRESS_MPU; break; case ABE_SMEM: - base_address = ABE_SMEM_BASE_ADDRESS_MPU; + base_address = (abe_uint32) ABE_SMEM_BASE_ADDRESS_MPU; break; case ABE_DMEM: - base_address = ABE_DMEM_BASE_ADDRESS_MPU; + base_address = (abe_uint32) ABE_DMEM_BASE_ADDRESS_MPU; break; case ABE_ATC: - base_address = ABE_ATC_BASE_ADDRESS_MPU; + base_address = (abe_uint32) ABE_ATC_BASE_ADDRESS_MPU; break; default: - base_address = ABE_SMEM_BASE_ADDRESS_MPU; + base_address = (abe_uint32) ABE_SMEM_BASE_ADDRESS_MPU; abe_dbg_param |= ERR_LIB; abe_dbg_error_log(ABE_BLOCK_COPY_ERR); break; @@ -446,7 +446,7 @@ void abe_block_copy(abe_int32 direction, abe_int32 memory_bank, abe_int32 addres } #else abe_uint32 i; - abe_uint32 base_address, *src_ptr, *dst_ptr, n; + abe_uint32 base_address = 0, *src_ptr, *dst_ptr, n; nb_bytes = (nb_bytes + 3) & (-4L); /* copy is done on 32bits boundaries */ if (address & (3L)) /* error ifstart address is not 32bits aligned */ @@ -454,22 +454,22 @@ void abe_block_copy(abe_int32 direction, abe_int32 memory_bank, abe_int32 addres switch (memory_bank) { case ABE_PMEM: - base_address = ABE_PMEM_BASE_ADDRESS_MPU; + base_address = (abe_uint32) ABE_PMEM_BASE_ADDRESS_MPU; break; case ABE_CMEM: - base_address = ABE_CMEM_BASE_ADDRESS_MPU; + base_address = (abe_uint32) ABE_CMEM_BASE_ADDRESS_MPU; break; case ABE_SMEM: - base_address = ABE_SMEM_BASE_ADDRESS_MPU; + base_address = (abe_uint32) ABE_SMEM_BASE_ADDRESS_MPU; break; case ABE_DMEM: - base_address = ABE_DMEM_BASE_ADDRESS_MPU; + base_address = (abe_uint32) ABE_DMEM_BASE_ADDRESS_MPU; break; case ABE_ATC: - base_address = ABE_ATC_BASE_ADDRESS_MPU; + base_address = (abe_uint32) ABE_ATC_BASE_ADDRESS_MPU; break; default: - base_address = ABE_SMEM_BASE_ADDRESS_MPU; + base_address = (abe_uint32) ABE_SMEM_BASE_ADDRESS_MPU; abe_dbg_param |= ERR_LIB; abe_dbg_error_log(ABE_BLOCK_COPY_ERR); break; |