blob: af47d9b0d83d0cf25fa1b0b6dcf1274fa311eeb0 [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 Kumar10d89352012-06-20 12:53:02 -07006 * Viresh Kumar <viresh.linux@gmail.com>
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>
Viresh Kumarb31e2372012-04-19 22:23:13 +053019#include <asm/mach/time.h>
20
Stephen Warren6bb27d72012-11-08 12:40:59 -070021extern void spear13xx_timer_init(void);
Arnd Bergmann54475212013-03-12 17:00:03 +010022extern void spear3xx_timer_init(void);
Viresh Kumarb31e2372012-04-19 22:23:13 +053023extern struct pl022_ssp_controller pl022_plat_data;
Arnd Bergmann54475212013-03-12 17:00:03 +010024extern struct pl08x_platform_data pl080_plat_data;
Viresh Kumarb31e2372012-04-19 22:23:13 +053025extern struct dw_dma_platform_data dmac_plat_data;
26extern struct dw_dma_slave cf_dma_priv;
27extern struct dw_dma_slave nand_read_dma_priv;
28extern struct dw_dma_slave nand_write_dma_priv;
Arnd Bergmann54475212013-03-12 17:00:03 +010029bool dw_dma_filter(struct dma_chan *chan, void *slave);
Viresh Kumarb31e2372012-04-19 22:23:13 +053030
Viresh Kumarb31e2372012-04-19 22:23:13 +053031void __init spear_setup_of_timer(void);
Arnd Bergmann54475212013-03-12 17:00:03 +010032void __init spear3xx_clk_init(void);
33void __init spear3xx_map_io(void);
34void __init spear3xx_dt_init_irq(void);
35void __init spear6xx_clk_init(void);
Viresh Kumarb31e2372012-04-19 22:23:13 +053036void __init spear13xx_map_io(void);
Viresh Kumarb31e2372012-04-19 22:23:13 +053037void __init spear13xx_l2x0_init(void);
Arnd Bergmann54475212013-03-12 17:00:03 +010038
Viresh Kumarb31e2372012-04-19 22:23:13 +053039void spear_restart(char, const char *);
Arnd Bergmann54475212013-03-12 17:00:03 +010040
Viresh Kumarb31e2372012-04-19 22:23:13 +053041void spear13xx_secondary_startup(void);
Arnd Bergmann2d8b21d2011-09-08 13:15:22 +010042void __cpuinit spear13xx_cpu_die(unsigned int cpu);
43
44extern struct smp_operations spear13xx_smp_ops;
Viresh Kumarb31e2372012-04-19 22:23:13 +053045
46#ifdef CONFIG_MACH_SPEAR1310
47void __init spear1310_clk_init(void);
48#else
49static inline void spear1310_clk_init(void) {}
50#endif
51
52#ifdef CONFIG_MACH_SPEAR1340
53void __init spear1340_clk_init(void);
54#else
55static inline void spear1340_clk_init(void) {}
56#endif
57
58#endif /* __MACH_GENERIC_H */