ARM: MMP: add pxa-squ header file
A message that is not in the archive (sent off-list or not yet received): [email protected]
Haojian Zhuang
Acked-byQuoted 54 lines · Qiao Zhou
add pxa-squ header file to support SQU DMA.
Signed-off-by Qiao Zhou <[email protected]>---
arch/arm/mach-mmp/include/mach/pxa-squ.h | 39 ++++++++++++++++++++++++++++++1 files changed, 39 insertions(+), 0 deletions(-)create mode 100644
arch/arm/mach-mmp/include/mach/pxa-squ.harch/arm/mach-mmp/include/mach/pxa-squ.h new file +39
-1@@ -0,0 +1,39 @@ +#ifndef __MACH_SQU_H +#define __MACH_SQU_H + +#include <mach/addr-map.h> + +#define SQU_REGS_VIRT (AXI_VIRT_BASE + 0xA0000) +#define SQU_REG (x) (*((__iomem u32 *)(SQU_REGS_VIRT + (x)))) + +/*SQU*/ +#define SDSAR (x) SQU_REG(0x810 + ((x) << 2)) +#define SDDAR (x) SQU_REG(0x820 + ((x) << 2)) +#define SDNDPR (x) SQU_REG(0x830 + ((x) << 2)) +#define SDCR (x) SQU_REG(0x840 + ((x) << 2)) +#define SDIMR (x) SQU_REG(0x880 + ((x) << 2)) +#define SDISR (x) SQU_REG(0x8a0 + ((x) << 2)) +#define SDCR_SSPMOD (1 << 21)/* SSPMod */ +#define SDCR_FETCHND (1 << 13) +#define SDCR_CHANEN (1 << 12)/* Channel Enable */ +#define SDCR_DST_ADDR_INC (0 << 4) +#define SDCR_DST_ADDR_HOLD (0x2 << 4) +#define SDCR_SRC_ADDR_INC (0 << 2) +#define SDCR_SRC_ADDR_HOLD (0x2 << 2) +#define SDCR_DMA_BURST_4B (0x0 << 6) +#define SDCR_DMA_BURST_8B (0x1 << 6) +#define SDCR_DMA_BURST_16B (0x3 << 6) +#define SDCR_DMA_BURST_1B (0x5 << 6) +#define SDCR_DMA_BURST_2B (0x6 << 6) +#define SDCR_DMA_BURST_32B (0x7 << 6) +#define SDIMR_COMP (1 << 0) + +struct pxa_squ_platdata { + char *pool_name; + int irq; + int period_max_out; /* max period size for playback */ + int period_max_in; /* max period size for capture */ + int buffer_max_out; /* max buffer size for playback */ + int buffer_max_in; /* max buffer size for capture */ +}; +#endif /* __MACH_SQU_H */ --
Quoted 2 lines
1.7.4.1
Acked-by Haojian Zhuang <[email protected]>
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [PATCH 2/2] ASoC: add pxa-squ dma support
Review
Quoted 12 lines · Qiao Zhou
this patch adds ASoC pxa-squ DMA audio support.
Signed-off-by Qiao Zhou <[email protected]>(quoted diff) +9
-0+/* + * Descriptor structure for PXA's SQU engine + * Note: this structure must always be aligned to a 16-byte boundary. + */ +struct pxa_squ_desc { + __iomem u32 byte_cnt; /* byte count */ + __iomem u32 src_addr; /* source address */ + __iomem u32 dst_addr; /* target address */ + __iomem u32 nxt_desc; /* next descriptor dress */
Why do you use __iomem at here?
Quoted 2 lines
(quoted diff) +2
-0+}; +