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
d4c9e9fc
Commit
d4c9e9fc
authored
May 23, 2009
by
Krzysztof Hałasa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
IXP42x: Add QMgr support for IXP425 rev. A0 processors.
Signed-off-by:
Krzysztof Hałasa
<
khc@pm.waw.pl
>
parent
61a5ccc8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
59 additions
and
8 deletions
+59
-8
arch/arm/mach-ixp4xx/ixp4xx_qmgr.c
arch/arm/mach-ixp4xx/ixp4xx_qmgr.c
+59
-8
No files found.
arch/arm/mach-ixp4xx/ixp4xx_qmgr.c
View file @
d4c9e9fc
...
...
@@ -49,6 +49,49 @@ void qmgr_set_irq(unsigned int queue, int src,
}
static
irqreturn_t
qmgr_irq1_a0
(
int
irq
,
void
*
pdev
)
{
int
i
,
ret
=
0
;
/* ACK - it may clear any bits so don't rely on it */
__raw_writel
(
0xFFFFFFFF
,
&
qmgr_regs
->
irqstat
[
0
]);
for
(
i
=
0
;
i
<
HALF_QUEUES
;
i
++
)
{
u32
src
,
stat
;
if
(
!
(
qmgr_regs
->
irqen
[
0
]
&
BIT
(
i
)))
continue
;
src
=
qmgr_regs
->
irqsrc
[
i
>>
3
];
stat
=
qmgr_regs
->
stat1
[
i
>>
3
];
if
(
src
&
4
)
/* the IRQ condition is inverted */
stat
=
~
stat
;
if
(
stat
&
BIT
(
src
&
3
))
{
irq_handlers
[
i
](
irq_pdevs
[
i
]);
ret
=
IRQ_HANDLED
;
}
}
return
ret
;
}
static
irqreturn_t
qmgr_irq2_a0
(
int
irq
,
void
*
pdev
)
{
int
i
,
ret
=
0
;
u32
req_bitmap
;
/* ACK - it may clear any bits so don't rely on it */
__raw_writel
(
0xFFFFFFFF
,
&
qmgr_regs
->
irqstat
[
1
]);
req_bitmap
=
qmgr_regs
->
irqen
[
1
]
&
qmgr_regs
->
statne_h
;
for
(
i
=
0
;
i
<
HALF_QUEUES
;
i
++
)
{
if
(
!
(
req_bitmap
&
BIT
(
i
)))
continue
;
irq_handlers
[
HALF_QUEUES
+
i
](
irq_pdevs
[
HALF_QUEUES
+
i
]);
ret
=
IRQ_HANDLED
;
}
return
ret
;
}
static
irqreturn_t
qmgr_irq
(
int
irq
,
void
*
pdev
)
{
int
i
,
half
=
(
irq
==
IRQ_IXP4XX_QM1
?
0
:
1
);
...
...
@@ -236,6 +279,8 @@ void qmgr_release_queue(unsigned int queue)
static
int
qmgr_init
(
void
)
{
int
i
,
err
;
irq_handler_t
handler1
,
handler2
;
mem_res
=
request_mem_region
(
IXP4XX_QMGR_BASE_PHYS
,
IXP4XX_QMGR_REGION_SIZE
,
"IXP4xx Queue Manager"
);
...
...
@@ -265,19 +310,25 @@ static int qmgr_init(void)
for
(
i
=
0
;
i
<
QUEUES
;
i
++
)
__raw_writel
(
0
,
&
qmgr_regs
->
sram
[
i
]);
err
=
request_irq
(
IRQ_IXP4XX_QM1
,
qmgr_irq
,
0
,
"IXP4xx Queue Manager"
,
NULL
);
if
(
cpu_is_ixp42x_rev_a0
())
{
handler1
=
qmgr_irq1_a0
;
handler2
=
qmgr_irq2_a0
;
}
else
handler1
=
handler2
=
qmgr_irq
;
err
=
request_irq
(
IRQ_IXP4XX_QM1
,
handler1
,
0
,
"IXP4xx Queue Manager"
,
NULL
);
if
(
err
)
{
printk
(
KERN_ERR
"qmgr: failed to request IRQ%i
\n
"
,
IRQ_IXP4XX_QM1
);
printk
(
KERN_ERR
"qmgr: failed to request IRQ%i
(%i)
\n
"
,
IRQ_IXP4XX_QM1
,
err
);
goto
error_irq
;
}
err
=
request_irq
(
IRQ_IXP4XX_QM2
,
qmgr_irq
,
0
,
"IXP4xx Queue Manager"
,
NULL
);
err
=
request_irq
(
IRQ_IXP4XX_QM2
,
handler2
,
0
,
"IXP4xx Queue Manager"
,
NULL
);
if
(
err
)
{
printk
(
KERN_ERR
"qmgr: failed to request IRQ%i
\n
"
,
IRQ_IXP4XX_QM2
);
printk
(
KERN_ERR
"qmgr: failed to request IRQ%i
(%i)
\n
"
,
IRQ_IXP4XX_QM2
,
err
);
goto
error_irq2
;
}
...
...
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