Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tapasco
tapasco
Commits
8e7f972d
Commit
8e7f972d
authored
May 02, 2022
by
Torben Kalkhof
Browse files
Achieve ARM32 compatibility for QDMA driver
parent
ba7b8c9b
Pipeline
#2563
passed with stages
in 209 minutes and 44 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
runtime/kernel/pcie/pcie_qdma.c
View file @
8e7f972d
...
...
@@ -214,14 +214,22 @@ int pcie_qdma_init(struct tlkm_pcie_device *pdev)
tlkm_status_get_component_base
(
dev
,
"PLATFORM_COMPONENT_DMA0"
));
#ifdef CONFIG_ARM
if
((
ioread32
(
&
desc_gen_regs
->
id
)
&
0xFFFFFFFF
)
!=
DESC_GEN_ID
)
{
#else
if
((
readq
(
&
desc_gen_regs
->
id
)
&
0xFFFFFFFF
)
!=
DESC_GEN_ID
)
{
#endif
DEVERR
(
dev
->
dev_id
,
"could not find QDMA descriptor generator"
);
res
=
-
ENODEV
;
goto
fail_id
;
}
// reset QDMA
#ifdef CONFIG_ARM
iowrite32
(
1
,
&
desc_gen_regs
->
dma_reset
);
#else
writeq
(
1
,
&
desc_gen_regs
->
dma_reset
);
#endif
DEVLOG
(
dev
->
dev_id
,
TLKM_LF_DMA
,
"Detected QDMA descriptor generator"
);
...
...
@@ -365,7 +373,11 @@ int pcie_qdma_exit(struct tlkm_pcie_device *pdev)
tlkm_status_get_component_base
(
dev
,
"PLATFORM_COMPONENT_DMA0"
));
#ifdef CONFIG_ARM
if
((
ioread32
(
&
desc_gen_regs
->
id
)
&
0xFFFFFFFF
)
!=
DESC_GEN_ID
)
{
#else
if
((
readq
(
&
desc_gen_regs
->
id
)
&
0xFFFFFFFF
)
!=
DESC_GEN_ID
)
{
#endif
DEVWRN
(
dev
->
dev_id
,
"descriptor generator not found"
);
return
-
ENODEV
;
}
...
...
Write
Preview
Supports
Markdown
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