cachepc-linux

Fork of AMDESE/linux with modifications for CachePC side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-linux
Log | Files | Refs | README | LICENSE | sfeed.txt

s3c2440.c (1568B)


      1// SPDX-License-Identifier: GPL-2.0
      2//
      3// Copyright (c) 2004-2006 Simtec Electronics
      4//   Ben Dooks <ben@simtec.co.uk>
      5//
      6// Samsung S3C2440 Mobile CPU support
      7
      8#include <linux/kernel.h>
      9#include <linux/types.h>
     10#include <linux/interrupt.h>
     11#include <linux/list.h>
     12#include <linux/timer.h>
     13#include <linux/init.h>
     14#include <linux/platform_device.h>
     15#include <linux/serial_core.h>
     16#include <linux/device.h>
     17#include <linux/syscore_ops.h>
     18#include <linux/gpio.h>
     19#include <linux/clk.h>
     20#include <linux/io.h>
     21
     22#include <asm/mach/arch.h>
     23#include <asm/mach/map.h>
     24#include <asm/mach/irq.h>
     25
     26#include <asm/irq.h>
     27
     28#include "devs.h"
     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
     39static struct device s3c2440_dev = {
     40	.bus		= &s3c2440_subsys,
     41};
     42
     43int __init s3c2440_init(void)
     44{
     45	printk("S3C2440: Initialising architecture\n");
     46
     47	/* change irq for watchdog */
     48
     49	s3c_device_wdt.resource[1].start = IRQ_S3C2440_WDT;
     50	s3c_device_wdt.resource[1].end   = IRQ_S3C2440_WDT;
     51
     52	/* register suspend/resume handlers */
     53
     54#ifdef CONFIG_PM_SLEEP
     55	register_syscore_ops(&s3c2410_pm_syscore_ops);
     56	register_syscore_ops(&s3c24xx_irq_syscore_ops);
     57	register_syscore_ops(&s3c244x_pm_syscore_ops);
     58#endif
     59
     60	/* register our system device for everything else */
     61
     62	return device_register(&s3c2440_dev);
     63}
     64
     65void __init s3c2440_map_io(void)
     66{
     67	s3c244x_map_io();
     68
     69	s3c24xx_gpiocfg_default.set_pull = s3c24xx_gpio_setpull_1up;
     70	s3c24xx_gpiocfg_default.get_pull = s3c24xx_gpio_getpull_1up;
     71}