diff options
author | Jonathan Corbet <corbet@lwn.net> | 2010-04-23 10:04:12 -0600 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2010-05-07 17:17:38 -0600 |
commit | 3d28eb42c52a799c806082e6d856f634ed1db902 (patch) | |
tree | ca39bb9655c48a59f7a0ea5af3023d3bf8153dab /drivers/video/via/via-core.h | |
parent | 94dd1a856b23bd51dfebf68e6dd63cfd4d4fd5ae (diff) | |
download | lwn-3d28eb42c52a799c806082e6d856f634ed1db902.tar.gz lwn-3d28eb42c52a799c806082e6d856f634ed1db902.zip |
viafb: Add a simple VX855 DMA engine driver
This code provides a minimal amount of access to the DMA engine as
needed by the camera driver. VX855 only; it's guaranteed not to work
on other chipsets, so it won't try.
Cc: ScottFang@viatech.com.cn
Cc: JosephChan@via.com.tw
Cc: Harald Welte <laforge@gnumonks.org>
Acked-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'drivers/video/via/via-core.h')
-rw-r--r-- | drivers/video/via/via-core.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/drivers/video/via/via-core.h b/drivers/video/via/via-core.h index ba64b36d58e3..3d03141d6074 100644 --- a/drivers/video/via/via-core.h +++ b/drivers/video/via/via-core.h @@ -131,4 +131,33 @@ void viafb_irq_disable(u32 mask); #define VDE_I_LVDSSIEN 0x40000000 /* LVDS Sense enable */ #define VDE_I_ENABLE 0x80000000 /* Global interrupt enable */ +/* + * DMA management. + */ +int viafb_request_dma(void); +void viafb_release_dma(void); +/* void viafb_dma_copy_out(unsigned int offset, dma_addr_t paddr, int len); */ +int viafb_dma_copy_out_sg(unsigned int offset, struct scatterlist *sg, int nsg); + +/* + * DMA Controller registers. + */ +#define VDMA_MR0 0xe00 /* Mod reg 0 */ +#define VDMA_MR_CHAIN 0x01 /* Chaining mode */ +#define VDMA_MR_TDIE 0x02 /* Transfer done int enable */ +#define VDMA_CSR0 0xe04 /* Control/status */ +#define VDMA_C_ENABLE 0x01 /* DMA Enable */ +#define VDMA_C_START 0x02 /* Start a transfer */ +#define VDMA_C_ABORT 0x04 /* Abort a transfer */ +#define VDMA_C_DONE 0x08 /* Transfer is done */ +#define VDMA_MARL0 0xe20 /* Mem addr low */ +#define VDMA_MARH0 0xe24 /* Mem addr high */ +#define VDMA_DAR0 0xe28 /* Device address */ +#define VDMA_DQWCR0 0xe2c /* Count (16-byte) */ +#define VDMA_TMR0 0xe30 /* Tile mode reg */ +#define VDMA_DPRL0 0xe34 /* Not sure */ +#define VDMA_DPR_IN 0x08 /* Inbound transfer to FB */ +#define VDMA_DPRH0 0xe38 +#define VDMA_PMR0 (0xe00 + 0x134) /* Pitch mode */ + #endif /* __VIA_CORE_H__ */ |