blob: 8ba7e75b648da397ec2fc2730a7623e303cf4621 [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 Bergmannd9909eb2012-12-02 17:59:57 +010032void __init spear3xx_clk_init(void __iomem *misc_base,
33 void __iomem *soc_config_base);
Arnd Bergmann54475212013-03-12 17:00:03 +010034void __init spear3xx_map_io(void);
35void __init spear3xx_dt_init_irq(void);
Arnd Bergmannd9909eb2012-12-02 17:59:57 +010036void __init spear6xx_clk_init(void __iomem *misc_base);
Viresh Kumarb31e2372012-04-19 22:23:13 +053037void __init spear13xx_map_io(void);
Viresh Kumarb31e2372012-04-19 22:23:13 +053038void __init spear13xx_l2x0_init(void);
Arnd Bergmann54475212013-03-12 17:00:03 +010039
Viresh Kumarb31e2372012-04-19 22:23:13 +053040void spear_restart(char, const char *);
Arnd Bergmann54475212013-03-12 17:00:03 +010041
Viresh Kumarb31e2372012-04-19 22:23:13 +053042void spear13xx_secondary_startup(void);
Arnd Bergmann2d8b21d2011-09-08 13:15:22 +010043void __cpuinit spear13xx_cpu_die(unsigned int cpu);
44
45extern struct smp_operations spear13xx_smp_ops;
Viresh Kumarb31e2372012-04-19 22:23:13 +053046
47#ifdef CONFIG_MACH_SPEAR1310
Arnd Bergmannd9909eb2012-12-02 17:59:57 +010048void __init spear1310_clk_init(void __iomem *misc_base, void __iomem *ras_base);
Viresh Kumarb31e2372012-04-19 22:23:13 +053049#else
Arnd Bergmannd9909eb2012-12-02 17:59:57 +010050static inline void spear1310_clk_init(void __iomem *misc_base, void __iomem *ras_base) {}
Viresh Kumarb31e2372012-04-19 22:23:13 +053051#endif
52
53#ifdef CONFIG_MACH_SPEAR1340
Arnd Bergmannd9909eb2012-12-02 17:59:57 +010054void __init spear1340_clk_init(void __iomem *misc_base);
Viresh Kumarb31e2372012-04-19 22:23:13 +053055#else
Arnd Bergmannd9909eb2012-12-02 17:59:57 +010056static inline void spear1340_clk_init(void __iomem *misc_base) {}
Viresh Kumarb31e2372012-04-19 22:23:13 +053057#endif
58
59#endif /* __MACH_GENERIC_H */