Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
ipipe-arm64
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
xenomai
ipipe-arm64
Commits
720914e8
Commit
720914e8
authored
Dec 03, 2017
by
Gilles Chanteperdrix
Committed by
Dmitriy Cherkasov
Feb 07, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gpio: pl061: ipipe: enable pipelined interrupts
parent
6f7afdf4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
3 deletions
+28
-3
drivers/gpio/gpio-pl061.c
drivers/gpio/gpio-pl061.c
+28
-3
No files found.
drivers/gpio/gpio-pl061.c
View file @
720914e8
...
...
@@ -26,6 +26,7 @@
#include <linux/slab.h>
#include <linux/pinctrl/consumer.h>
#include <linux/pm.h>
#include <linux/ipipe.h>
#define GPIODIR 0x400
#define GPIOIS 0x404
...
...
@@ -50,7 +51,11 @@ struct pl061_context_save_regs {
#endif
struct
pl061
{
#ifdef CONFIG_IPIPE
ipipe_spinlock_t
lock
;
#else
raw_spinlock_t
lock
;
#endif
void
__iomem
*
base
;
struct
gpio_chip
gc
;
...
...
@@ -221,14 +226,30 @@ static void pl061_irq_handler(struct irq_desc *desc)
pending
=
readb
(
pl061
->
base
+
GPIOMIS
);
if
(
pending
)
{
for_each_set_bit
(
offset
,
&
pending
,
PL061_GPIO_NR
)
generic_handle
_irq
(
irq_find_mapping
(
gc
->
irqdomain
,
offset
));
ipipe_handle_demuxed
_irq
(
irq_find_mapping
(
gc
->
irqdomain
,
offset
));
}
chained_irq_exit
(
irqchip
,
desc
);
}
static
void
pl061_irq_mask
(
struct
irq_data
*
d
)
{
struct
gpio_chip
*
gc
=
irq_data_get_irq_chip_data
(
d
);
struct
pl061
*
pl061
=
gpiochip_get_data
(
gc
);
u8
mask
=
BIT
(
irqd_to_hwirq
(
d
)
%
PL061_GPIO_NR
);
unsigned
long
flags
;
u8
gpioie
;
raw_spin_lock_irqsave
(
&
pl061
->
lock
,
flags
);
gpioie
=
readb
(
pl061
->
base
+
GPIOIE
)
&
~
mask
;
writeb
(
gpioie
,
pl061
->
base
+
GPIOIE
);
ipipe_lock_irq
(
d
->
irq
);
raw_spin_unlock_irqrestore
(
&
pl061
->
lock
,
flags
);
}
#ifdef CONFIG_IPIPE
static
void
pl061_irq_mask_ack
(
struct
irq_data
*
d
)
{
struct
gpio_chip
*
gc
=
irq_data_get_irq_chip_data
(
d
);
struct
pl061
*
pl061
=
gpiochip_get_data
(
gc
);
...
...
@@ -240,7 +261,7 @@ static void pl061_irq_mask(struct irq_data *d)
writeb
(
gpioie
,
pl061
->
base
+
GPIOIE
);
raw_spin_unlock
(
&
pl061
->
lock
);
}
#endif
static
void
pl061_irq_unmask
(
struct
irq_data
*
d
)
{
struct
gpio_chip
*
gc
=
irq_data_get_irq_chip_data
(
d
);
...
...
@@ -288,6 +309,10 @@ static struct irq_chip pl061_irqchip = {
.
irq_unmask
=
pl061_irq_unmask
,
.
irq_set_type
=
pl061_irq_type
,
.
irq_set_wake
=
pl061_irq_set_wake
,
#ifdef CONFIG_IPIPE
.
irq_mask_ack
=
pl061_irq_mask_ack
,
.
flags
=
IRQCHIP_PIPELINE_SAFE
,
#endif
};
static
int
pl061_probe
(
struct
amba_device
*
adev
,
const
struct
amba_id
*
id
)
...
...
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