blob: eb733555fab52d495be89fa14fba0407412ce13e [file] [log] [blame]
Kyle Swenson8d8f6542021-03-15 11:02:55 -06001/* linux/arch/arm/mach-s3c2440/s3c2440.c
2 *
3 * Copyright (c) 2004-2006 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * Samsung S3C2440 Mobile CPU support
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#include <linux/kernel.h>
14#include <linux/types.h>
15#include <linux/interrupt.h>
16#include <linux/list.h>
17#include <linux/timer.h>
18#include <linux/init.h>
19#include <linux/platform_device.h>
20#include <linux/serial_core.h>
21#include <linux/device.h>
22#include <linux/syscore_ops.h>
23#include <linux/gpio.h>
24#include <linux/clk.h>
25#include <linux/io.h>
26
27#include <asm/mach/arch.h>
28#include <asm/mach/map.h>
29#include <asm/mach/irq.h>
30
31#include <mach/hardware.h>
32#include <mach/gpio-samsung.h>
33#include <asm/irq.h>
34
35#include <plat/devs.h>
36#include <plat/cpu.h>
37#include <plat/pm.h>
38
39#include <plat/gpio-core.h>
40#include <plat/gpio-cfg.h>
41#include <plat/gpio-cfg-helpers.h>
42
43#include "common.h"
44
45static struct device s3c2440_dev = {
46 .bus = &s3c2440_subsys,
47};
48
49int __init s3c2440_init(void)
50{
51 printk("S3C2440: Initialising architecture\n");
52
53 /* change irq for watchdog */
54
55 s3c_device_wdt.resource[1].start = IRQ_S3C2440_WDT;
56 s3c_device_wdt.resource[1].end = IRQ_S3C2440_WDT;
57
58 /* register suspend/resume handlers */
59
60#ifdef CONFIG_PM_SLEEP
61 register_syscore_ops(&s3c2410_pm_syscore_ops);
62 register_syscore_ops(&s3c24xx_irq_syscore_ops);
63 register_syscore_ops(&s3c244x_pm_syscore_ops);
64#endif
65
66 /* register our system device for everything else */
67
68 return device_register(&s3c2440_dev);
69}
70
71void __init s3c2440_map_io(void)
72{
73 s3c244x_map_io();
74
75 s3c24xx_gpiocfg_default.set_pull = s3c24xx_gpio_setpull_1up;
76 s3c24xx_gpiocfg_default.get_pull = s3c24xx_gpio_getpull_1up;
77}