~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to arch/arm/mach-s3c2440/s3c244x.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
#include <linux/serial_core.h>
20
20
#include <linux/platform_device.h>
21
21
#include <linux/sysdev.h>
 
22
#include <linux/syscore_ops.h>
22
23
#include <linux/clk.h>
23
24
#include <linux/io.h>
24
25
 
134
135
        s3c2410_baseclk_add();
135
136
}
136
137
 
137
 
#ifdef CONFIG_PM
138
 
 
139
 
static struct sleep_save s3c244x_sleep[] = {
140
 
        SAVE_ITEM(S3C2440_DSC0),
141
 
        SAVE_ITEM(S3C2440_DSC1),
142
 
        SAVE_ITEM(S3C2440_GPJDAT),
143
 
        SAVE_ITEM(S3C2440_GPJCON),
144
 
        SAVE_ITEM(S3C2440_GPJUP)
145
 
};
146
 
 
147
 
static int s3c244x_suspend(struct sys_device *dev, pm_message_t state)
148
 
{
149
 
        s3c_pm_do_save(s3c244x_sleep, ARRAY_SIZE(s3c244x_sleep));
150
 
        return 0;
151
 
}
152
 
 
153
 
static int s3c244x_resume(struct sys_device *dev)
154
 
{
155
 
        s3c_pm_do_restore(s3c244x_sleep, ARRAY_SIZE(s3c244x_sleep));
156
 
        return 0;
157
 
}
158
 
 
159
 
#else
160
 
#define s3c244x_suspend NULL
161
 
#define s3c244x_resume  NULL
162
 
#endif
163
 
 
164
138
/* Since the S3C2442 and S3C2440 share  items, put both sysclasses here */
165
139
 
166
140
struct sysdev_class s3c2440_sysclass = {
167
141
        .name           = "s3c2440-core",
168
 
        .suspend        = s3c244x_suspend,
169
 
        .resume         = s3c244x_resume
170
142
};
171
143
 
172
144
struct sysdev_class s3c2442_sysclass = {
173
145
        .name           = "s3c2442-core",
174
 
        .suspend        = s3c244x_suspend,
175
 
        .resume         = s3c244x_resume
176
146
};
177
147
 
178
148
/* need to register class before we actually register the device, and
194
164
}
195
165
 
196
166
core_initcall(s3c2442_core_init);
 
167
 
 
168
 
 
169
#ifdef CONFIG_PM
 
170
static struct sleep_save s3c244x_sleep[] = {
 
171
        SAVE_ITEM(S3C2440_DSC0),
 
172
        SAVE_ITEM(S3C2440_DSC1),
 
173
        SAVE_ITEM(S3C2440_GPJDAT),
 
174
        SAVE_ITEM(S3C2440_GPJCON),
 
175
        SAVE_ITEM(S3C2440_GPJUP)
 
176
};
 
177
 
 
178
static int s3c244x_suspend(void)
 
179
{
 
180
        s3c_pm_do_save(s3c244x_sleep, ARRAY_SIZE(s3c244x_sleep));
 
181
        return 0;
 
182
}
 
183
 
 
184
static void s3c244x_resume(void)
 
185
{
 
186
        s3c_pm_do_restore(s3c244x_sleep, ARRAY_SIZE(s3c244x_sleep));
 
187
}
 
188
#else
 
189
#define s3c244x_suspend NULL
 
190
#define s3c244x_resume  NULL
 
191
#endif
 
192
 
 
193
struct syscore_ops s3c244x_pm_syscore_ops = {
 
194
        .suspend        = s3c244x_suspend,
 
195
        .resume         = s3c244x_resume,
 
196
};