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
f113fe4e
Commit
f113fe4e
authored
Nov 23, 2010
by
Eric Miao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ARM: pxa: introduce pxa2xx_clock_sysclass for clock suspend/resume
Signed-off-by:
Eric Miao
<
eric.y.miao@gmail.com
>
parent
2a125dd5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
8 deletions
+35
-8
arch/arm/mach-pxa/clock-pxa2xx.c
arch/arm/mach-pxa/clock-pxa2xx.c
+26
-0
arch/arm/mach-pxa/clock.h
arch/arm/mach-pxa/clock.h
+3
-0
arch/arm/mach-pxa/pxa25x.c
arch/arm/mach-pxa/pxa25x.c
+3
-4
arch/arm/mach-pxa/pxa27x.c
arch/arm/mach-pxa/pxa27x.c
+3
-4
No files found.
arch/arm/mach-pxa/clock-pxa2xx.c
View file @
f113fe4e
...
...
@@ -9,6 +9,7 @@
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/sysdev.h>
#include <mach/pxa2xx-regs.h>
...
...
@@ -28,3 +29,28 @@ const struct clkops clk_pxa2xx_cken_ops = {
.
enable
=
clk_pxa2xx_cken_enable
,
.
disable
=
clk_pxa2xx_cken_disable
,
};
#ifdef CONFIG_PM
static
uint32_t
saved_cken
;
static
int
pxa2xx_clock_suspend
(
struct
sys_device
*
d
,
pm_message_t
state
)
{
saved_cken
=
CKEN
;
return
0
;
}
static
int
pxa2xx_clock_resume
(
struct
sys_device
*
d
)
{
CKEN
=
saved_cken
;
return
0
;
}
#else
#define pxa2xx_clock_suspend NULL
#define pxa2xx_clock_resume NULL
#endif
struct
sysdev_class
pxa2xx_clock_sysclass
=
{
.
name
=
"pxa2xx-clock"
,
.
suspend
=
pxa2xx_clock_suspend
,
.
resume
=
pxa2xx_clock_resume
,
};
arch/arm/mach-pxa/clock.h
View file @
f113fe4e
#include <linux/sysdev.h>
#include <asm/clkdev.h>
struct
clkops
{
...
...
@@ -53,6 +54,8 @@ extern const struct clkops clk_pxa2xx_cken_ops;
void
clk_pxa2xx_cken_enable
(
struct
clk
*
clk
);
void
clk_pxa2xx_cken_disable
(
struct
clk
*
clk
);
extern
struct
sysdev_class
pxa2xx_clock_sysclass
;
#ifdef CONFIG_PXA3xx
#define DEFINE_PXA3_CKEN(_name, _cken, _rate, _delay) \
struct clk clk_##_name = { \
...
...
arch/arm/mach-pxa/pxa25x.c
View file @
f113fe4e
...
...
@@ -222,20 +222,17 @@ static struct clk_lookup pxa25x_hwuart_clkreg =
*/
enum
{
SLEEP_SAVE_PSTR
,
SLEEP_SAVE_CKEN
,
SLEEP_SAVE_COUNT
};
static
void
pxa25x_cpu_pm_save
(
unsigned
long
*
sleep_save
)
{
SAVE
(
CKEN
);
SAVE
(
PSTR
);
}
static
void
pxa25x_cpu_pm_restore
(
unsigned
long
*
sleep_save
)
{
RESTORE
(
CKEN
);
RESTORE
(
PSTR
);
}
...
...
@@ -358,7 +355,9 @@ static struct sys_device pxa25x_sysdev[] = {
.
cls
=
&
pxa2xx_mfp_sysclass
,
},
{
.
cls
=
&
pxa_gpio_sysclass
,
},
},
{
.
cls
=
&
pxa2xx_clock_sysclass
,
}
};
static
int
__init
pxa25x_init
(
void
)
...
...
arch/arm/mach-pxa/pxa27x.c
View file @
f113fe4e
...
...
@@ -258,7 +258,6 @@ int __init pxa27x_set_pwrmode(unsigned int mode)
*/
enum
{
SLEEP_SAVE_PSTR
,
SLEEP_SAVE_CKEN
,
SLEEP_SAVE_MDREFR
,
SLEEP_SAVE_PCFR
,
SLEEP_SAVE_COUNT
...
...
@@ -269,7 +268,6 @@ void pxa27x_cpu_pm_save(unsigned long *sleep_save)
sleep_save
[
SLEEP_SAVE_MDREFR
]
=
__raw_readl
(
MDREFR
);
SAVE
(
PCFR
);
SAVE
(
CKEN
);
SAVE
(
PSTR
);
}
...
...
@@ -280,7 +278,6 @@ void pxa27x_cpu_pm_restore(unsigned long *sleep_save)
PSSR
=
PSSR_RDH
|
PSSR_PH
;
RESTORE
(
CKEN
);
RESTORE
(
PSTR
);
}
...
...
@@ -438,7 +435,9 @@ static struct sys_device pxa27x_sysdev[] = {
.
cls
=
&
pxa2xx_mfp_sysclass
,
},
{
.
cls
=
&
pxa_gpio_sysclass
,
},
},
{
.
cls
=
&
pxa2xx_clock_sysclass
,
}
};
static
int
__init
pxa27x_init
(
void
)
...
...
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