GNU Linux-libre 6.1.90-gnu
[releases.git] / arch / arm / mach-s3c / s3c2442.c
1 // SPDX-License-Identifier: GPL-2.0+
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 #include <linux/init.h>
10 #include <linux/module.h>
11 #include <linux/kernel.h>
12 #include <linux/list.h>
13 #include <linux/errno.h>
14 #include <linux/err.h>
15 #include <linux/device.h>
16 #include <linux/syscore_ops.h>
17 #include <linux/interrupt.h>
18 #include <linux/ioport.h>
19 #include <linux/mutex.h>
20 #include <linux/gpio.h>
21 #include <linux/clk.h>
22 #include <linux/io.h>
23
24 #include <linux/atomic.h>
25 #include <asm/irq.h>
26
27 #include "regs-clock.h"
28
29 #include "cpu.h"
30 #include "pm.h"
31
32 #include "gpio-core.h"
33 #include "gpio-cfg.h"
34 #include "gpio-cfg-helpers.h"
35 #include "gpio-samsung.h"
36
37 #include "s3c24xx.h"
38
39 static struct device s3c2442_dev = {
40         .bus            = &s3c2442_subsys,
41 };
42
43 int __init s3c2442_init(void)
44 {
45         printk("S3C2442: Initialising architecture\n");
46
47 #ifdef CONFIG_PM_SLEEP
48         register_syscore_ops(&s3c2410_pm_syscore_ops);
49         register_syscore_ops(&s3c24xx_irq_syscore_ops);
50         register_syscore_ops(&s3c244x_pm_syscore_ops);
51 #endif
52
53         return device_register(&s3c2442_dev);
54 }
55
56 void __init s3c2442_map_io(void)
57 {
58         s3c244x_map_io();
59
60         s3c24xx_gpiocfg_default.set_pull = s3c24xx_gpio_setpull_1down;
61         s3c24xx_gpiocfg_default.get_pull = s3c24xx_gpio_getpull_1down;
62 }