12 #include <linux/kernel.h>
13 #include <linux/types.h>
15 #include <linux/list.h>
20 #include <linux/device.h>
21 #include <linux/serial_core.h>
23 #include <linux/sched.h>
29 #include <asm/proc-fns.h>
30 #include <asm/system_misc.h>
36 #include <mach/hardware.h>
37 #include <mach/regs-clock.h>
38 #include <mach/regs-gpio.h>
41 #include <plat/clock.h>
55 static const char name_s5p6440[] =
"S5P6440";
56 static const char name_s5p6450[] =
"S5P6450";
80 static struct map_desc s5p64x0_iodesc[] __initdata = {
124 static struct map_desc s5p6440_iodesc[] __initdata = {
133 static struct map_desc s5p6450_iodesc[] __initdata = {
147 static void s5p64x0_idle(
void)
181 s3c_adc_setname(
"s3c64xx-adc");
182 s3c_fb_setname(
"s5p64x0-fb");
183 s3c64xx_spi_setname(
"s5p64x0-spi");
185 s5p64x0_default_sdhci0();
186 s5p64x0_default_sdhci1();
187 s5p6440_default_sdhci2();
190 init_consistent_dma_size(
SZ_8M);
196 s3c_adc_setname(
"s3c64xx-adc");
197 s3c_fb_setname(
"s5p64x0-fb");
198 s3c64xx_spi_setname(
"s5p64x0-spi");
200 s5p64x0_default_sdhci0();
201 s5p64x0_default_sdhci1();
202 s5p6450_default_sdhci2();
205 init_consistent_dma_size(
SZ_8M);
271 .name =
"s5p64x0-core",
272 .dev_name =
"s5p64x0-core",
275 static struct device s5p64x0_dev = {
279 static int __init s5p64x0_core_init(
void)
287 printk(
KERN_INFO "S5P64X0(S5P6440/S5P6450): Initializing architecture\n");
300 for (uart = 0; uart <
no; uart++) {
313 #define eint_offset(irq) ((irq) - IRQ_EINT(0))
315 static int s5p64x0_irq_eint_set_type(
struct irq_data *
data,
unsigned int type)
349 shift = (offs / 2) * 4;
353 ctrl |= newvalue << shift;
372 static inline void s5p64x0_irq_demux_eint(
unsigned int start,
unsigned int end)
380 status &= (1 << (end - start + 1)) - 1;
389 static void s5p64x0_irq_demux_eint0_3(
unsigned int irq,
struct irq_desc *
desc)
391 s5p64x0_irq_demux_eint(0, 3);
394 static void s5p64x0_irq_demux_eint4_11(
unsigned int irq,
struct irq_desc *
desc)
396 s5p64x0_irq_demux_eint(4, 11);
399 static void s5p64x0_irq_demux_eint12_15(
unsigned int irq,
402 s5p64x0_irq_demux_eint(12, 15);
405 static int s5p64x0_alloc_gc(
void)
407 struct irq_chip_generic *
gc;
408 struct irq_chip_type *
ct;
414 "external interrupts failed\n", __func__);
422 ct->chip.irq_set_type = s5p64x0_irq_eint_set_type;
431 static int __init s5p64x0_init_irq_eint(
void)
433 int ret = s5p64x0_alloc_gc();
434 irq_set_chained_handler(
IRQ_EINT0_3, s5p64x0_irq_demux_eint0_3);
435 irq_set_chained_handler(
IRQ_EINT4_11, s5p64x0_irq_demux_eint4_11);
436 irq_set_chained_handler(
IRQ_EINT12_15, s5p64x0_irq_demux_eint12_15);