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
f869b87c
Commit
f869b87c
authored
Jun 10, 2003
by
Patrick Mochel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[sa1100 irq] Convert to new system device API.
parent
3db29faf
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
57 deletions
+36
-57
arch/arm/mach-sa1100/irq.c
arch/arm/mach-sa1100/irq.c
+36
-57
No files found.
arch/arm/mach-sa1100/irq.c
View file @
f869b87c
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
#include <linux/module.h>
#include <linux/module.h>
#include <linux/ioport.h>
#include <linux/ioport.h>
#include <linux/ptrace.h>
#include <linux/ptrace.h>
#include <linux/
device
.h>
#include <linux/
sysdev
.h>
#include <asm/hardware.h>
#include <asm/hardware.h>
#include <asm/irq.h>
#include <asm/irq.h>
...
@@ -211,25 +211,16 @@ static struct resource irq_resource = {
...
@@ -211,25 +211,16 @@ static struct resource irq_resource = {
.
end
=
0x9005ffff
,
.
end
=
0x9005ffff
,
};
};
st
ruct
sa1100irq_state
{
st
atic
struct
{
unsigned
int
saved
;
unsigned
int
saved
;
unsigned
int
icmr
;
unsigned
int
icmr
;
unsigned
int
iclr
;
unsigned
int
iclr
;
unsigned
int
iccr
;
unsigned
int
iccr
;
};
}
sa1100irq_state
;
static
int
sa1100irq_suspend
(
struct
device
*
dev
,
u32
state
,
u32
level
)
static
int
sa1100irq_suspend
(
struct
device
*
dev
,
u32
state
,
u32
level
)
{
{
struct
sa1100irq_state
*
st
;
struct
sa1100irq_state
*
st
=
&
sa1100irq_state
;
if
(
!
dev
->
saved_state
&&
level
==
SUSPEND_NOTIFY
)
dev
->
saved_state
=
kmalloc
(
sizeof
(
struct
sa1100irq_state
),
GFP_KERNEL
);
if
(
!
dev
->
saved_state
)
return
-
ENOMEM
;
if
(
level
==
SUSPEND_POWER_DOWN
)
{
st
=
(
struct
sa1100irq_state
*
)
dev
->
saved_state
;
st
->
saved
=
1
;
st
->
saved
=
1
;
st
->
icmr
=
ICMR
;
st
->
icmr
=
ICMR
;
...
@@ -253,17 +244,13 @@ static int sa1100irq_suspend(struct device *dev, u32 state, u32 level)
...
@@ -253,17 +244,13 @@ static int sa1100irq_suspend(struct device *dev, u32 state, u32 level)
* Clear any pending GPIO interrupts.
* Clear any pending GPIO interrupts.
*/
*/
GEDR
=
GEDR
;
GEDR
=
GEDR
;
}
return
0
;
return
0
;
}
}
static
int
sa1100irq_resume
(
struct
device
*
dev
,
u32
level
)
static
int
sa1100irq_resume
(
struct
sys_device
*
dev
)
{
{
struct
sa1100irq_state
*
st
;
struct
sa1100irq_state
*
st
=
&
sa1100irq_state
;
if
(
level
==
RESUME_POWER_ON
)
{
st
=
(
struct
sa1100irq_state
*
)
dev
->
saved_state
;
dev
->
saved_state
=
NULL
;
if
(
st
->
saved
)
{
if
(
st
->
saved
)
{
ICCR
=
st
->
iccr
;
ICCR
=
st
->
iccr
;
...
@@ -274,31 +261,23 @@ static int sa1100irq_resume(struct device *dev, u32 level)
...
@@ -274,31 +261,23 @@ static int sa1100irq_resume(struct device *dev, u32 level)
ICMR
=
st
->
icmr
;
ICMR
=
st
->
icmr
;
}
}
kfree
(
st
);
}
return
0
;
return
0
;
}
}
static
struct
device_driver
sa1100irq_driver
=
{
static
struct
sysdev_class
sa1100irq_sysclass
=
{
.
name
=
"sa11x0-irq"
,
set_kset_name
(
"sa11x0-irq"
),
.
bus
=
&
system_bus_type
,
.
suspend
=
sa1100irq_suspend
,
.
suspend
=
sa1100irq_suspend
,
.
resume
=
sa1100irq_resume
,
.
resume
=
sa1100irq_resume
,
};
};
static
struct
sys_device
sa1100irq_device
=
{
static
struct
sys_device
sa1100irq_device
=
{
.
name
=
"irq"
,
.
id
=
0
,
.
id
=
0
,
.
dev
=
{
.
cls
=
&
sa1100irq_sysclass
,
.
name
=
"Intel SA11x0 [Interrupt Controller]"
,
.
driver
=
&
sa1100irq_driver
,
},
};
};
static
int
__init
sa1100irq_init_devicefs
(
void
)
static
int
__init
sa1100irq_init_devicefs
(
void
)
{
{
driver_register
(
&
sa1100irq_driver
);
sysdev_class_register
(
&
sa1100irq_sysclass
);
return
sys_device_register
(
&
sa1100irq_device
);
return
sys_device_register
(
&
sa1100irq_device
);
}
}
...
...
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