Merge remote-tracking branches 'regulator/fix/da9211', 'regulator/fix/ltc3589' and...
[sfrench/cifs-2.6.git] / arch / arm / mach-s3c24xx / s3c2442.c
1 /* linux/arch/arm/mach-s3c2442/s3c2442.c
2  *
3  * Copyright (c) 2004-2005 Simtec Electronics
4  *      http://armlinux.simtec.co.uk/
5  *      Ben Dooks <ben@simtec.co.uk>
6  *
7  * S3C2442 core and lock support
8  *
9  * This program is free software; you can redistribute it and/or modify
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
22 */
23
24 #include <linux/init.h>
25 #include <linux/module.h>
26 #include <linux/kernel.h>
27 #include <linux/list.h>
28 #include <linux/errno.h>
29 #include <linux/err.h>
30 #include <linux/device.h>
31 #include <linux/syscore_ops.h>
32 #include <linux/interrupt.h>
33 #include <linux/ioport.h>
34 #include <linux/mutex.h>
35 #include <linux/gpio.h>
36 #include <linux/clk.h>
37 #include <linux/io.h>
38
39 #include <mach/hardware.h>
40 #include <mach/gpio-samsung.h>
41 #include <linux/atomic.h>
42 #include <asm/irq.h>
43
44 #include <mach/regs-clock.h>
45
46 #include <plat/cpu.h>
47 #include <plat/pm.h>
48
49 #include <plat/gpio-core.h>
50 #include <plat/gpio-cfg.h>
51 #include <plat/gpio-cfg-helpers.h>
52
53 #include "common.h"
54
55 static struct device s3c2442_dev = {
56         .bus            = &s3c2442_subsys,
57 };
58
59 int __init s3c2442_init(void)
60 {
61         printk("S3C2442: Initialising architecture\n");
62
63 #ifdef CONFIG_PM
64         register_syscore_ops(&s3c2410_pm_syscore_ops);
65         register_syscore_ops(&s3c24xx_irq_syscore_ops);
66 #endif
67         register_syscore_ops(&s3c244x_pm_syscore_ops);
68
69         return device_register(&s3c2442_dev);
70 }
71
72 void __init s3c2442_map_io(void)
73 {
74         s3c244x_map_io();
75
76         s3c24xx_gpiocfg_default.set_pull = s3c24xx_gpio_setpull_1down;
77         s3c24xx_gpiocfg_default.get_pull = s3c24xx_gpio_getpull_1down;
78 }