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
fc86dbc0
Commit
fc86dbc0
authored
May 13, 2004
by
Nicolas Pitre
Committed by
Russell King
May 13, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ARM PATCH] 1865/1: DMA changes for PXA27x
Patch from Nicolas Pitre
parent
348420ff
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
6 deletions
+24
-6
arch/arm/mach-pxa/dma.c
arch/arm/mach-pxa/dma.c
+3
-3
include/asm-arm/arch-pxa/dma.h
include/asm-arm/arch-pxa/dma.h
+21
-3
No files found.
arch/arm/mach-pxa/dma.c
View file @
fc86dbc0
...
@@ -28,7 +28,7 @@ static struct dma_channel {
...
@@ -28,7 +28,7 @@ static struct dma_channel {
char
*
name
;
char
*
name
;
void
(
*
irq_handler
)(
int
,
void
*
,
struct
pt_regs
*
);
void
(
*
irq_handler
)(
int
,
void
*
,
struct
pt_regs
*
);
void
*
data
;
void
*
data
;
}
dma_channels
[
16
];
}
dma_channels
[
PXA_DMA_CHANNELS
];
int
pxa_request_dma
(
char
*
name
,
pxa_dma_prio
prio
,
int
pxa_request_dma
(
char
*
name
,
pxa_dma_prio
prio
,
...
@@ -45,7 +45,7 @@ int pxa_request_dma (char *name, pxa_dma_prio prio,
...
@@ -45,7 +45,7 @@ int pxa_request_dma (char *name, pxa_dma_prio prio,
local_irq_save
(
flags
);
local_irq_save
(
flags
);
/* try grabbing a DMA channel with the requested priority */
/* try grabbing a DMA channel with the requested priority */
for
(
i
=
prio
;
i
<
prio
+
(
prio
==
DMA_PRIO_LOW
)
?
8
:
4
;
i
++
)
{
for
(
i
=
prio
;
i
<
prio
+
PXA_DMA_NBCH
(
prio
)
;
i
++
)
{
if
(
!
dma_channels
[
i
].
name
)
{
if
(
!
dma_channels
[
i
].
name
)
{
found
=
1
;
found
=
1
;
break
;
break
;
...
@@ -97,7 +97,7 @@ static irqreturn_t dma_irq_handler(int irq, void *dev_id, struct pt_regs *regs)
...
@@ -97,7 +97,7 @@ static irqreturn_t dma_irq_handler(int irq, void *dev_id, struct pt_regs *regs)
{
{
int
i
,
dint
=
DINT
;
int
i
,
dint
=
DINT
;
for
(
i
=
0
;
i
<
16
;
i
++
)
{
for
(
i
=
0
;
i
<
PXA_DMA_CHANNELS
;
i
++
)
{
if
(
dint
&
(
1
<<
i
))
{
if
(
dint
&
(
1
<<
i
))
{
struct
dma_channel
*
channel
=
&
dma_channels
[
i
];
struct
dma_channel
*
channel
=
&
dma_channels
[
i
];
if
(
channel
->
name
&&
channel
->
irq_handler
)
{
if
(
channel
->
name
&&
channel
->
irq_handler
)
{
...
...
include/asm-arm/arch-pxa/dma.h
View file @
fc86dbc0
...
@@ -29,9 +29,21 @@ typedef struct {
...
@@ -29,9 +29,21 @@ typedef struct {
volatile
u32
dcmd
;
/* DCMD value for the current transfer */
volatile
u32
dcmd
;
/* DCMD value for the current transfer */
}
pxa_dma_desc
;
}
pxa_dma_desc
;
/*
#if defined(CONFIG_PXA27x)
* DMA registration
*/
#define PXA_DMA_CHANNELS 32
#define PXA_DMA_NBCH(prio) ((prio == DMA_PRIO_LOW) ? 16 : 8)
typedef
enum
{
DMA_PRIO_HIGH
=
0
,
DMA_PRIO_MEDIUM
=
8
,
DMA_PRIO_LOW
=
16
}
pxa_dma_prio
;
#elif defined(CONFIG_PXA25x)
#define PXA_DMA_CHANNELS 16
#define PXA_DMA_NBCH(prio) ((prio == DMA_PRIO_LOW) ? 8 : 4)
typedef
enum
{
typedef
enum
{
DMA_PRIO_HIGH
=
0
,
DMA_PRIO_HIGH
=
0
,
...
@@ -39,6 +51,12 @@ typedef enum {
...
@@ -39,6 +51,12 @@ typedef enum {
DMA_PRIO_LOW
=
8
DMA_PRIO_LOW
=
8
}
pxa_dma_prio
;
}
pxa_dma_prio
;
#endif
/*
* DMA registration
*/
int
pxa_request_dma
(
char
*
name
,
int
pxa_request_dma
(
char
*
name
,
pxa_dma_prio
prio
,
pxa_dma_prio
prio
,
void
(
*
irq_handler
)(
int
,
void
*
,
struct
pt_regs
*
),
void
(
*
irq_handler
)(
int
,
void
*
,
struct
pt_regs
*
),
...
...
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