Commit | Line | Data |
---|---|---|
a21765a7 | 1 | /* linux/arch/arm/mach-s3c2440/s3c2440.c |
1da177e4 | 2 | * |
96ce2385 | 3 | * Copyright (c) 2004-2006 Simtec Electronics |
1da177e4 LT |
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. | |
1da177e4 LT |
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> | |
d052d1be | 19 | #include <linux/platform_device.h> |
b6d1f542 | 20 | #include <linux/serial_core.h> |
4a858cfc | 21 | #include <linux/device.h> |
bb072c3c | 22 | #include <linux/syscore_ops.h> |
1ec7269f | 23 | #include <linux/gpio.h> |
f8ce2547 | 24 | #include <linux/clk.h> |
fced80c7 | 25 | #include <linux/io.h> |
1da177e4 LT |
26 | |
27 | #include <asm/mach/arch.h> | |
28 | #include <asm/mach/map.h> | |
29 | #include <asm/mach/irq.h> | |
30 | ||
a09e64fb | 31 | #include <mach/hardware.h> |
1da177e4 | 32 | #include <asm/irq.h> |
1da177e4 | 33 | |
a2b7ba9c BD |
34 | #include <plat/devs.h> |
35 | #include <plat/cpu.h> | |
84c9b727 | 36 | #include <plat/s3c244x.h> |
bb072c3c | 37 | #include <plat/pm.h> |
1da177e4 | 38 | |
1ec7269f BD |
39 | #include <plat/gpio-core.h> |
40 | #include <plat/gpio-cfg.h> | |
41 | #include <plat/gpio-cfg-helpers.h> | |
42 | ||
4a858cfc KS |
43 | static struct device s3c2440_dev = { |
44 | .bus = &s3c2440_subsys, | |
1da177e4 LT |
45 | }; |
46 | ||
96ce2385 | 47 | int __init s3c2440_init(void) |
1da177e4 | 48 | { |
96ce2385 | 49 | printk("S3C2440: Initialising architecture\n"); |
1da177e4 LT |
50 | |
51 | /* change irq for watchdog */ | |
52 | ||
53 | s3c_device_wdt.resource[1].start = IRQ_S3C2440_WDT; | |
54 | s3c_device_wdt.resource[1].end = IRQ_S3C2440_WDT; | |
1da177e4 | 55 | |
bb072c3c RW |
56 | /* register suspend/resume handlers */ |
57 | ||
fb630b9f | 58 | #ifdef CONFIG_PM |
bb072c3c | 59 | register_syscore_ops(&s3c2410_pm_syscore_ops); |
fb630b9f | 60 | #endif |
bb072c3c RW |
61 | register_syscore_ops(&s3c244x_pm_syscore_ops); |
62 | register_syscore_ops(&s3c24xx_irq_syscore_ops); | |
63 | ||
96ce2385 | 64 | /* register our system device for everything else */ |
1da177e4 | 65 | |
4a858cfc | 66 | return device_register(&s3c2440_dev); |
1da177e4 | 67 | } |
812c4e40 VK |
68 | |
69 | void __init s3c2440_map_io(void) | |
70 | { | |
71 | s3c244x_map_io(); | |
72 | ||
782d8a3c KK |
73 | s3c24xx_gpiocfg_default.set_pull = s3c24xx_gpio_setpull_1up; |
74 | s3c24xx_gpiocfg_default.get_pull = s3c24xx_gpio_getpull_1up; | |
812c4e40 | 75 | } |