diff options
author | Ben Dooks <ben-linux@fluff.org> | 2007-02-13 07:02:52 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2007-02-14 10:04:22 -0500 |
commit | 0c6022d453ecebdace0ce15434c7108e158149ca (patch) | |
tree | 153ce6dd661059601fa8591d36e0b81c6663566a /include/asm-arm/plat-s3c24xx | |
parent | d2a76020e3a52c6370a7d603082b4cdb3db0703e (diff) |
[ARM] 4177/1: S3C24XX: Add DMA channel allocation order
Allow the CPU code, and any board specific initialisation
code to change the allocation order of the DMA channels,
or stop a peripheral allocating any DMA at-all.
This is due to the scarce mapping of DMA channels on
some earlier S3C24XX cpus, where the selection changes
depending on the channel in use.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'include/asm-arm/plat-s3c24xx')
-rw-r--r-- | include/asm-arm/plat-s3c24xx/dma.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/include/asm-arm/plat-s3c24xx/dma.h b/include/asm-arm/plat-s3c24xx/dma.h index 421b567fa019..15e140c2d4fc 100644 --- a/include/asm-arm/plat-s3c24xx/dma.h +++ b/include/asm-arm/plat-s3c24xx/dma.h | |||
@@ -14,6 +14,7 @@ extern struct sysdev_class dma_sysclass; | |||
14 | extern struct s3c2410_dma_chan s3c2410_chans[S3C2410_DMA_CHANNELS]; | 14 | extern struct s3c2410_dma_chan s3c2410_chans[S3C2410_DMA_CHANNELS]; |
15 | 15 | ||
16 | #define DMA_CH_VALID (1<<31) | 16 | #define DMA_CH_VALID (1<<31) |
17 | #define DMA_CH_NEVER (1<<30) | ||
17 | 18 | ||
18 | struct s3c24xx_dma_addr { | 19 | struct s3c24xx_dma_addr { |
19 | unsigned long from; | 20 | unsigned long from; |
@@ -43,3 +44,27 @@ struct s3c24xx_dma_selection { | |||
43 | }; | 44 | }; |
44 | 45 | ||
45 | extern int s3c24xx_dma_init_map(struct s3c24xx_dma_selection *sel); | 46 | extern int s3c24xx_dma_init_map(struct s3c24xx_dma_selection *sel); |
47 | |||
48 | /* struct s3c24xx_dma_order_ch | ||
49 | * | ||
50 | * channel map for one of the `enum dma_ch` dma channels. the list | ||
51 | * entry contains a set of low-level channel numbers, orred with | ||
52 | * DMA_CH_VALID, which are checked in the order in the array. | ||
53 | */ | ||
54 | |||
55 | struct s3c24xx_dma_order_ch { | ||
56 | unsigned int list[S3C2410_DMA_CHANNELS]; /* list of channels */ | ||
57 | unsigned int flags; /* flags */ | ||
58 | }; | ||
59 | |||
60 | /* struct s3c24xx_dma_order | ||
61 | * | ||
62 | * information provided by either the core or the board to give the | ||
63 | * dma system a hint on how to allocate channels | ||
64 | */ | ||
65 | |||
66 | struct s3c24xx_dma_order { | ||
67 | struct s3c24xx_dma_order_ch channels[DMACH_MAX]; | ||
68 | }; | ||
69 | |||
70 | extern int s3c24xx_dma_order_set(struct s3c24xx_dma_order *map); | ||