Kukjin Kim | 3cd7b62 | 2011-09-10 10:09:21 +0900 | [diff] [blame] | 1 | /* linux/arch/arm/plat-samsung/include/plat/s3c2443.h |
Ben Dooks | e4d06e3 | 2007-02-16 12:12:31 +0100 | [diff] [blame] | 2 | * |
| 3 | * Copyright (c) 2004-2005 Simtec Electronics |
| 4 | * Ben Dooks <ben@simtec.co.uk> |
| 5 | * |
| 6 | * Header file for s3c2443 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. |
| 11 | */ |
| 12 | |
| 13 | #ifdef CONFIG_CPU_S3C2443 |
| 14 | |
| 15 | struct s3c2410_uartcfg; |
| 16 | |
| 17 | extern int s3c2443_init(void); |
| 18 | |
Ben Dooks | 74b265d | 2008-10-21 14:06:31 +0100 | [diff] [blame] | 19 | extern void s3c2443_map_io(void); |
Ben Dooks | e4d06e3 | 2007-02-16 12:12:31 +0100 | [diff] [blame] | 20 | |
| 21 | extern void s3c2443_init_uarts(struct s3c2410_uartcfg *cfg, int no); |
| 22 | |
| 23 | extern void s3c2443_init_clocks(int xtal); |
| 24 | |
| 25 | extern int s3c2443_baseclk_add(void); |
| 26 | |
Heiko Stuebner | 5753897 | 2011-12-22 23:37:44 +0100 | [diff] [blame] | 27 | extern void s3c2443_restart(char mode, const char *cmd); |
Ben Dooks | e4d06e3 | 2007-02-16 12:12:31 +0100 | [diff] [blame] | 28 | #else |
| 29 | #define s3c2443_init_clocks NULL |
| 30 | #define s3c2443_init_uarts NULL |
| 31 | #define s3c2443_map_io NULL |
| 32 | #define s3c2443_init NULL |
Heiko Stuebner | 5753897 | 2011-12-22 23:37:44 +0100 | [diff] [blame] | 33 | #define s3c2443_restart NULL |
Ben Dooks | e4d06e3 | 2007-02-16 12:12:31 +0100 | [diff] [blame] | 34 | #endif |
Ben Dooks | af337f3 | 2010-04-28 18:03:57 +0900 | [diff] [blame] | 35 | |
| 36 | /* common code used by s3c2443 and others. |
| 37 | * note, not to be used outside of arch/arm/mach-s3c* */ |
| 38 | |
| 39 | struct clk; /* some files don't need clk.h otherwise */ |
| 40 | |
| 41 | typedef unsigned int (*pll_fn)(unsigned int reg, unsigned int base); |
Ben Dooks | af337f3 | 2010-04-28 18:03:57 +0900 | [diff] [blame] | 42 | |
Heiko Stuebner | 33ccedf | 2011-10-14 15:08:57 +0900 | [diff] [blame] | 43 | extern void s3c2443_common_setup_clocks(pll_fn get_mpll); |
| 44 | extern void s3c2443_common_init_clocks(int xtal, pll_fn get_mpll, |
Heiko Stuebner | d9a3bfb | 2011-10-14 15:08:56 +0900 | [diff] [blame] | 45 | unsigned int *divs, int nr_divs, |
| 46 | int divmask); |
Ben Dooks | af337f3 | 2010-04-28 18:03:57 +0900 | [diff] [blame] | 47 | |
| 48 | extern int s3c2443_clkcon_enable_h(struct clk *clk, int enable); |
| 49 | extern int s3c2443_clkcon_enable_p(struct clk *clk, int enable); |
| 50 | extern int s3c2443_clkcon_enable_s(struct clk *clk, int enable); |
| 51 | |
| 52 | extern struct clksrc_clk clk_epllref; |
| 53 | extern struct clksrc_clk clk_esysclk; |
| 54 | extern struct clksrc_clk clk_msysclk; |