Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
d24aff0b
Commit
d24aff0b
authored
Nov 01, 2005
by
Tony Lindgren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ARM: OMAP: Make 24xx dma callback status work
Make 24xx dma callback status work
parent
1ffea473
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
10 deletions
+22
-10
arch/arm/plat-omap/dma.c
arch/arm/plat-omap/dma.c
+15
-8
include/asm-arm/arch-omap/dma.h
include/asm-arm/arch-omap/dma.h
+7
-2
No files found.
arch/arm/plat-omap/dma.c
View file @
d24aff0b
...
...
@@ -473,6 +473,9 @@ int omap_request_dma(int dev_id, const char *dev_name,
chan
->
enabled_irqs
=
OMAP_DMA_TOUT_IRQ
|
OMAP_DMA_DROP_IRQ
|
OMAP_DMA_BLOCK_IRQ
;
if
(
cpu_is_omap24xx
())
chan
->
enabled_irqs
|=
OMAP2_DMA_TRANS_ERR_IRQ
;
if
(
cpu_is_omap16xx
())
{
/* If the sync device is set, configure it dynamically. */
if
(
dev_id
!=
0
)
{
...
...
@@ -836,20 +839,26 @@ static irqreturn_t omap1_dma_irq_handler(int irq, void *dev_id,
static
int
omap2_dma_handle_ch
(
int
ch
)
{
u32
val
=
OMAP_DMA_CSR_REG
(
ch
);
u32
status
=
OMAP_DMA_CSR_REG
(
ch
);
u32
val
;
if
(
!
val
)
if
(
!
status
)
return
0
;
if
(
unlikely
(
dma_chan
[
ch
].
dev_id
==
-
1
))
return
0
;
if
(
unlikely
(
val
&
OMAP_DMA_TOUT_IRQ
))
/* REVISIT: According to 24xx TRM, there's no TOUT_IE */
if
(
unlikely
(
status
&
OMAP_DMA_TOUT_IRQ
))
printk
(
KERN_INFO
"DMA timeout with device %d
\n
"
,
dma_chan
[
ch
].
dev_id
);
if
(
unlikely
(
val
&
OMAP_DMA_DROP_IRQ
))
if
(
unlikely
(
status
&
OMAP_DMA_DROP_IRQ
))
printk
(
KERN_INFO
"DMA synchronization event drop occurred with device "
"%d
\n
"
,
dma_chan
[
ch
].
dev_id
);
if
(
unlikely
(
status
&
OMAP2_DMA_TRANS_ERR_IRQ
))
printk
(
KERN_INFO
"DMA transaction error with device %d
\n
"
,
dma_chan
[
ch
].
dev_id
);
OMAP_DMA_CSR_REG
(
ch
)
=
0x20
;
val
=
omap_readl
(
OMAP_DMA4_IRQSTATUS_L0
);
...
...
@@ -857,10 +866,8 @@ static int omap2_dma_handle_ch(int ch)
val
=
1
<<
(
ch
);
omap_writel
(
val
,
OMAP_DMA4_IRQSTATUS_L0
);
if
(
likely
(
dma_chan
[
ch
].
callback
!=
NULL
)){
val
=
OMAP_DMA_CSR_REG
(
ch
);
dma_chan
[
ch
].
callback
(
ch
,
val
,
dma_chan
[
ch
].
data
);
}
if
(
likely
(
dma_chan
[
ch
].
callback
!=
NULL
))
dma_chan
[
ch
].
callback
(
ch
,
status
,
dma_chan
[
ch
].
data
);
return
0
;
}
...
...
include/asm-arm/arch-omap/dma.h
View file @
d24aff0b
...
...
@@ -276,13 +276,18 @@
#define OMAP1610_DMA_LCD_LCH_CTRL (OMAP1610_DMA_LCD_BASE + 0xea)
#define OMAP1610_DMA_LCD_SRC_FI_B1_U (OMAP1610_DMA_LCD_BASE + 0xf4)
#define OMAP_DMA_TOUT_IRQ (1 << 0)
#define OMAP_DMA_TOUT_IRQ (1 << 0)
/* Only on omap1 */
#define OMAP_DMA_DROP_IRQ (1 << 1)
#define OMAP_DMA_HALF_IRQ (1 << 2)
#define OMAP_DMA_FRAME_IRQ (1 << 3)
#define OMAP_DMA_LAST_IRQ (1 << 4)
#define OMAP_DMA_BLOCK_IRQ (1 << 5)
#define OMAP_DMA_SYNC_IRQ (1 << 6)
#define OMAP1_DMA_SYNC_IRQ (1 << 6)
#define OMAP2_DMA_PKT_IRQ (1 << 7)
#define OMAP2_DMA_TRANS_ERR_IRQ (1 << 8)
#define OMAP2_DMA_SECURE_ERR_IRQ (1 << 9)
#define OMAP2_DMA_SUPERVISOR_ERR_IRQ (1 << 10)
#define OMAP2_DMA_MISALIGNED_ERR_IRQ (1 << 11)
#define OMAP_DMA_DATA_TYPE_S8 0x00
#define OMAP_DMA_DATA_TYPE_S16 0x01
...
...
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