2010-01-29 17:02:12 +08:00
|
|
|
/* linux/arch/arm/plat-samsung/include/plat/cpu.h
|
2005-04-17 06:20:36 +08:00
|
|
|
*
|
|
|
|
* Copyright (c) 2004-2005 Simtec Electronics
|
|
|
|
* Ben Dooks <ben@simtec.co.uk>
|
|
|
|
*
|
|
|
|
* Header file for S3C24XX CPU support
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
|
|
* published by the Free Software Foundation.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* todo - fix when rmk changes iodescs to use `void __iomem *` */
|
|
|
|
|
2009-11-17 15:41:17 +08:00
|
|
|
#ifndef __SAMSUNG_PLAT_CPU_H
|
|
|
|
#define __SAMSUNG_PLAT_CPU_H
|
|
|
|
|
2006-01-26 23:20:50 +08:00
|
|
|
#define IODESC_ENT(x) { (unsigned long)S3C24XX_VA_##x, __phys_to_pfn(S3C24XX_PA_##x), S3C24XX_SZ_##x, MT_DEVICE }
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
#ifndef MHZ
|
|
|
|
#define MHZ (1000*1000)
|
|
|
|
#endif
|
|
|
|
|
2008-10-21 21:06:43 +08:00
|
|
|
#define print_mhz(m) ((m) / MHZ), (((m) / 1000) % 1000)
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
/* forward declaration */
|
2006-06-19 06:04:05 +08:00
|
|
|
struct s3c24xx_uart_resources;
|
|
|
|
struct platform_device;
|
2005-04-17 06:20:36 +08:00
|
|
|
struct s3c2410_uartcfg;
|
|
|
|
struct map_desc;
|
|
|
|
|
2008-10-21 21:06:31 +08:00
|
|
|
/* per-cpu initialisation function table. */
|
|
|
|
|
|
|
|
struct cpu_table {
|
|
|
|
unsigned long idcode;
|
|
|
|
unsigned long idmask;
|
|
|
|
void (*map_io)(void);
|
|
|
|
void (*init_uarts)(struct s3c2410_uartcfg *cfg, int no);
|
|
|
|
void (*init_clocks)(int xtal);
|
|
|
|
int (*init)(void);
|
|
|
|
const char *name;
|
|
|
|
};
|
|
|
|
|
|
|
|
extern void s3c_init_cpu(unsigned long idcode,
|
|
|
|
struct cpu_table *cpus, unsigned int cputab_size);
|
|
|
|
|
2005-04-17 06:20:36 +08:00
|
|
|
/* core initialisation functions */
|
|
|
|
|
|
|
|
extern void s3c24xx_init_irq(void);
|
2008-10-21 21:06:51 +08:00
|
|
|
extern void s3c64xx_init_irq(u32 vic0, u32 vic1);
|
2010-01-14 14:29:17 +08:00
|
|
|
extern void s5p_init_irq(u32 *vic, u32 num_vic);
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
extern void s3c24xx_init_io(struct map_desc *mach_desc, int size);
|
2008-11-01 00:15:01 +08:00
|
|
|
extern void s3c64xx_init_io(struct map_desc *mach_desc, int size);
|
2010-01-14 14:29:17 +08:00
|
|
|
extern void s5p_init_io(struct map_desc *mach_desc,
|
|
|
|
int size, void __iomem *cpuid_addr);
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
extern void s3c24xx_init_uarts(struct s3c2410_uartcfg *cfg, int no);
|
|
|
|
|
|
|
|
extern void s3c24xx_init_clocks(int xtal);
|
|
|
|
|
2006-06-19 06:04:05 +08:00
|
|
|
extern void s3c24xx_init_uartdevs(char *name,
|
|
|
|
struct s3c24xx_uart_resources *res,
|
|
|
|
struct s3c2410_uartcfg *cfg, int no);
|
|
|
|
|
2005-04-17 06:20:36 +08:00
|
|
|
/* timer for 2410/2440 */
|
|
|
|
|
|
|
|
struct sys_timer;
|
|
|
|
extern struct sys_timer s3c24xx_timer;
|
|
|
|
|
|
|
|
/* system device classes */
|
|
|
|
|
2006-06-23 05:18:13 +08:00
|
|
|
extern struct sysdev_class s3c2410_sysclass;
|
2009-07-31 06:23:38 +08:00
|
|
|
extern struct sysdev_class s3c2410a_sysclass;
|
2006-06-25 04:21:27 +08:00
|
|
|
extern struct sysdev_class s3c2412_sysclass;
|
2010-04-28 17:09:01 +08:00
|
|
|
extern struct sysdev_class s3c2416_sysclass;
|
2005-04-17 06:20:36 +08:00
|
|
|
extern struct sysdev_class s3c2440_sysclass;
|
2006-06-19 06:06:41 +08:00
|
|
|
extern struct sysdev_class s3c2442_sysclass;
|
2007-02-16 19:12:31 +08:00
|
|
|
extern struct sysdev_class s3c2443_sysclass;
|
2008-12-12 08:24:28 +08:00
|
|
|
extern struct sysdev_class s3c6410_sysclass;
|
2008-12-12 08:24:31 +08:00
|
|
|
extern struct sysdev_class s3c64xx_sysclass;
|
2010-10-08 19:55:02 +08:00
|
|
|
extern struct sysdev_class s5p64x0_sysclass;
|
2010-05-11 08:56:37 +08:00
|
|
|
extern struct sysdev_class s5p6442_sysclass;
|
|
|
|
extern struct sysdev_class s5pv210_sysclass;
|
2008-12-12 08:24:31 +08:00
|
|
|
|
2009-11-17 15:41:17 +08:00
|
|
|
extern void (*s5pc1xx_idle)(void);
|
|
|
|
|
|
|
|
#endif
|