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
Kirill Smelkov
linux
Commits
f986ffed
Commit
f986ffed
authored
Aug 06, 2012
by
Vinod Koul
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fixes_for-3.6' into fixes
parents
0d7614f0
a2367db2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
11 deletions
+25
-11
drivers/dma/imx-dma.c
drivers/dma/imx-dma.c
+25
-11
No files found.
drivers/dma/imx-dma.c
View file @
f986ffed
...
...
@@ -172,7 +172,8 @@ struct imxdma_engine {
struct
device_dma_parameters
dma_parms
;
struct
dma_device
dma_device
;
void
__iomem
*
base
;
struct
clk
*
dma_clk
;
struct
clk
*
dma_ahb
;
struct
clk
*
dma_ipg
;
spinlock_t
lock
;
struct
imx_dma_2d_config
slots_2d
[
IMX_DMA_2D_SLOTS
];
struct
imxdma_channel
channel
[
IMX_DMA_CHANNELS
];
...
...
@@ -976,10 +977,20 @@ static int __init imxdma_probe(struct platform_device *pdev)
return
0
;
}
imxdma
->
dma_clk
=
clk_get
(
NULL
,
"dma"
);
if
(
IS_ERR
(
imxdma
->
dma_clk
))
return
PTR_ERR
(
imxdma
->
dma_clk
);
clk_enable
(
imxdma
->
dma_clk
);
imxdma
->
dma_ipg
=
devm_clk_get
(
&
pdev
->
dev
,
"ipg"
);
if
(
IS_ERR
(
imxdma
->
dma_ipg
))
{
ret
=
PTR_ERR
(
imxdma
->
dma_ipg
);
goto
err_clk
;
}
imxdma
->
dma_ahb
=
devm_clk_get
(
&
pdev
->
dev
,
"ahb"
);
if
(
IS_ERR
(
imxdma
->
dma_ahb
))
{
ret
=
PTR_ERR
(
imxdma
->
dma_ahb
);
goto
err_clk
;
}
clk_prepare_enable
(
imxdma
->
dma_ipg
);
clk_prepare_enable
(
imxdma
->
dma_ahb
);
/* reset DMA module */
imx_dmav1_writel
(
imxdma
,
DCR_DRST
,
DMA_DCR
);
...
...
@@ -988,16 +999,14 @@ static int __init imxdma_probe(struct platform_device *pdev)
ret
=
request_irq
(
MX1_DMA_INT
,
dma_irq_handler
,
0
,
"DMA"
,
imxdma
);
if
(
ret
)
{
dev_warn
(
imxdma
->
dev
,
"Can't register IRQ for DMA
\n
"
);
kfree
(
imxdma
);
return
ret
;
goto
err_enable
;
}
ret
=
request_irq
(
MX1_DMA_ERR
,
imxdma_err_handler
,
0
,
"DMA"
,
imxdma
);
if
(
ret
)
{
dev_warn
(
imxdma
->
dev
,
"Can't register ERRIRQ for DMA
\n
"
);
free_irq
(
MX1_DMA_INT
,
NULL
);
kfree
(
imxdma
);
return
ret
;
goto
err_enable
;
}
}
...
...
@@ -1094,7 +1103,10 @@ static int __init imxdma_probe(struct platform_device *pdev)
free_irq
(
MX1_DMA_INT
,
NULL
);
free_irq
(
MX1_DMA_ERR
,
NULL
);
}
err_enable:
clk_disable_unprepare
(
imxdma
->
dma_ipg
);
clk_disable_unprepare
(
imxdma
->
dma_ahb
);
err_clk:
kfree
(
imxdma
);
return
ret
;
}
...
...
@@ -1114,7 +1126,9 @@ static int __exit imxdma_remove(struct platform_device *pdev)
free_irq
(
MX1_DMA_ERR
,
NULL
);
}
kfree
(
imxdma
);
clk_disable_unprepare
(
imxdma
->
dma_ipg
);
clk_disable_unprepare
(
imxdma
->
dma_ahb
);
kfree
(
imxdma
);
return
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