Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0+
0002 //
0003 // Copyright (c) 2004-2005 Simtec Electronics
0004 //  http://armlinux.simtec.co.uk/
0005 //  Ben Dooks <ben@simtec.co.uk>
0006 //
0007 // S3C2442 core and lock support
0008 
0009 #include <linux/init.h>
0010 #include <linux/module.h>
0011 #include <linux/kernel.h>
0012 #include <linux/list.h>
0013 #include <linux/errno.h>
0014 #include <linux/err.h>
0015 #include <linux/device.h>
0016 #include <linux/syscore_ops.h>
0017 #include <linux/interrupt.h>
0018 #include <linux/ioport.h>
0019 #include <linux/mutex.h>
0020 #include <linux/gpio.h>
0021 #include <linux/clk.h>
0022 #include <linux/io.h>
0023 
0024 #include <linux/atomic.h>
0025 #include <asm/irq.h>
0026 
0027 #include "regs-clock.h"
0028 
0029 #include "cpu.h"
0030 #include "pm.h"
0031 
0032 #include "gpio-core.h"
0033 #include "gpio-cfg.h"
0034 #include "gpio-cfg-helpers.h"
0035 #include "gpio-samsung.h"
0036 
0037 #include "s3c24xx.h"
0038 
0039 static struct device s3c2442_dev = {
0040     .bus        = &s3c2442_subsys,
0041 };
0042 
0043 int __init s3c2442_init(void)
0044 {
0045     printk("S3C2442: Initialising architecture\n");
0046 
0047 #ifdef CONFIG_PM_SLEEP
0048     register_syscore_ops(&s3c2410_pm_syscore_ops);
0049     register_syscore_ops(&s3c24xx_irq_syscore_ops);
0050     register_syscore_ops(&s3c244x_pm_syscore_ops);
0051 #endif
0052 
0053     return device_register(&s3c2442_dev);
0054 }
0055 
0056 void __init s3c2442_map_io(void)
0057 {
0058     s3c244x_map_io();
0059 
0060     s3c24xx_gpiocfg_default.set_pull = s3c24xx_gpio_setpull_1down;
0061     s3c24xx_gpiocfg_default.get_pull = s3c24xx_gpio_getpull_1down;
0062 }