Merge branch 'pm-runtime'
[linux-2.6-block.git] / arch / arm / mach-s3c24xx / s3c2442.c
CommitLineData
a21765a7 1/* linux/arch/arm/mach-s3c2442/s3c2442.c
96ce2385 2 *
491547d4
BD
3 * Copyright (c) 2004-2005 Simtec Electronics
4 * http://armlinux.simtec.co.uk/
5 * Ben Dooks <ben@simtec.co.uk>
96ce2385 6 *
491547d4 7 * S3C2442 core and lock support
96ce2385
BD
8 *
9 * This program is free software; you can redistribute it and/or modify
491547d4
BD
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
96ce2385
BD
22*/
23
491547d4
BD
24#include <linux/init.h>
25#include <linux/module.h>
96ce2385 26#include <linux/kernel.h>
96ce2385 27#include <linux/list.h>
491547d4
BD
28#include <linux/errno.h>
29#include <linux/err.h>
30#include <linux/device.h>
bb072c3c 31#include <linux/syscore_ops.h>
491547d4
BD
32#include <linux/interrupt.h>
33#include <linux/ioport.h>
34#include <linux/mutex.h>
812c4e40 35#include <linux/gpio.h>
491547d4
BD
36#include <linux/clk.h>
37#include <linux/io.h>
96ce2385 38
491547d4 39#include <mach/hardware.h>
b0161caa 40#include <mach/gpio-samsung.h>
60063497 41#include <linux/atomic.h>
491547d4
BD
42#include <asm/irq.h>
43
44#include <mach/regs-clock.h>
45
a2b7ba9c 46#include <plat/cpu.h>
bb072c3c 47#include <plat/pm.h>
812c4e40
VK
48
49#include <plat/gpio-core.h>
50#include <plat/gpio-cfg.h>
51#include <plat/gpio-cfg-helpers.h>
96ce2385 52
d8fdec16
HS
53#include "common.h"
54
4a858cfc
KS
55static struct device s3c2442_dev = {
56 .bus = &s3c2442_subsys,
96ce2385
BD
57};
58
59int __init s3c2442_init(void)
60{
61 printk("S3C2442: Initialising architecture\n");
62
fb630b9f 63#ifdef CONFIG_PM
bb072c3c 64 register_syscore_ops(&s3c2410_pm_syscore_ops);
d8fdec16 65 register_syscore_ops(&s3c24xx_irq_syscore_ops);
fb630b9f 66#endif
bb072c3c 67 register_syscore_ops(&s3c244x_pm_syscore_ops);
bb072c3c 68
4a858cfc 69 return device_register(&s3c2442_dev);
96ce2385 70}
812c4e40
VK
71
72void __init s3c2442_map_io(void)
73{
74 s3c244x_map_io();
75
782d8a3c
KK
76 s3c24xx_gpiocfg_default.set_pull = s3c24xx_gpio_setpull_1down;
77 s3c24xx_gpiocfg_default.get_pull = s3c24xx_gpio_getpull_1down;
812c4e40 78}