Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
bc6447b8
Commit
bc6447b8
authored
Jan 02, 2009
by
Russell King
Committed by
Russell King
Jan 02, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ARM] dma: make DMA_MODE_xxx reflect ISA DMA settings
Signed-off-by:
Russell King
<
rmk+kernel@arm.linux.org.uk
>
parent
5369bea7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
17 deletions
+9
-17
arch/arm/include/asm/dma.h
arch/arm/include/asm/dma.h
+8
-5
arch/arm/kernel/dma-isa.c
arch/arm/kernel/dma-isa.c
+1
-12
No files found.
arch/arm/include/asm/dma.h
View file @
bc6447b8
...
...
@@ -26,12 +26,15 @@
*/
typedef
unsigned
int
dmamode_t
;
#define DMA_MODE_MASK 3
/*
* The DMA modes reflect the settings for the ISA DMA controller
*/
#define DMA_MODE_MASK 0xcc
#define DMA_MODE_READ 0
#define DMA_MODE_WRITE
1
#define DMA_MODE_CASCADE
2
#define DMA_AUTOINIT
4
#define DMA_MODE_READ 0
x44
#define DMA_MODE_WRITE
0x48
#define DMA_MODE_CASCADE
0xc0
#define DMA_AUTOINIT
0x10
extern
spinlock_t
dma_spin_lock
;
...
...
arch/arm/kernel/dma-isa.c
View file @
bc6447b8
...
...
@@ -24,11 +24,6 @@
#include <asm/dma.h>
#include <asm/mach/dma.h>
#define ISA_DMA_MODE_READ 0x44
#define ISA_DMA_MODE_WRITE 0x48
#define ISA_DMA_MODE_CASCADE 0xc0
#define ISA_DMA_AUTOINIT 0x10
#define ISA_DMA_MASK 0
#define ISA_DMA_MODE 1
#define ISA_DMA_CLRFF 2
...
...
@@ -67,20 +62,17 @@ static void isa_enable_dma(unsigned int chan, dma_t *dma)
unsigned
int
mode
;
enum
dma_data_direction
direction
;
mode
=
chan
&
3
;
mode
=
(
chan
&
3
)
|
dma
->
dma_mode
;
switch
(
dma
->
dma_mode
&
DMA_MODE_MASK
)
{
case
DMA_MODE_READ
:
mode
|=
ISA_DMA_MODE_READ
;
direction
=
DMA_FROM_DEVICE
;
break
;
case
DMA_MODE_WRITE
:
mode
|=
ISA_DMA_MODE_WRITE
;
direction
=
DMA_TO_DEVICE
;
break
;
case
DMA_MODE_CASCADE
:
mode
|=
ISA_DMA_MODE_CASCADE
;
direction
=
DMA_BIDIRECTIONAL
;
break
;
...
...
@@ -121,9 +113,6 @@ static void isa_enable_dma(unsigned int chan, dma_t *dma)
outb
(
length
,
isa_dma_port
[
chan
][
ISA_DMA_COUNT
]);
outb
(
length
>>
8
,
isa_dma_port
[
chan
][
ISA_DMA_COUNT
]);
if
(
dma
->
dma_mode
&
DMA_AUTOINIT
)
mode
|=
ISA_DMA_AUTOINIT
;
outb
(
mode
,
isa_dma_port
[
chan
][
ISA_DMA_MODE
]);
dma
->
invalid
=
0
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment