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
nexedi
linux
Commits
bfe278e0
Commit
bfe278e0
authored
May 24, 2003
by
Geert Uytterhoeven
Committed by
Linus Torvalds
May 24, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] M68k IRQ API updates [10/20]
M68k Q40: Update to the new irq API (from Roman Zippel and me) [10/20]
parent
e08085c0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
22 deletions
+26
-22
arch/m68k/q40/config.c
arch/m68k/q40/config.c
+4
-4
arch/m68k/q40/q40ints.c
arch/m68k/q40/q40ints.c
+22
-18
No files found.
arch/m68k/q40/config.c
View file @
bfe278e0
...
@@ -39,8 +39,8 @@
...
@@ -39,8 +39,8 @@
extern
void
floppy_setup
(
char
*
str
,
int
*
ints
);
extern
void
floppy_setup
(
char
*
str
,
int
*
ints
);
extern
void
q40_process_int
(
int
level
,
struct
pt_regs
*
regs
);
extern
irqreturn_t
q40_process_int
(
int
level
,
struct
pt_regs
*
regs
);
extern
void
(
*
q40_sys_default_handler
[])
(
int
,
void
*
,
struct
pt_regs
*
);
/* added just for debugging */
extern
irqreturn_t
(
*
q40_sys_default_handler
[])
(
int
,
void
*
,
struct
pt_regs
*
);
/* added just for debugging */
extern
void
q40_init_IRQ
(
void
);
extern
void
q40_init_IRQ
(
void
);
extern
void
q40_free_irq
(
unsigned
int
,
void
*
);
extern
void
q40_free_irq
(
unsigned
int
,
void
*
);
extern
int
show_q40_interrupts
(
struct
seq_file
*
,
void
*
);
extern
int
show_q40_interrupts
(
struct
seq_file
*
,
void
*
);
...
@@ -48,8 +48,8 @@ extern void q40_enable_irq (unsigned int);
...
@@ -48,8 +48,8 @@ extern void q40_enable_irq (unsigned int);
extern
void
q40_disable_irq
(
unsigned
int
);
extern
void
q40_disable_irq
(
unsigned
int
);
static
void
q40_get_model
(
char
*
model
);
static
void
q40_get_model
(
char
*
model
);
static
int
q40_get_hardware_list
(
char
*
buffer
);
static
int
q40_get_hardware_list
(
char
*
buffer
);
extern
int
q40_request_irq
(
unsigned
int
irq
,
void
(
*
handler
)(
int
,
void
*
,
struct
pt_regs
*
),
unsigned
long
flags
,
const
char
*
devname
,
void
*
dev_id
);
extern
int
q40_request_irq
(
unsigned
int
irq
,
irqreturn_t
(
*
handler
)(
int
,
void
*
,
struct
pt_regs
*
),
unsigned
long
flags
,
const
char
*
devname
,
void
*
dev_id
);
extern
void
q40_sched_init
(
void
(
*
handler
)(
int
,
void
*
,
struct
pt_regs
*
));
extern
void
q40_sched_init
(
irqreturn_t
(
*
handler
)(
int
,
void
*
,
struct
pt_regs
*
));
extern
unsigned
long
q40_gettimeoffset
(
void
);
extern
unsigned
long
q40_gettimeoffset
(
void
);
extern
int
q40_hwclk
(
int
,
struct
rtc_time
*
);
extern
int
q40_hwclk
(
int
,
struct
rtc_time
*
);
...
...
arch/m68k/q40/q40ints.c
View file @
bfe278e0
...
@@ -43,19 +43,19 @@
...
@@ -43,19 +43,19 @@
extern
int
ints_inited
;
extern
int
ints_inited
;
void
q40_irq2_handler
(
int
,
void
*
,
struct
pt_regs
*
fp
);
irqreturn_t
q40_irq2_handler
(
int
,
void
*
,
struct
pt_regs
*
fp
);
extern
void
(
*
q40_sys_default_handler
[])
(
int
,
void
*
,
struct
pt_regs
*
);
extern
irqreturn_t
(
*
q40_sys_default_handler
[])
(
int
,
void
*
,
struct
pt_regs
*
);
static
void
q40_defhand
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
fp
);
static
irqreturn_t
q40_defhand
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
fp
);
static
void
sys_default_handler
(
int
lev
,
void
*
dev_id
,
struct
pt_regs
*
regs
);
static
irqreturn_t
sys_default_handler
(
int
lev
,
void
*
dev_id
,
struct
pt_regs
*
regs
);
#define DEVNAME_SIZE 24
#define DEVNAME_SIZE 24
static
struct
q40_irq_node
{
static
struct
q40_irq_node
{
void
(
*
handler
)(
int
,
void
*
,
struct
pt_regs
*
);
irqreturn_t
(
*
handler
)(
int
,
void
*
,
struct
pt_regs
*
);
unsigned
long
flags
;
unsigned
long
flags
;
void
*
dev_id
;
void
*
dev_id
;
/* struct q40_irq_node *next;*/
/* struct q40_irq_node *next;*/
...
@@ -106,7 +106,7 @@ void q40_init_IRQ (void)
...
@@ -106,7 +106,7 @@ void q40_init_IRQ (void)
}
}
int
q40_request_irq
(
unsigned
int
irq
,
int
q40_request_irq
(
unsigned
int
irq
,
void
(
*
handler
)(
int
,
void
*
,
struct
pt_regs
*
),
irqreturn_t
(
*
handler
)(
int
,
void
*
,
struct
pt_regs
*
),
unsigned
long
flags
,
const
char
*
devname
,
void
*
dev_id
)
unsigned
long
flags
,
const
char
*
devname
,
void
*
dev_id
)
{
{
/*printk("q40_request_irq %d, %s\n",irq,devname);*/
/*printk("q40_request_irq %d, %s\n",irq,devname);*/
...
@@ -198,9 +198,10 @@ void q40_free_irq(unsigned int irq, void *dev_id)
...
@@ -198,9 +198,10 @@ void q40_free_irq(unsigned int irq, void *dev_id)
}
}
void
q40_process_int
(
int
level
,
struct
pt_regs
*
fp
)
irqreturn_t
q40_process_int
(
int
level
,
struct
pt_regs
*
fp
)
{
{
printk
(
"unexpected interrupt %x
\n
"
,
level
);
printk
(
"unexpected interrupt %x
\n
"
,
level
);
return
IRQ_HANDLED
;
}
}
/*
/*
...
@@ -231,9 +232,9 @@ void q40_mksound(unsigned int hz, unsigned int ticks)
...
@@ -231,9 +232,9 @@ void q40_mksound(unsigned int hz, unsigned int ticks)
sound_ticks
=
ticks
<<
1
;
sound_ticks
=
ticks
<<
1
;
}
}
static
void
(
*
q40_timer_routine
)(
int
,
void
*
,
struct
pt_regs
*
);
static
irqreturn_t
(
*
q40_timer_routine
)(
int
,
void
*
,
struct
pt_regs
*
);
static
void
q40_timer_int
(
int
irq
,
void
*
dev
,
struct
pt_regs
*
regs
)
static
irqreturn_t
q40_timer_int
(
int
irq
,
void
*
dev
,
struct
pt_regs
*
regs
)
{
{
ql_ticks
=
ql_ticks
?
0
:
1
;
ql_ticks
=
ql_ticks
?
0
:
1
;
if
(
sound_ticks
)
if
(
sound_ticks
)
...
@@ -244,12 +245,12 @@ static void q40_timer_int (int irq, void * dev, struct pt_regs * regs)
...
@@ -244,12 +245,12 @@ static void q40_timer_int (int irq, void * dev, struct pt_regs * regs)
*
DAC_RIGHT
=
sval
;
*
DAC_RIGHT
=
sval
;
}
}
if
(
ql_ticks
)
return
;
if
(
!
ql_ticks
)
q40_timer_routine
(
irq
,
dev
,
regs
);
q40_timer_routine
(
irq
,
dev
,
regs
)
;
return
IRQ_HANDLED
;
}
}
void
q40_sched_init
(
void
(
*
timer_routine
)(
int
,
void
*
,
struct
pt_regs
*
))
void
q40_sched_init
(
irqreturn_t
(
*
timer_routine
)(
int
,
void
*
,
struct
pt_regs
*
))
{
{
int
timer_irq
;
int
timer_irq
;
...
@@ -312,7 +313,7 @@ static int aliased_irq=0; /* how many times inside handler ?*/
...
@@ -312,7 +313,7 @@ static int aliased_irq=0; /* how many times inside handler ?*/
/* got level 2 interrupt, dispatch to ISA or keyboard/timer IRQs */
/* got level 2 interrupt, dispatch to ISA or keyboard/timer IRQs */
void
q40_irq2_handler
(
int
vec
,
void
*
devname
,
struct
pt_regs
*
fp
)
irqreturn_t
q40_irq2_handler
(
int
vec
,
void
*
devname
,
struct
pt_regs
*
fp
)
{
{
unsigned
mir
,
mer
;
unsigned
mir
,
mer
;
int
irq
,
i
;
int
irq
,
i
;
...
@@ -378,7 +379,7 @@ void q40_irq2_handler (int vec, void *devname, struct pt_regs *fp)
...
@@ -378,7 +379,7 @@ void q40_irq2_handler (int vec, void *devname, struct pt_regs *fp)
#endif
#endif
}
}
// used to do 'goto repeat;' her, this delayed bh processing too long
// used to do 'goto repeat;' her, this delayed bh processing too long
return
;
return
IRQ_HANDLED
;
}
}
}
}
if
(
mer
&&
ccleirq
>
0
&&
!
aliased_irq
)
if
(
mer
&&
ccleirq
>
0
&&
!
aliased_irq
)
...
@@ -390,6 +391,7 @@ void q40_irq2_handler (int vec, void *devname, struct pt_regs *fp)
...
@@ -390,6 +391,7 @@ void q40_irq2_handler (int vec, void *devname, struct pt_regs *fp)
irq_tab
[
Q40_IRQ_KEYBOARD
].
count
++
;
irq_tab
[
Q40_IRQ_KEYBOARD
].
count
++
;
irq_tab
[
Q40_IRQ_KEYBOARD
].
handler
(
Q40_IRQ_KEYBOARD
,
irq_tab
[
Q40_IRQ_KEYBOARD
].
dev_id
,
fp
);
irq_tab
[
Q40_IRQ_KEYBOARD
].
handler
(
Q40_IRQ_KEYBOARD
,
irq_tab
[
Q40_IRQ_KEYBOARD
].
dev_id
,
fp
);
}
}
return
IRQ_HANDLED
;
}
}
int
show_q40_interrupts
(
struct
seq_file
*
p
,
void
*
v
)
int
show_q40_interrupts
(
struct
seq_file
*
p
,
void
*
v
)
...
@@ -409,16 +411,18 @@ int show_q40_interrupts (struct seq_file *p, void *v)
...
@@ -409,16 +411,18 @@ int show_q40_interrupts (struct seq_file *p, void *v)
}
}
static
void
q40_defhand
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
fp
)
static
irqreturn_t
q40_defhand
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
fp
)
{
{
printk
(
"Unknown q40 interrupt 0x%02x
\n
"
,
irq
);
printk
(
"Unknown q40 interrupt 0x%02x
\n
"
,
irq
);
return
IRQ_NONE
;
}
}
static
void
sys_default_handler
(
int
lev
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
static
irqreturn_t
sys_default_handler
(
int
lev
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
{
{
printk
(
"Uninitialised interrupt level %d
\n
"
,
lev
);
printk
(
"Uninitialised interrupt level %d
\n
"
,
lev
);
return
IRQ_NONE
;
}
}
void
(
*
q40_sys_default_handler
[
SYS_IRQS
])
(
int
,
void
*
,
struct
pt_regs
*
)
=
{
irqreturn_t
(
*
q40_sys_default_handler
[
SYS_IRQS
])
(
int
,
void
*
,
struct
pt_regs
*
)
=
{
sys_default_handler
,
sys_default_handler
,
sys_default_handler
,
sys_default_handler
,
sys_default_handler
,
sys_default_handler
,
sys_default_handler
,
sys_default_handler
,
sys_default_handler
,
sys_default_handler
,
sys_default_handler
,
sys_default_handler
sys_default_handler
,
sys_default_handler
,
sys_default_handler
,
sys_default_handler
};
};
...
...
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