diff options
Diffstat (limited to 'arch/sh/drivers/dma/dmabrg.c')
-rw-r--r-- | arch/sh/drivers/dma/dmabrg.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/arch/sh/drivers/dma/dmabrg.c b/arch/sh/drivers/dma/dmabrg.c index 5e22689c2fcf..6ab9c4a15439 100644 --- a/arch/sh/drivers/dma/dmabrg.c +++ b/arch/sh/drivers/dma/dmabrg.c | |||
@@ -8,6 +8,7 @@ | |||
8 | 8 | ||
9 | #include <linux/interrupt.h> | 9 | #include <linux/interrupt.h> |
10 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
11 | #include <linux/slab.h> | ||
11 | #include <asm/dma.h> | 12 | #include <asm/dma.h> |
12 | #include <asm/dmabrg.h> | 13 | #include <asm/dmabrg.h> |
13 | #include <asm/io.h> | 14 | #include <asm/io.h> |
@@ -86,8 +87,8 @@ static irqreturn_t dmabrg_irq(int irq, void *data) | |||
86 | unsigned long dcr; | 87 | unsigned long dcr; |
87 | unsigned int i; | 88 | unsigned int i; |
88 | 89 | ||
89 | dcr = ctrl_inl(DMABRGCR); | 90 | dcr = __raw_readl(DMABRGCR); |
90 | ctrl_outl(dcr & ~0x00ff0003, DMABRGCR); /* ack all */ | 91 | __raw_writel(dcr & ~0x00ff0003, DMABRGCR); /* ack all */ |
91 | dcr &= dcr >> 8; /* ignore masked */ | 92 | dcr &= dcr >> 8; /* ignore masked */ |
92 | 93 | ||
93 | /* USB stuff, get it out of the way first */ | 94 | /* USB stuff, get it out of the way first */ |
@@ -109,17 +110,17 @@ static irqreturn_t dmabrg_irq(int irq, void *data) | |||
109 | static void dmabrg_disable_irq(unsigned int dmairq) | 110 | static void dmabrg_disable_irq(unsigned int dmairq) |
110 | { | 111 | { |
111 | unsigned long dcr; | 112 | unsigned long dcr; |
112 | dcr = ctrl_inl(DMABRGCR); | 113 | dcr = __raw_readl(DMABRGCR); |
113 | dcr &= ~(1 << ((dmairq > 1) ? dmairq + 22 : dmairq + 8)); | 114 | dcr &= ~(1 << ((dmairq > 1) ? dmairq + 22 : dmairq + 8)); |
114 | ctrl_outl(dcr, DMABRGCR); | 115 | __raw_writel(dcr, DMABRGCR); |
115 | } | 116 | } |
116 | 117 | ||
117 | static void dmabrg_enable_irq(unsigned int dmairq) | 118 | static void dmabrg_enable_irq(unsigned int dmairq) |
118 | { | 119 | { |
119 | unsigned long dcr; | 120 | unsigned long dcr; |
120 | dcr = ctrl_inl(DMABRGCR); | 121 | dcr = __raw_readl(DMABRGCR); |
121 | dcr |= (1 << ((dmairq > 1) ? dmairq + 22 : dmairq + 8)); | 122 | dcr |= (1 << ((dmairq > 1) ? dmairq + 22 : dmairq + 8)); |
122 | ctrl_outl(dcr, DMABRGCR); | 123 | __raw_writel(dcr, DMABRGCR); |
123 | } | 124 | } |
124 | 125 | ||
125 | int dmabrg_request_irq(unsigned int dmairq, void(*handler)(void*), | 126 | int dmabrg_request_irq(unsigned int dmairq, void(*handler)(void*), |
@@ -165,13 +166,13 @@ static int __init dmabrg_init(void) | |||
165 | printk(KERN_INFO "DMABRG: DMAC ch0 not reserved!\n"); | 166 | printk(KERN_INFO "DMABRG: DMAC ch0 not reserved!\n"); |
166 | #endif | 167 | #endif |
167 | 168 | ||
168 | ctrl_outl(0, DMABRGCR); | 169 | __raw_writel(0, DMABRGCR); |
169 | ctrl_outl(0, DMACHCR0); | 170 | __raw_writel(0, DMACHCR0); |
170 | ctrl_outl(0x94000000, DMARSRA); /* enable DMABRG in DMAC 0 */ | 171 | __raw_writel(0x94000000, DMARSRA); /* enable DMABRG in DMAC 0 */ |
171 | 172 | ||
172 | /* enable DMABRG mode, enable the DMAC */ | 173 | /* enable DMABRG mode, enable the DMAC */ |
173 | or = ctrl_inl(DMAOR); | 174 | or = __raw_readl(DMAOR); |
174 | ctrl_outl(or | DMAOR_BRG | DMAOR_DMEN, DMAOR); | 175 | __raw_writel(or | DMAOR_BRG | DMAOR_DMEN, DMAOR); |
175 | 176 | ||
176 | ret = request_irq(DMABRGI0, dmabrg_irq, IRQF_DISABLED, | 177 | ret = request_irq(DMABRGI0, dmabrg_irq, IRQF_DISABLED, |
177 | "DMABRG USB address error", NULL); | 178 | "DMABRG USB address error", NULL); |