aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernd Schmidt <bernds_cb1@t-online.de>2008-04-23 17:31:18 -0400
committerBryan Wu <cooloney@kernel.org>2008-04-23 17:31:18 -0400
commit7795566495ff90c541a4654d3c903ab277abadfd (patch)
tree6366dc7e8f175758124c2ef525d53845101ba6ce
parentac86a9785384843e8359c45a042cc4f87953d4c8 (diff)
[Blackfin] arch: Give the DMA base registers a more descriptive name
The DMA base registers are available in a global named "base_addr" for every Blackfin variant. Give this a more descriptive name, and remove duplicate tables from some drivers. Signed-off-by: Bernd Schmidt <bernds_cb1@t-online.de> Signed-off-by: Bryan Wu <cooloney@kernel.org>
-rw-r--r--arch/blackfin/kernel/bfin_dma_5xx.c2
-rw-r--r--arch/blackfin/mach-bf527/dma.c4
-rw-r--r--arch/blackfin/mach-bf533/dma.c4
-rw-r--r--arch/blackfin/mach-bf537/dma.c4
-rw-r--r--arch/blackfin/mach-bf548/dma.c4
-rw-r--r--arch/blackfin/mach-bf561/dma.c4
-rw-r--r--include/asm-blackfin/dma.h3
-rw-r--r--include/asm-blackfin/mach-bf527/dma.h3
-rw-r--r--include/asm-blackfin/mach-bf533/dma.h3
-rw-r--r--include/asm-blackfin/mach-bf537/dma.h3
-rw-r--r--include/asm-blackfin/mach-bf548/dma.h2
-rw-r--r--include/asm-blackfin/mach-bf561/dma.h3
12 files changed, 14 insertions, 25 deletions
diff --git a/arch/blackfin/kernel/bfin_dma_5xx.c b/arch/blackfin/kernel/bfin_dma_5xx.c
index 8fd5d22cec34..18fc8a835944 100644
--- a/arch/blackfin/kernel/bfin_dma_5xx.c
+++ b/arch/blackfin/kernel/bfin_dma_5xx.c
@@ -67,7 +67,7 @@ static int __init blackfin_dma_init(void)
67 67
68 for (i = 0; i < MAX_BLACKFIN_DMA_CHANNEL; i++) { 68 for (i = 0; i < MAX_BLACKFIN_DMA_CHANNEL; i++) {
69 dma_ch[i].chan_status = DMA_CHANNEL_FREE; 69 dma_ch[i].chan_status = DMA_CHANNEL_FREE;
70 dma_ch[i].regs = base_addr[i]; 70 dma_ch[i].regs = dma_io_base_addr[i];
71 mutex_init(&(dma_ch[i].dmalock)); 71 mutex_init(&(dma_ch[i].dmalock));
72 } 72 }
73 /* Mark MEMDMA Channel 0 as requested since we're using it internally */ 73 /* Mark MEMDMA Channel 0 as requested since we're using it internally */
diff --git a/arch/blackfin/mach-bf527/dma.c b/arch/blackfin/mach-bf527/dma.c
index 0a82b154c082..dfd080cda787 100644
--- a/arch/blackfin/mach-bf527/dma.c
+++ b/arch/blackfin/mach-bf527/dma.c
@@ -31,7 +31,7 @@
31#include <asm/blackfin.h> 31#include <asm/blackfin.h>
32#include <asm/dma.h> 32#include <asm/dma.h>
33 33
34struct dma_register *base_addr[MAX_BLACKFIN_DMA_CHANNEL] = { 34struct dma_register *dma_io_base_addr[MAX_BLACKFIN_DMA_CHANNEL] = {
35 (struct dma_register *) DMA0_NEXT_DESC_PTR, 35 (struct dma_register *) DMA0_NEXT_DESC_PTR,
36 (struct dma_register *) DMA1_NEXT_DESC_PTR, 36 (struct dma_register *) DMA1_NEXT_DESC_PTR,
37 (struct dma_register *) DMA2_NEXT_DESC_PTR, 37 (struct dma_register *) DMA2_NEXT_DESC_PTR,
@@ -49,7 +49,7 @@ struct dma_register *base_addr[MAX_BLACKFIN_DMA_CHANNEL] = {
49 (struct dma_register *) MDMA_D1_NEXT_DESC_PTR, 49 (struct dma_register *) MDMA_D1_NEXT_DESC_PTR,
50 (struct dma_register *) MDMA_S1_NEXT_DESC_PTR, 50 (struct dma_register *) MDMA_S1_NEXT_DESC_PTR,
51}; 51};
52EXPORT_SYMBOL(base_addr); 52EXPORT_SYMBOL(dma_io_base_addr);
53 53
54int channel2irq(unsigned int channel) 54int channel2irq(unsigned int channel)
55{ 55{
diff --git a/arch/blackfin/mach-bf533/dma.c b/arch/blackfin/mach-bf533/dma.c
index 8d80efce396e..28655c1cb7dc 100644
--- a/arch/blackfin/mach-bf533/dma.c
+++ b/arch/blackfin/mach-bf533/dma.c
@@ -31,7 +31,7 @@
31#include <asm/blackfin.h> 31#include <asm/blackfin.h>
32#include <asm/dma.h> 32#include <asm/dma.h>
33 33
34struct dma_register *base_addr[MAX_BLACKFIN_DMA_CHANNEL] = { 34struct dma_register *dma_io_base_addr[MAX_BLACKFIN_DMA_CHANNEL] = {
35 (struct dma_register *) DMA0_NEXT_DESC_PTR, 35 (struct dma_register *) DMA0_NEXT_DESC_PTR,
36 (struct dma_register *) DMA1_NEXT_DESC_PTR, 36 (struct dma_register *) DMA1_NEXT_DESC_PTR,
37 (struct dma_register *) DMA2_NEXT_DESC_PTR, 37 (struct dma_register *) DMA2_NEXT_DESC_PTR,
@@ -45,7 +45,7 @@ struct dma_register *base_addr[MAX_BLACKFIN_DMA_CHANNEL] = {
45 (struct dma_register *) MDMA_D1_NEXT_DESC_PTR, 45 (struct dma_register *) MDMA_D1_NEXT_DESC_PTR,
46 (struct dma_register *) MDMA_S1_NEXT_DESC_PTR, 46 (struct dma_register *) MDMA_S1_NEXT_DESC_PTR,
47}; 47};
48EXPORT_SYMBOL(base_addr); 48EXPORT_SYMBOL(dma_io_base_addr);
49 49
50int channel2irq(unsigned int channel) 50int channel2irq(unsigned int channel)
51{ 51{
diff --git a/arch/blackfin/mach-bf537/dma.c b/arch/blackfin/mach-bf537/dma.c
index 992b19f400e7..4edb363ff99c 100644
--- a/arch/blackfin/mach-bf537/dma.c
+++ b/arch/blackfin/mach-bf537/dma.c
@@ -31,7 +31,7 @@
31#include <asm/blackfin.h> 31#include <asm/blackfin.h>
32#include <asm/dma.h> 32#include <asm/dma.h>
33 33
34struct dma_register *base_addr[MAX_BLACKFIN_DMA_CHANNEL] = { 34struct dma_register *dma_io_base_addr[MAX_BLACKFIN_DMA_CHANNEL] = {
35 (struct dma_register *) DMA0_NEXT_DESC_PTR, 35 (struct dma_register *) DMA0_NEXT_DESC_PTR,
36 (struct dma_register *) DMA1_NEXT_DESC_PTR, 36 (struct dma_register *) DMA1_NEXT_DESC_PTR,
37 (struct dma_register *) DMA2_NEXT_DESC_PTR, 37 (struct dma_register *) DMA2_NEXT_DESC_PTR,
@@ -49,7 +49,7 @@ struct dma_register *base_addr[MAX_BLACKFIN_DMA_CHANNEL] = {
49 (struct dma_register *) MDMA_D1_NEXT_DESC_PTR, 49 (struct dma_register *) MDMA_D1_NEXT_DESC_PTR,
50 (struct dma_register *) MDMA_S1_NEXT_DESC_PTR, 50 (struct dma_register *) MDMA_S1_NEXT_DESC_PTR,
51}; 51};
52EXPORT_SYMBOL(base_addr); 52EXPORT_SYMBOL(dma_io_base_addr);
53 53
54int channel2irq(unsigned int channel) 54int channel2irq(unsigned int channel)
55{ 55{
diff --git a/arch/blackfin/mach-bf548/dma.c b/arch/blackfin/mach-bf548/dma.c
index e78a88331495..74730eb8ae1b 100644
--- a/arch/blackfin/mach-bf548/dma.c
+++ b/arch/blackfin/mach-bf548/dma.c
@@ -32,7 +32,7 @@
32#include <asm/blackfin.h> 32#include <asm/blackfin.h>
33#include <asm/dma.h> 33#include <asm/dma.h>
34 34
35struct dma_register *base_addr[MAX_BLACKFIN_DMA_CHANNEL] = { 35struct dma_register *dma_io_base_addr[MAX_BLACKFIN_DMA_CHANNEL] = {
36 (struct dma_register *) DMA0_NEXT_DESC_PTR, 36 (struct dma_register *) DMA0_NEXT_DESC_PTR,
37 (struct dma_register *) DMA1_NEXT_DESC_PTR, 37 (struct dma_register *) DMA1_NEXT_DESC_PTR,
38 (struct dma_register *) DMA2_NEXT_DESC_PTR, 38 (struct dma_register *) DMA2_NEXT_DESC_PTR,
@@ -66,7 +66,7 @@ struct dma_register *base_addr[MAX_BLACKFIN_DMA_CHANNEL] = {
66 (struct dma_register *) MDMA_D3_NEXT_DESC_PTR, 66 (struct dma_register *) MDMA_D3_NEXT_DESC_PTR,
67 (struct dma_register *) MDMA_S3_NEXT_DESC_PTR, 67 (struct dma_register *) MDMA_S3_NEXT_DESC_PTR,
68}; 68};
69EXPORT_SYMBOL(base_addr); 69EXPORT_SYMBOL(dma_io_base_addr);
70 70
71int channel2irq(unsigned int channel) 71int channel2irq(unsigned int channel)
72{ 72{
diff --git a/arch/blackfin/mach-bf561/dma.c b/arch/blackfin/mach-bf561/dma.c
index 9863ae4fb8a4..24415eb82698 100644
--- a/arch/blackfin/mach-bf561/dma.c
+++ b/arch/blackfin/mach-bf561/dma.c
@@ -31,7 +31,7 @@
31#include <asm/blackfin.h> 31#include <asm/blackfin.h>
32#include <asm/dma.h> 32#include <asm/dma.h>
33 33
34struct dma_register *base_addr[MAX_BLACKFIN_DMA_CHANNEL] = { 34struct dma_register *dma_io_base_addr[MAX_BLACKFIN_DMA_CHANNEL] = {
35 (struct dma_register *) DMA1_0_NEXT_DESC_PTR, 35 (struct dma_register *) DMA1_0_NEXT_DESC_PTR,
36 (struct dma_register *) DMA1_1_NEXT_DESC_PTR, 36 (struct dma_register *) DMA1_1_NEXT_DESC_PTR,
37 (struct dma_register *) DMA1_2_NEXT_DESC_PTR, 37 (struct dma_register *) DMA1_2_NEXT_DESC_PTR,
@@ -69,7 +69,7 @@ struct dma_register *base_addr[MAX_BLACKFIN_DMA_CHANNEL] = {
69 (struct dma_register *) IMDMA_D1_NEXT_DESC_PTR, 69 (struct dma_register *) IMDMA_D1_NEXT_DESC_PTR,
70 (struct dma_register *) IMDMA_S1_NEXT_DESC_PTR, 70 (struct dma_register *) IMDMA_S1_NEXT_DESC_PTR,
71}; 71};
72EXPORT_SYMBOL(base_addr); 72EXPORT_SYMBOL(dma_io_base_addr);
73 73
74int channel2irq(unsigned int channel) 74int channel2irq(unsigned int channel)
75{ 75{
diff --git a/include/asm-blackfin/dma.h b/include/asm-blackfin/dma.h
index 16d493574ba8..c0d5259e315b 100644
--- a/include/asm-blackfin/dma.h
+++ b/include/asm-blackfin/dma.h
@@ -191,4 +191,7 @@ void clear_dma_irqstat(unsigned int channel);
191void *dma_memcpy(void *dest, const void *src, size_t count); 191void *dma_memcpy(void *dest, const void *src, size_t count);
192void *safe_dma_memcpy(void *dest, const void *src, size_t count); 192void *safe_dma_memcpy(void *dest, const void *src, size_t count);
193 193
194extern int channel2irq(unsigned int channel);
195extern struct dma_register *dma_io_base_addr[MAX_BLACKFIN_DMA_CHANNEL];
196
194#endif 197#endif
diff --git a/include/asm-blackfin/mach-bf527/dma.h b/include/asm-blackfin/mach-bf527/dma.h
index 2dfee12864f6..49dd693223e8 100644
--- a/include/asm-blackfin/mach-bf527/dma.h
+++ b/include/asm-blackfin/mach-bf527/dma.h
@@ -59,7 +59,4 @@
59#define CH_NFC CH_EMAC_TX /* PPI receive/transmit or NFC */ 59#define CH_NFC CH_EMAC_TX /* PPI receive/transmit or NFC */
60#endif 60#endif
61 61
62extern int channel2irq(unsigned int channel);
63extern struct dma_register *base_addr[];
64
65#endif 62#endif
diff --git a/include/asm-blackfin/mach-bf533/dma.h b/include/asm-blackfin/mach-bf533/dma.h
index 16c672c01d80..bd9d5e94307d 100644
--- a/include/asm-blackfin/mach-bf533/dma.h
+++ b/include/asm-blackfin/mach-bf533/dma.h
@@ -51,7 +51,4 @@
51#define CH_MEM_STREAM1_DEST 10 /* TX */ 51#define CH_MEM_STREAM1_DEST 10 /* TX */
52#define CH_MEM_STREAM1_SRC 11 /* RX */ 52#define CH_MEM_STREAM1_SRC 11 /* RX */
53 53
54extern int channel2irq(unsigned int channel);
55extern struct dma_register *base_addr[];
56
57#endif 54#endif
diff --git a/include/asm-blackfin/mach-bf537/dma.h b/include/asm-blackfin/mach-bf537/dma.h
index 021991984e6e..7a964040870a 100644
--- a/include/asm-blackfin/mach-bf537/dma.h
+++ b/include/asm-blackfin/mach-bf537/dma.h
@@ -52,7 +52,4 @@
52#define CH_MEM_STREAM1_DEST 14 /* TX */ 52#define CH_MEM_STREAM1_DEST 14 /* TX */
53#define CH_MEM_STREAM1_SRC 15 /* RX */ 53#define CH_MEM_STREAM1_SRC 15 /* RX */
54 54
55extern int channel2irq(unsigned int channel);
56extern struct dma_register *base_addr[];
57
58#endif 55#endif
diff --git a/include/asm-blackfin/mach-bf548/dma.h b/include/asm-blackfin/mach-bf548/dma.h
index 46ff31f20ae5..36a2ef7e7849 100644
--- a/include/asm-blackfin/mach-bf548/dma.h
+++ b/include/asm-blackfin/mach-bf548/dma.h
@@ -73,6 +73,4 @@
73 73
74#define MAX_BLACKFIN_DMA_CHANNEL 32 74#define MAX_BLACKFIN_DMA_CHANNEL 32
75 75
76extern int channel2irq(unsigned int channel);
77extern struct dma_register *base_addr[MAX_BLACKFIN_DMA_CHANNEL];
78#endif 76#endif
diff --git a/include/asm-blackfin/mach-bf561/dma.h b/include/asm-blackfin/mach-bf561/dma.h
index 766334b7d8ab..21d982003e75 100644
--- a/include/asm-blackfin/mach-bf561/dma.h
+++ b/include/asm-blackfin/mach-bf561/dma.h
@@ -32,7 +32,4 @@
32#define CH_IMEM_STREAM1_SRC 34 32#define CH_IMEM_STREAM1_SRC 34
33#define CH_IMEM_STREAM1_DEST 35 33#define CH_IMEM_STREAM1_DEST 35
34 34
35extern int channel2irq(unsigned int channel);
36extern struct dma_register *base_addr[];
37
38#endif 35#endif