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
584d98be
Commit
584d98be
authored
Oct 11, 2007
by
Ralf Baechle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[MIPS] Jazz clockevent driver
Signed-off-by:
Ralf Baechle
<
ralf@linux-mips.org
>
parent
ea580401
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
7 deletions
+48
-7
arch/mips/jazz/irq.c
arch/mips/jazz/irq.c
+48
-0
arch/mips/jazz/setup.c
arch/mips/jazz/setup.c
+0
-7
No files found.
arch/mips/jazz/irq.c
View file @
584d98be
...
...
@@ -6,6 +6,7 @@
* Copyright (C) 1992 Linus Torvalds
* Copyright (C) 1994 - 2001, 2003 Ralf Baechle
*/
#include <linux/clockchips.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
...
...
@@ -105,3 +106,50 @@ asmlinkage void plat_irq_dispatch(void)
panic
(
"Unimplemented loc_no_irq handler"
);
}
}
static
void
r4030_set_mode
(
enum
clock_event_mode
mode
,
struct
clock_event_device
*
evt
)
{
/* Nothing to do ... */
}
struct
clock_event_device
r4030_clockevent
=
{
.
name
=
"r4030"
,
.
features
=
CLOCK_EVT_FEAT_PERIODIC
,
.
rating
=
100
,
.
irq
=
JAZZ_TIMER_IRQ
,
.
cpumask
=
CPU_MASK_CPU0
,
.
set_mode
=
r4030_set_mode
,
};
static
irqreturn_t
r4030_timer_interrupt
(
int
irq
,
void
*
dev_id
)
{
r4030_clockevent
.
event_handler
(
&
r4030_clockevent
);
return
IRQ_HANDLED
;
}
static
struct
irqaction
r4030_timer_irqaction
=
{
.
handler
=
r4030_timer_interrupt
,
.
flags
=
IRQF_DISABLED
,
.
mask
=
CPU_MASK_CPU0
,
.
name
=
"timer"
,
};
void
__init
plat_timer_setup
(
struct
irqaction
*
ignored
)
{
struct
irqaction
*
irq
=
&
r4030_timer_irqaction
;
BUG_ON
(
HZ
!=
100
);
/*
* Set clock to 100Hz.
*
* The R4030 timer receives an input clock of 1kHz which is divieded by
* a programmable 4-bit divider. This makes it fairly inflexible.
*/
r4030_write_reg32
(
JAZZ_TIMER_INTERVAL
,
9
);
setup_irq
(
JAZZ_TIMER_IRQ
,
irq
);
clockevents_register_device
(
&
r4030_clockevent
);
}
arch/mips/jazz/setup.c
View file @
584d98be
...
...
@@ -39,13 +39,6 @@ extern asmlinkage void jazz_handle_int(void);
extern
void
jazz_machine_restart
(
char
*
command
);
void
__init
plat_timer_setup
(
struct
irqaction
*
irq
)
{
/* set the clock to 100 Hz */
r4030_write_reg32
(
JAZZ_TIMER_INTERVAL
,
9
);
setup_irq
(
JAZZ_TIMER_IRQ
,
irq
);
}
static
struct
resource
jazz_io_resources
[]
=
{
{
.
start
=
0x00
,
...
...
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