diff options
author | Ben Dooks <ben-linux@fluff.org> | 2010-02-20 18:01:33 -0500 |
---|---|---|
committer | Ben Dooks <ben-linux@fluff.org> | 2010-02-21 18:10:35 -0500 |
commit | 992426bfe98e71db1ce767fd66f6c68ed18fcc14 (patch) | |
tree | 6abd29441da0a9764dabedbbff7eb27d30fda406 /arch/arm | |
parent | 431fb7df24ebf360ba35895a60d084de364e39f8 (diff) |
ARM: SAMSUNG: Remove dma-plat.h to allow plat-s3c64xx to be removed
dma-plat.h is the last file left in plat-s3c64xx, but to remove it we
must also change the use of dma-plat.h by the core code and the s3c24xx
implementation.
Rename the s3c24xx dma-plat.h in the common plat-samsung directory as it
may be used for other ports. Move the specific dma bits into the
mach-s3c64xx directory and update the build as needed.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-s3c2410/dma.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-s3c2412/dma.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-s3c2440/dma.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-s3c2443/dma.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-s3c64xx/dma.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-s3c64xx/include/mach/dma.h | 57 | ||||
-rw-r--r-- | arch/arm/plat-s3c/dma.c | 2 | ||||
-rw-r--r-- | arch/arm/plat-s3c24xx/dma.c | 2 | ||||
-rw-r--r-- | arch/arm/plat-s3c64xx/include/plat/dma-plat.h | 70 | ||||
-rw-r--r-- | arch/arm/plat-samsung/include/plat/dma-s3c24xx.h (renamed from arch/arm/plat-s3c24xx/include/plat/dma-plat.h) | 4 |
10 files changed, 64 insertions, 80 deletions
diff --git a/arch/arm/mach-s3c2410/dma.c b/arch/arm/mach-s3c2410/dma.c index 63b753f56c64..0d8e043804c2 100644 --- a/arch/arm/mach-s3c2410/dma.c +++ b/arch/arm/mach-s3c2410/dma.c | |||
@@ -21,7 +21,7 @@ | |||
21 | #include <mach/dma.h> | 21 | #include <mach/dma.h> |
22 | 22 | ||
23 | #include <plat/cpu.h> | 23 | #include <plat/cpu.h> |
24 | #include <plat/dma-plat.h> | 24 | #include <plat/dma-s3c24xx.h> |
25 | 25 | ||
26 | #include <plat/regs-serial.h> | 26 | #include <plat/regs-serial.h> |
27 | #include <mach/regs-gpio.h> | 27 | #include <mach/regs-gpio.h> |
diff --git a/arch/arm/mach-s3c2412/dma.c b/arch/arm/mach-s3c2412/dma.c index f8d16fc10bc6..e880524904eb 100644 --- a/arch/arm/mach-s3c2412/dma.c +++ b/arch/arm/mach-s3c2412/dma.c | |||
@@ -20,7 +20,7 @@ | |||
20 | 20 | ||
21 | #include <mach/dma.h> | 21 | #include <mach/dma.h> |
22 | 22 | ||
23 | #include <plat/dma-plat.h> | 23 | #include <plat/dma-s3c24xx.h> |
24 | #include <plat/cpu.h> | 24 | #include <plat/cpu.h> |
25 | 25 | ||
26 | #include <plat/regs-serial.h> | 26 | #include <plat/regs-serial.h> |
diff --git a/arch/arm/mach-s3c2440/dma.c b/arch/arm/mach-s3c2440/dma.c index e08e081430f0..3b0529f54e9c 100644 --- a/arch/arm/mach-s3c2440/dma.c +++ b/arch/arm/mach-s3c2440/dma.c | |||
@@ -20,7 +20,7 @@ | |||
20 | #include <mach/map.h> | 20 | #include <mach/map.h> |
21 | #include <mach/dma.h> | 21 | #include <mach/dma.h> |
22 | 22 | ||
23 | #include <plat/dma-plat.h> | 23 | #include <plat/dma-s3c24xx.h> |
24 | #include <plat/cpu.h> | 24 | #include <plat/cpu.h> |
25 | 25 | ||
26 | #include <plat/regs-serial.h> | 26 | #include <plat/regs-serial.h> |
diff --git a/arch/arm/mach-s3c2443/dma.c b/arch/arm/mach-s3c2443/dma.c index 397f3b5c0b47..3f658685ec16 100644 --- a/arch/arm/mach-s3c2443/dma.c +++ b/arch/arm/mach-s3c2443/dma.c | |||
@@ -20,7 +20,7 @@ | |||
20 | 20 | ||
21 | #include <mach/dma.h> | 21 | #include <mach/dma.h> |
22 | 22 | ||
23 | #include <plat/dma-plat.h> | 23 | #include <plat/dma-s3c24xx.h> |
24 | #include <plat/cpu.h> | 24 | #include <plat/cpu.h> |
25 | 25 | ||
26 | #include <plat/regs-serial.h> | 26 | #include <plat/regs-serial.h> |
diff --git a/arch/arm/mach-s3c64xx/dma.c b/arch/arm/mach-s3c64xx/dma.c index 0e0edf75e8ed..b62bdf18dca4 100644 --- a/arch/arm/mach-s3c64xx/dma.c +++ b/arch/arm/mach-s3c64xx/dma.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include <mach/map.h> | 27 | #include <mach/map.h> |
28 | #include <mach/irqs.h> | 28 | #include <mach/irqs.h> |
29 | 29 | ||
30 | #include <plat/dma-plat.h> | ||
31 | #include <mach/regs-sys.h> | 30 | #include <mach/regs-sys.h> |
32 | 31 | ||
33 | #include <asm/hardware/pl080.h> | 32 | #include <asm/hardware/pl080.h> |
diff --git a/arch/arm/mach-s3c64xx/include/mach/dma.h b/arch/arm/mach-s3c64xx/include/mach/dma.h index 6723860748be..0a5d9268a23e 100644 --- a/arch/arm/mach-s3c64xx/include/mach/dma.h +++ b/arch/arm/mach-s3c64xx/include/mach/dma.h | |||
@@ -67,4 +67,61 @@ static __inline__ bool s3c_dma_has_circular(void) | |||
67 | 67 | ||
68 | #include <plat/dma.h> | 68 | #include <plat/dma.h> |
69 | 69 | ||
70 | #define DMACH_LOW_LEVEL (1<<28) /* use this to specifiy hardware ch no */ | ||
71 | |||
72 | struct s3c64xx_dma_buff; | ||
73 | |||
74 | /** s3c64xx_dma_buff - S3C64XX DMA buffer descriptor | ||
75 | * @next: Pointer to next buffer in queue or ring. | ||
76 | * @pw: Client provided identifier | ||
77 | * @lli: Pointer to hardware descriptor this buffer is associated with. | ||
78 | * @lli_dma: Hardare address of the descriptor. | ||
79 | */ | ||
80 | struct s3c64xx_dma_buff { | ||
81 | struct s3c64xx_dma_buff *next; | ||
82 | |||
83 | void *pw; | ||
84 | struct pl080s_lli *lli; | ||
85 | dma_addr_t lli_dma; | ||
86 | }; | ||
87 | |||
88 | struct s3c64xx_dmac; | ||
89 | |||
90 | struct s3c2410_dma_chan { | ||
91 | unsigned char number; /* number of this dma channel */ | ||
92 | unsigned char in_use; /* channel allocated */ | ||
93 | unsigned char bit; /* bit for enable/disable/etc */ | ||
94 | unsigned char hw_width; | ||
95 | unsigned char peripheral; | ||
96 | |||
97 | unsigned int flags; | ||
98 | enum s3c2410_dmasrc source; | ||
99 | |||
100 | |||
101 | dma_addr_t dev_addr; | ||
102 | |||
103 | struct s3c2410_dma_client *client; | ||
104 | struct s3c64xx_dmac *dmac; /* pointer to controller */ | ||
105 | |||
106 | void __iomem *regs; | ||
107 | |||
108 | /* cdriver callbacks */ | ||
109 | s3c2410_dma_cbfn_t callback_fn; /* buffer done callback */ | ||
110 | s3c2410_dma_opfn_t op_fn; /* channel op callback */ | ||
111 | |||
112 | /* buffer list and information */ | ||
113 | struct s3c64xx_dma_buff *curr; /* current dma buffer */ | ||
114 | struct s3c64xx_dma_buff *next; /* next buffer to load */ | ||
115 | struct s3c64xx_dma_buff *end; /* end of queue */ | ||
116 | |||
117 | /* note, when channel is running in circular mode, curr is the | ||
118 | * first buffer enqueued, end is the last and curr is where the | ||
119 | * last buffer-done event is set-at. The buffers are not freed | ||
120 | * and the last buffer hardware descriptor points back to the | ||
121 | * first. | ||
122 | */ | ||
123 | }; | ||
124 | |||
125 | #include <plat/dma-core.h> | ||
126 | |||
70 | #endif /* __ASM_ARCH_IRQ_H */ | 127 | #endif /* __ASM_ARCH_IRQ_H */ |
diff --git a/arch/arm/plat-s3c/dma.c b/arch/arm/plat-s3c/dma.c index a995850cd9d5..606db1af5fe7 100644 --- a/arch/arm/plat-s3c/dma.c +++ b/arch/arm/plat-s3c/dma.c | |||
@@ -20,8 +20,6 @@ struct s3c2410_dma_buf; | |||
20 | #include <mach/dma.h> | 20 | #include <mach/dma.h> |
21 | #include <mach/irqs.h> | 21 | #include <mach/irqs.h> |
22 | 22 | ||
23 | #include <plat/dma-plat.h> | ||
24 | |||
25 | /* dma channel state information */ | 23 | /* dma channel state information */ |
26 | struct s3c2410_dma_chan s3c2410_chans[S3C_DMA_CHANNELS]; | 24 | struct s3c2410_dma_chan s3c2410_chans[S3C_DMA_CHANNELS]; |
27 | struct s3c2410_dma_chan *s3c_dma_chan_map[DMACH_MAX]; | 25 | struct s3c2410_dma_chan *s3c_dma_chan_map[DMACH_MAX]; |
diff --git a/arch/arm/plat-s3c24xx/dma.c b/arch/arm/plat-s3c24xx/dma.c index f0ea7943ac5a..93827b3d4e84 100644 --- a/arch/arm/plat-s3c24xx/dma.c +++ b/arch/arm/plat-s3c24xx/dma.c | |||
@@ -33,7 +33,7 @@ | |||
33 | #include <mach/dma.h> | 33 | #include <mach/dma.h> |
34 | #include <mach/map.h> | 34 | #include <mach/map.h> |
35 | 35 | ||
36 | #include <plat/dma-plat.h> | 36 | #include <plat/dma-s3c24xx.h> |
37 | #include <plat/regs-dma.h> | 37 | #include <plat/regs-dma.h> |
38 | 38 | ||
39 | /* io map for dma */ | 39 | /* io map for dma */ |
diff --git a/arch/arm/plat-s3c64xx/include/plat/dma-plat.h b/arch/arm/plat-s3c64xx/include/plat/dma-plat.h deleted file mode 100644 index 8f76a1e474d6..000000000000 --- a/arch/arm/plat-s3c64xx/include/plat/dma-plat.h +++ /dev/null | |||
@@ -1,70 +0,0 @@ | |||
1 | /* linux/arch/arm/plat-s3c64xx/include/plat/dma-plat.h | ||
2 | * | ||
3 | * Copyright 2009 Openmoko, Inc. | ||
4 | * Copyright 2009 Simtec Electronics | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * http://armlinux.simtec.co.uk/ | ||
7 | * | ||
8 | * S3C64XX DMA core | ||
9 | * | ||
10 | * This program 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. | ||
13 | */ | ||
14 | |||
15 | #define DMACH_LOW_LEVEL (1<<28) /* use this to specifiy hardware ch no */ | ||
16 | |||
17 | struct s3c64xx_dma_buff; | ||
18 | |||
19 | /** s3c64xx_dma_buff - S3C64XX DMA buffer descriptor | ||
20 | * @next: Pointer to next buffer in queue or ring. | ||
21 | * @pw: Client provided identifier | ||
22 | * @lli: Pointer to hardware descriptor this buffer is associated with. | ||
23 | * @lli_dma: Hardare address of the descriptor. | ||
24 | */ | ||
25 | struct s3c64xx_dma_buff { | ||
26 | struct s3c64xx_dma_buff *next; | ||
27 | |||
28 | void *pw; | ||
29 | struct pl080s_lli *lli; | ||
30 | dma_addr_t lli_dma; | ||
31 | }; | ||
32 | |||
33 | struct s3c64xx_dmac; | ||
34 | |||
35 | struct s3c2410_dma_chan { | ||
36 | unsigned char number; /* number of this dma channel */ | ||
37 | unsigned char in_use; /* channel allocated */ | ||
38 | unsigned char bit; /* bit for enable/disable/etc */ | ||
39 | unsigned char hw_width; | ||
40 | unsigned char peripheral; | ||
41 | |||
42 | unsigned int flags; | ||
43 | enum s3c2410_dmasrc source; | ||
44 | |||
45 | |||
46 | dma_addr_t dev_addr; | ||
47 | |||
48 | struct s3c2410_dma_client *client; | ||
49 | struct s3c64xx_dmac *dmac; /* pointer to controller */ | ||
50 | |||
51 | void __iomem *regs; | ||
52 | |||
53 | /* cdriver callbacks */ | ||
54 | s3c2410_dma_cbfn_t callback_fn; /* buffer done callback */ | ||
55 | s3c2410_dma_opfn_t op_fn; /* channel op callback */ | ||
56 | |||
57 | /* buffer list and information */ | ||
58 | struct s3c64xx_dma_buff *curr; /* current dma buffer */ | ||
59 | struct s3c64xx_dma_buff *next; /* next buffer to load */ | ||
60 | struct s3c64xx_dma_buff *end; /* end of queue */ | ||
61 | |||
62 | /* note, when channel is running in circular mode, curr is the | ||
63 | * first buffer enqueued, end is the last and curr is where the | ||
64 | * last buffer-done event is set-at. The buffers are not freed | ||
65 | * and the last buffer hardware descriptor points back to the | ||
66 | * first. | ||
67 | */ | ||
68 | }; | ||
69 | |||
70 | #include <plat/dma-core.h> | ||
diff --git a/arch/arm/plat-s3c24xx/include/plat/dma-plat.h b/arch/arm/plat-samsung/include/plat/dma-s3c24xx.h index 9565ead1bc9b..336d5ac02035 100644 --- a/arch/arm/plat-s3c24xx/include/plat/dma-plat.h +++ b/arch/arm/plat-samsung/include/plat/dma-s3c24xx.h | |||
@@ -1,9 +1,9 @@ | |||
1 | /* linux/arch/arm/plat-s3c24xx/include/plat/dma-plat.h | 1 | /* linux/arch/arm/plat-samsung/include/plat/dma-s3c24xx.h |
2 | * | 2 | * |
3 | * Copyright (C) 2006 Simtec Electronics | 3 | * Copyright (C) 2006 Simtec Electronics |
4 | * Ben Dooks <ben@simtec.co.uk> | 4 | * Ben Dooks <ben@simtec.co.uk> |
5 | * | 5 | * |
6 | * Samsung S3C24XX DMA support | 6 | * Samsung S3C24XX DMA support - per SoC functions |
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |