Kukjin Kim | b024043b | 2011-12-22 23:27:42 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2011 Samsung Electronics Co., Ltd. |
| 3 | * http://www.samsung.com |
| 4 | * |
| 5 | * Copyright 2008 Openmoko, Inc. |
| 6 | * Copyright 2008 Simtec Electronics |
| 7 | * Ben Dooks <ben@simtec.co.uk> |
| 8 | * http://armlinux.simtec.co.uk/ |
| 9 | * |
| 10 | * Common Header for S3C64XX machines |
| 11 | * |
| 12 | * This program is free software; you can redistribute it and/or modify |
| 13 | * it under the terms of the GNU General Public License version 2 as |
| 14 | * published by the Free Software Foundation. |
| 15 | */ |
| 16 | |
| 17 | #ifndef __ARCH_ARM_MACH_S3C64XX_COMMON_H |
| 18 | #define __ARCH_ARM_MACH_S3C64XX_COMMON_H |
| 19 | |
Robin Holt | 7b6d864 | 2013-07-08 16:01:40 -0700 | [diff] [blame] | 20 | #include <linux/reboot.h> |
| 21 | |
Kukjin Kim | b024043b | 2011-12-22 23:27:42 +0100 | [diff] [blame] | 22 | void s3c64xx_init_irq(u32 vic0, u32 vic1); |
| 23 | void s3c64xx_init_io(struct map_desc *mach_desc, int size); |
| 24 | |
Robin Holt | 7b6d864 | 2013-07-08 16:01:40 -0700 | [diff] [blame] | 25 | void s3c64xx_restart(enum reboot_mode mode, const char *cmd); |
Shawn Guo | cc8f252 | 2012-04-26 21:08:52 +0800 | [diff] [blame] | 26 | void s3c64xx_init_late(void); |
Kukjin Kim | ff84ded | 2012-01-03 14:03:30 +0100 | [diff] [blame] | 27 | |
Tomasz Figa | b69f460 | 2013-08-26 02:00:38 +0900 | [diff] [blame] | 28 | void s3c64xx_clk_init(struct device_node *np, unsigned long xtal_f, |
| 29 | unsigned long xusbxti_f, bool is_s3c6400, void __iomem *reg_base); |
| 30 | void s3c64xx_set_xtal_freq(unsigned long freq); |
| 31 | void s3c64xx_set_xusbxti_freq(unsigned long freq); |
| 32 | |
Kukjin Kim | b024043b | 2011-12-22 23:27:42 +0100 | [diff] [blame] | 33 | #ifdef CONFIG_CPU_S3C6400 |
| 34 | |
| 35 | extern int s3c6400_init(void); |
| 36 | extern void s3c6400_init_irq(void); |
| 37 | extern void s3c6400_map_io(void); |
Kukjin Kim | b024043b | 2011-12-22 23:27:42 +0100 | [diff] [blame] | 38 | |
| 39 | #else |
Kukjin Kim | b024043b | 2011-12-22 23:27:42 +0100 | [diff] [blame] | 40 | #define s3c6400_map_io NULL |
| 41 | #define s3c6400_init NULL |
| 42 | #endif |
| 43 | |
| 44 | #ifdef CONFIG_CPU_S3C6410 |
| 45 | |
| 46 | extern int s3c6410_init(void); |
| 47 | extern void s3c6410_init_irq(void); |
| 48 | extern void s3c6410_map_io(void); |
Kukjin Kim | b024043b | 2011-12-22 23:27:42 +0100 | [diff] [blame] | 49 | |
| 50 | #else |
Kukjin Kim | b024043b | 2011-12-22 23:27:42 +0100 | [diff] [blame] | 51 | #define s3c6410_map_io NULL |
| 52 | #define s3c6410_init NULL |
| 53 | #endif |
| 54 | |
Shawn Guo | cc8f252 | 2012-04-26 21:08:52 +0800 | [diff] [blame] | 55 | #ifdef CONFIG_PM |
| 56 | int __init s3c64xx_pm_late_initcall(void); |
| 57 | #else |
| 58 | static inline int s3c64xx_pm_late_initcall(void) { return 0; } |
| 59 | #endif |
| 60 | |
Tomasz Figa | 1db0287 | 2013-10-16 21:10:54 +0200 | [diff] [blame] | 61 | #ifdef CONFIG_S3C64XX_PL080 |
| 62 | extern struct pl08x_platform_data s3c64xx_dma0_plat_data; |
| 63 | extern struct pl08x_platform_data s3c64xx_dma1_plat_data; |
| 64 | #endif |
| 65 | |
Kukjin Kim | b024043b | 2011-12-22 23:27:42 +0100 | [diff] [blame] | 66 | #endif /* __ARCH_ARM_MACH_S3C64XX_COMMON_H */ |