1 /* linux/arch/arm/plat-s5pc1xx/cpu.c
3 * Copyright 2009 Samsung Electronics Co.
4 * Byungho Min <bhmin@samsung.com>
8 * Based on plat-s3c64xx/cpu.c
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
15 #include <linux/init.h>
16 #include <linux/module.h>
17 #include <linux/interrupt.h>
18 #include <linux/ioport.h>
19 #include <linux/serial_core.h>
20 #include <linux/platform_device.h>
23 #include <mach/hardware.h>
26 #include <asm/mach/map.h>
28 #include <plat/regs-serial.h>
31 #include <plat/devs.h>
32 #include <plat/clock.h>
34 #include <plat/s5pc100.h>
36 /* table of supported CPUs */
38 static const char name_s5pc100
[] = "S5PC100";
40 static struct cpu_table cpu_ids
[] __initdata
= {
44 .map_io
= s5pc100_map_io
,
45 .init_clocks
= s5pc100_init_clocks
,
46 .init_uarts
= s5pc100_init_uarts
,
51 /* minimal IO mapping */
53 /* see notes on uart map in arch/arm/mach-s5pc100/include/mach/debug-macro.S */
54 #define UART_OFFS (S3C_PA_UART & 0xffff)
56 static struct map_desc s5pc1xx_iodesc
[] __initdata
= {
58 .virtual = (unsigned long)S5PC1XX_VA_CHIPID
,
59 .pfn
= __phys_to_pfn(S5PC1XX_PA_CHIPID
),
63 .virtual = (unsigned long)S5PC1XX_VA_CLK
,
64 .pfn
= __phys_to_pfn(S5PC1XX_PA_CLK
),
68 .virtual = (unsigned long)S5PC1XX_VA_PWR
,
69 .pfn
= __phys_to_pfn(S5PC1XX_PA_PWR
),
73 .virtual = (unsigned long)(S5PC1XX_VA_UART
),
74 .pfn
= __phys_to_pfn(S5PC1XX_PA_UART
),
78 .virtual = (unsigned long)S5PC1XX_VA_VIC(0),
79 .pfn
= __phys_to_pfn(S5PC1XX_PA_VIC(0)),
83 .virtual = (unsigned long)S5PC1XX_VA_VIC(1),
84 .pfn
= __phys_to_pfn(S5PC1XX_PA_VIC(1)),
88 .virtual = (unsigned long)S5PC1XX_VA_VIC(2),
89 .pfn
= __phys_to_pfn(S5PC1XX_PA_VIC(2)),
93 .virtual = (unsigned long)S5PC1XX_VA_TIMER
,
94 .pfn
= __phys_to_pfn(S5PC1XX_PA_TIMER
),
100 /* read cpu identification code */
102 void __init
s5pc1xx_init_io(struct map_desc
*mach_desc
, int size
)
104 unsigned long idcode
;
106 /* initialise the io descriptors we need for initialisation */
107 iotable_init(s5pc1xx_iodesc
, ARRAY_SIZE(s5pc1xx_iodesc
));
108 iotable_init(mach_desc
, size
);
110 idcode
= __raw_readl(S5PC1XX_VA_CHIPID
);
111 s3c_init_cpu(idcode
, cpu_ids
, ARRAY_SIZE(cpu_ids
));