Back to home page

OSCL-LXR

 
 

    


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