Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0
0002 //
0003 // Copyright 2009 Simtec Electronics
0004 //  Ben Dooks <ben@simtec.co.uk>
0005 //  http://armlinux.simtec.co.uk/
0006 
0007 /*
0008  * NOTE: Code in this file is not used when booting with Device Tree support.
0009  */
0010 
0011 #include <linux/kernel.h>
0012 #include <linux/types.h>
0013 #include <linux/interrupt.h>
0014 #include <linux/list.h>
0015 #include <linux/timer.h>
0016 #include <linux/init.h>
0017 #include <linux/clk.h>
0018 #include <linux/io.h>
0019 #include <linux/device.h>
0020 #include <linux/serial_core.h>
0021 #include <linux/serial_s3c.h>
0022 #include <linux/platform_device.h>
0023 #include <linux/of.h>
0024 
0025 #include <asm/mach/arch.h>
0026 #include <asm/mach/map.h>
0027 #include <asm/mach/irq.h>
0028 
0029 #include <asm/irq.h>
0030 
0031 #include "regs-clock.h"
0032 
0033 #include "cpu.h"
0034 #include "devs.h"
0035 #include "sdhci.h"
0036 #include "iic-core.h"
0037 
0038 #include "s3c64xx.h"
0039 #include "onenand-core-s3c64xx.h"
0040 
0041 void __init s3c6400_map_io(void)
0042 {
0043     /* setup SDHCI */
0044 
0045     s3c6400_default_sdhci0();
0046     s3c6400_default_sdhci1();
0047     s3c6400_default_sdhci2();
0048 
0049     /* the i2c devices are directly compatible with s3c2440 */
0050     s3c_i2c0_setname("s3c2440-i2c");
0051 
0052     s3c_device_nand.name = "s3c6400-nand";
0053 
0054     s3c_onenand_setname("s3c6400-onenand");
0055     s3c64xx_onenand1_setname("s3c6400-onenand");
0056 }
0057 
0058 void __init s3c6400_init_irq(void)
0059 {
0060     /* VIC0 does not have IRQS 5..7,
0061      * VIC1 is fully populated. */
0062     s3c64xx_init_irq(~0 & ~(0xf << 5), ~0);
0063 }
0064 
0065 static struct bus_type s3c6400_subsys = {
0066     .name       = "s3c6400-core",
0067     .dev_name   = "s3c6400-core",
0068 };
0069 
0070 static struct device s3c6400_dev = {
0071     .bus    = &s3c6400_subsys,
0072 };
0073 
0074 static int __init s3c6400_core_init(void)
0075 {
0076     /* Not applicable when using DT. */
0077     if (of_have_populated_dt() || soc_is_s3c64xx())
0078         return 0;
0079 
0080     return subsys_system_register(&s3c6400_subsys, NULL);
0081 }
0082 
0083 core_initcall(s3c6400_core_init);
0084 
0085 int __init s3c6400_init(void)
0086 {
0087     printk("S3C6400: Initialising architecture\n");
0088 
0089     return device_register(&s3c6400_dev);
0090 }