blob: d1131ca11e97e4f670c01f6b3054349d86f903b4 [file] [log] [blame]
Ben Dooksa5030592008-10-21 14:06:43 +01001/* linux/arch/arm/plat-s3c/include/plat/cpu.h
Linus Torvalds1da177e2005-04-16 15:20:36 -07002 *
3 * Copyright (c) 2004-2005 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * Header file for S3C24XX CPU support
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
Linus Torvalds1da177e2005-04-16 15:20:36 -070011*/
12
13/* todo - fix when rmk changes iodescs to use `void __iomem *` */
14
Kyungmin Parkc3fcf5d2009-11-17 08:41:17 +010015#ifndef __SAMSUNG_PLAT_CPU_H
16#define __SAMSUNG_PLAT_CPU_H
17
Lucas Correia Villa Real0367a8d2006-01-26 15:20:50 +000018#define IODESC_ENT(x) { (unsigned long)S3C24XX_VA_##x, __phys_to_pfn(S3C24XX_PA_##x), S3C24XX_SZ_##x, MT_DEVICE }
Linus Torvalds1da177e2005-04-16 15:20:36 -070019
20#ifndef MHZ
21#define MHZ (1000*1000)
22#endif
23
Ben Dooksa5030592008-10-21 14:06:43 +010024#define print_mhz(m) ((m) / MHZ), (((m) / 1000) % 1000)
Linus Torvalds1da177e2005-04-16 15:20:36 -070025
26/* forward declaration */
Ben Dooks66a9b492006-06-18 23:04:05 +010027struct s3c24xx_uart_resources;
28struct platform_device;
Linus Torvalds1da177e2005-04-16 15:20:36 -070029struct s3c2410_uartcfg;
30struct map_desc;
31
Ben Dooks74b265d2008-10-21 14:06:31 +010032/* per-cpu initialisation function table. */
33
34struct cpu_table {
35 unsigned long idcode;
36 unsigned long idmask;
37 void (*map_io)(void);
38 void (*init_uarts)(struct s3c2410_uartcfg *cfg, int no);
39 void (*init_clocks)(int xtal);
40 int (*init)(void);
41 const char *name;
42};
43
44extern void s3c_init_cpu(unsigned long idcode,
45 struct cpu_table *cpus, unsigned int cputab_size);
46
Linus Torvalds1da177e2005-04-16 15:20:36 -070047/* core initialisation functions */
48
49extern void s3c24xx_init_irq(void);
Ben Dooksd9b79fb2008-10-21 14:06:51 +010050extern void s3c64xx_init_irq(u32 vic0, u32 vic1);
Linus Torvalds1da177e2005-04-16 15:20:36 -070051
52extern void s3c24xx_init_io(struct map_desc *mach_desc, int size);
Ben Dooks6a5f4b82008-10-31 16:15:01 +000053extern void s3c64xx_init_io(struct map_desc *mach_desc, int size);
Linus Torvalds1da177e2005-04-16 15:20:36 -070054
55extern void s3c24xx_init_uarts(struct s3c2410_uartcfg *cfg, int no);
56
57extern void s3c24xx_init_clocks(int xtal);
58
Ben Dooks66a9b492006-06-18 23:04:05 +010059extern void s3c24xx_init_uartdevs(char *name,
60 struct s3c24xx_uart_resources *res,
61 struct s3c2410_uartcfg *cfg, int no);
62
Linus Torvalds1da177e2005-04-16 15:20:36 -070063/* timer for 2410/2440 */
64
65struct sys_timer;
66extern struct sys_timer s3c24xx_timer;
67
68/* system device classes */
69
Ben Dooksa3413052006-06-22 22:18:13 +010070extern struct sysdev_class s3c2410_sysclass;
Ben Dooksf0176792009-07-30 23:23:38 +010071extern struct sysdev_class s3c2410a_sysclass;
Ben Dooks68d9ab32006-06-24 21:21:27 +010072extern struct sysdev_class s3c2412_sysclass;
Linus Torvalds1da177e2005-04-16 15:20:36 -070073extern struct sysdev_class s3c2440_sysclass;
Ben Dooks96ce2382006-06-18 23:06:41 +010074extern struct sysdev_class s3c2442_sysclass;
Ben Dookse4d06e32007-02-16 12:12:31 +010075extern struct sysdev_class s3c2443_sysclass;
Ben Dooks0abfe9a2008-12-12 00:24:28 +000076extern struct sysdev_class s3c6410_sysclass;
Ben Dooks1deb5072008-12-12 00:24:31 +000077extern struct sysdev_class s3c64xx_sysclass;
78
Kyungmin Parkc3fcf5d2009-11-17 08:41:17 +010079extern void (*s5pc1xx_idle)(void);
80
81#endif