Linux Audio

Check our new training course

Linux kernel drivers training

May 6-19, 2025
Register
Loading...
v6.2
 1// SPDX-License-Identifier: GPL-2.0
 2//
 3// Copyright 2008 Simtec Electronics
 4// Copyright 2008 Simtec Electronics
 5//	Ben Dooks <ben@simtec.co.uk>
 6//	http://armlinux.simtec.co.uk/
 7
 8/*
 9 * NOTE: Code in this file is not used when booting with Device Tree support.
10 */
11
12#include <linux/kernel.h>
13#include <linux/types.h>
14#include <linux/interrupt.h>
15#include <linux/list.h>
16#include <linux/timer.h>
17#include <linux/init.h>
18#include <linux/clk.h>
19#include <linux/io.h>
20#include <linux/device.h>
21#include <linux/serial_core.h>
22#include <linux/serial_s3c.h>
23#include <linux/platform_device.h>
24#include <linux/of.h>
25
26#include <asm/mach/arch.h>
27#include <asm/mach/map.h>
28#include <asm/mach/irq.h>
29
30#include <asm/irq.h>
31
32#include <linux/soc/samsung/s3c-pm.h>
33#include "regs-clock.h"
34
35#include "cpu.h"
36#include "devs.h"
37#include "sdhci.h"
38#include "adc-core.h"
39#include "iic-core.h"
40
41#include "ata-core-s3c64xx.h"
42#include "s3c64xx.h"
43#include "onenand-core-s3c64xx.h"
44
45void __init s3c6410_map_io(void)
46{
47	/* initialise device information early */
48	s3c6410_default_sdhci0();
49	s3c6410_default_sdhci1();
50	s3c6410_default_sdhci2();
51
52	/* the i2c devices are directly compatible with s3c2440 */
53	s3c_i2c0_setname("s3c2440-i2c");
54	s3c_i2c1_setname("s3c2440-i2c");
55
56	s3c_adc_setname("s3c64xx-adc");
57	s3c_device_nand.name = "s3c6400-nand";
58	s3c_onenand_setname("s3c6410-onenand");
59	s3c64xx_onenand1_setname("s3c6410-onenand");
60	s3c_cfcon_setname("s3c64xx-pata");
61}
62
63void __init s3c6410_init_irq(void)
64{
65	/* VIC0 is missing IRQ7, VIC1 is fully populated. */
66	s3c64xx_init_irq(~0 & ~(1 << 7), ~0);
67}
68
69struct bus_type s3c6410_subsys = {
70	.name		= "s3c6410-core",
71	.dev_name	= "s3c6410-core",
72};
73
74static struct device s3c6410_dev = {
75	.bus	= &s3c6410_subsys,
76};
77
78static int __init s3c6410_core_init(void)
79{
80	/* Not applicable when using DT. */
81	if (of_have_populated_dt() || !soc_is_s3c64xx())
82		return 0;
83
84	return subsys_system_register(&s3c6410_subsys, NULL);
85}
86
87core_initcall(s3c6410_core_init);
88
89int __init s3c6410_init(void)
90{
91	printk("S3C6410: Initialising architecture\n");
92
93	return device_register(&s3c6410_dev);
94}
v6.9.4
 1// SPDX-License-Identifier: GPL-2.0
 2//
 3// Copyright 2008 Simtec Electronics
 4// Copyright 2008 Simtec Electronics
 5//	Ben Dooks <ben@simtec.co.uk>
 6//	http://armlinux.simtec.co.uk/
 7
 8/*
 9 * NOTE: Code in this file is not used when booting with Device Tree support.
10 */
11
12#include <linux/kernel.h>
13#include <linux/types.h>
14#include <linux/interrupt.h>
15#include <linux/list.h>
16#include <linux/timer.h>
17#include <linux/init.h>
18#include <linux/clk.h>
19#include <linux/io.h>
20#include <linux/device.h>
21#include <linux/serial_core.h>
22#include <linux/serial_s3c.h>
23#include <linux/platform_device.h>
24#include <linux/of.h>
25
26#include <asm/mach/arch.h>
27#include <asm/mach/map.h>
28#include <asm/mach/irq.h>
29
30#include <asm/irq.h>
31
32#include <linux/soc/samsung/s3c-pm.h>
33#include "regs-clock.h"
34
35#include "cpu.h"
36#include "devs.h"
37#include "sdhci.h"
 
38#include "iic-core.h"
39
 
40#include "s3c64xx.h"
 
41
42void __init s3c6410_map_io(void)
43{
44	/* initialise device information early */
45	s3c6410_default_sdhci0();
46	s3c6410_default_sdhci1();
47	s3c6410_default_sdhci2();
48
49	/* the i2c devices are directly compatible with s3c2440 */
50	s3c_i2c0_setname("s3c2440-i2c");
51	s3c_i2c1_setname("s3c2440-i2c");
 
 
 
 
 
 
52}
53
54void __init s3c6410_init_irq(void)
55{
56	/* VIC0 is missing IRQ7, VIC1 is fully populated. */
57	s3c64xx_init_irq(~0 & ~(1 << 7), ~0);
58}
59
60const struct bus_type s3c6410_subsys = {
61	.name		= "s3c6410-core",
62	.dev_name	= "s3c6410-core",
63};
64
65static struct device s3c6410_dev = {
66	.bus	= &s3c6410_subsys,
67};
68
69static int __init s3c6410_core_init(void)
70{
71	/* Not applicable when using DT. */
72	if (of_have_populated_dt() || !soc_is_s3c64xx())
73		return 0;
74
75	return subsys_system_register(&s3c6410_subsys, NULL);
76}
77
78core_initcall(s3c6410_core_init);
79
80int __init s3c6410_init(void)
81{
82	printk("S3C6410: Initialising architecture\n");
83
84	return device_register(&s3c6410_dev);
85}