blob: f7663f731ea0728137700c3ada958800a54296db [file] [log] [blame]
Ben Dooksa21765a2007-02-11 18:31:01 +01001/* linux/arch/arm/mach-s3c2440/s3c2440.c
Linus Torvalds1da177e2005-04-16 15:20:36 -07002 *
Ben Dooks96ce2382006-06-18 23:06:41 +01003 * Copyright (c) 2004-2006 Simtec Electronics
Linus Torvalds1da177e2005-04-16 15:20:36 -07004 * 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.
Linus Torvalds1da177e2005-04-16 15:20:36 -070011*/
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>
Russell Kingd052d1b2005-10-29 19:07:23 +010019#include <linux/platform_device.h>
Ben Dooksb6d1f542006-12-17 23:22:26 +010020#include <linux/serial_core.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070021#include <linux/sysdev.h>
Ben Dooks1ec72692010-05-03 14:39:45 +090022#include <linux/gpio.h>
Russell Kingf8ce2542006-01-07 16:15:52 +000023#include <linux/clk.h>
Russell Kingfced80c2008-09-06 12:10:45 +010024#include <linux/io.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070025
26#include <asm/mach/arch.h>
27#include <asm/mach/map.h>
28#include <asm/mach/irq.h>
29
Russell Kinga09e64f2008-08-05 16:14:15 +010030#include <mach/hardware.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070031#include <asm/irq.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070032
Ben Dooksa2b7ba92008-10-07 22:26:09 +010033#include <plat/devs.h>
34#include <plat/cpu.h>
Ben Dooks84c9b722010-01-26 16:54:21 +090035#include <plat/s3c244x.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070036
Ben Dooks1ec72692010-05-03 14:39:45 +090037#include <plat/gpio-core.h>
38#include <plat/gpio-cfg.h>
39#include <plat/gpio-cfg-helpers.h>
40
Linus Torvalds1da177e2005-04-16 15:20:36 -070041static struct sys_device s3c2440_sysdev = {
42 .cls = &s3c2440_sysclass,
43};
44
Ben Dooks96ce2382006-06-18 23:06:41 +010045int __init s3c2440_init(void)
Linus Torvalds1da177e2005-04-16 15:20:36 -070046{
Ben Dooks96ce2382006-06-18 23:06:41 +010047 printk("S3C2440: Initialising architecture\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -070048
49 /* change irq for watchdog */
50
51 s3c_device_wdt.resource[1].start = IRQ_S3C2440_WDT;
52 s3c_device_wdt.resource[1].end = IRQ_S3C2440_WDT;
Linus Torvalds1da177e2005-04-16 15:20:36 -070053
Ben Dooks96ce2382006-06-18 23:06:41 +010054 /* register our system device for everything else */
Linus Torvalds1da177e2005-04-16 15:20:36 -070055
Ben Dooks66a9b492006-06-18 23:04:05 +010056 return sysdev_register(&s3c2440_sysdev);
Linus Torvalds1da177e2005-04-16 15:20:36 -070057}
Vasily Khoruzhick812c4e42010-12-01 08:29:23 +020058
59void __init s3c2440_map_io(void)
60{
61 s3c244x_map_io();
62
63 s3c24xx_gpiocfg_default.set_pull = s3c_gpio_setpull_1up;
64 s3c24xx_gpiocfg_default.get_pull = s3c_gpio_getpull_1up;
65}