blob: 909b97c0b23719010d4950532bcfada3f5ea1c30 [file] [log] [blame]
Viresh Kumarb31e2372012-04-19 22:23:13 +05301/*
Arnd Bergmann54475212013-03-12 17:00:03 +01002 * spear machine family generic header file
Viresh Kumarb31e2372012-04-19 22:23:13 +05303 *
Arnd Bergmann54475212013-03-12 17:00:03 +01004 * Copyright (C) 2009-2012 ST Microelectronics
5 * Rajeev Kumar <rajeev-dlh.kumar@st.com>
Viresh Kumarda899472015-07-17 16:23:50 -07006 * Viresh Kumar <vireshk@kernel.org>
Viresh Kumarb31e2372012-04-19 22:23:13 +05307 *
8 * This file is licensed under the terms of the GNU General Public
9 * License version 2. This program is licensed "as is" without any
10 * warranty of any kind, whether express or implied.
11 */
12
13#ifndef __MACH_GENERIC_H
14#define __MACH_GENERIC_H
15
16#include <linux/dmaengine.h>
Arnd Bergmann54475212013-03-12 17:00:03 +010017#include <linux/amba/pl08x.h>
18#include <linux/init.h>
Robin Holt7b6d8642013-07-08 16:01:40 -070019#include <linux/reboot.h>
20
Viresh Kumarb31e2372012-04-19 22:23:13 +053021#include <asm/mach/time.h>
22
Stephen Warren6bb27d72012-11-08 12:40:59 -070023extern void spear13xx_timer_init(void);
Arnd Bergmann54475212013-03-12 17:00:03 +010024extern void spear3xx_timer_init(void);
Viresh Kumarb31e2372012-04-19 22:23:13 +053025extern struct pl022_ssp_controller pl022_plat_data;
Arnd Bergmann54475212013-03-12 17:00:03 +010026extern struct pl08x_platform_data pl080_plat_data;
Viresh Kumarb31e2372012-04-19 22:23:13 +053027
Viresh Kumarb31e2372012-04-19 22:23:13 +053028void __init spear_setup_of_timer(void);
Arnd Bergmannd9909eb2012-12-02 17:59:57 +010029void __init spear3xx_clk_init(void __iomem *misc_base,
30 void __iomem *soc_config_base);
Arnd Bergmann54475212013-03-12 17:00:03 +010031void __init spear3xx_map_io(void);
32void __init spear3xx_dt_init_irq(void);
Arnd Bergmannd9909eb2012-12-02 17:59:57 +010033void __init spear6xx_clk_init(void __iomem *misc_base);
Viresh Kumarb31e2372012-04-19 22:23:13 +053034void __init spear13xx_map_io(void);
Viresh Kumarb31e2372012-04-19 22:23:13 +053035void __init spear13xx_l2x0_init(void);
Arnd Bergmann54475212013-03-12 17:00:03 +010036
Robin Holt7b6d8642013-07-08 16:01:40 -070037void spear_restart(enum reboot_mode, const char *);
Arnd Bergmann54475212013-03-12 17:00:03 +010038
Viresh Kumarb31e2372012-04-19 22:23:13 +053039void spear13xx_secondary_startup(void);
Paul Gortmaker8bd26e32013-06-17 15:43:14 -040040void spear13xx_cpu_die(unsigned int cpu);
Arnd Bergmann2d8b21d2011-09-08 13:15:22 +010041
Masahiro Yamada75305272015-11-15 10:39:53 +090042extern const struct smp_operations spear13xx_smp_ops;
Viresh Kumarb31e2372012-04-19 22:23:13 +053043
44#ifdef CONFIG_MACH_SPEAR1310
Arnd Bergmannd9909eb2012-12-02 17:59:57 +010045void __init spear1310_clk_init(void __iomem *misc_base, void __iomem *ras_base);
Viresh Kumarb31e2372012-04-19 22:23:13 +053046#else
Arnd Bergmannd9909eb2012-12-02 17:59:57 +010047static inline void spear1310_clk_init(void __iomem *misc_base, void __iomem *ras_base) {}
Viresh Kumarb31e2372012-04-19 22:23:13 +053048#endif
49
50#ifdef CONFIG_MACH_SPEAR1340
Arnd Bergmannd9909eb2012-12-02 17:59:57 +010051void __init spear1340_clk_init(void __iomem *misc_base);
Viresh Kumarb31e2372012-04-19 22:23:13 +053052#else
Arnd Bergmannd9909eb2012-12-02 17:59:57 +010053static inline void spear1340_clk_init(void __iomem *misc_base) {}
Viresh Kumarb31e2372012-04-19 22:23:13 +053054#endif
55
56#endif /* __MACH_GENERIC_H */