1 /*
2  * arch/arm/plat-orion/include/plat/common.h
3  *
4  * Marvell Orion SoC common setup code used by different mach-/common.c
5  *
6  * This file is licensed under the terms of the GNU General Public
7  * License version 2.  This program is licensed "as is" without any
8  * warranty of any kind, whether express or implied.
9  */
10 
11 #ifndef __PLAT_COMMON_H
12 #include <linux/mv643xx_eth.h>
13 
14 struct dsa_platform_data;
15 
16 void __init orion_uart0_init(void __iomem *membase,
17 			     resource_size_t mapbase,
18 			     unsigned int irq,
19 			     struct clk *clk);
20 
21 void __init orion_uart1_init(void __iomem *membase,
22 			     resource_size_t mapbase,
23 			     unsigned int irq,
24 			     struct clk *clk);
25 
26 void __init orion_uart2_init(void __iomem *membase,
27 			     resource_size_t mapbase,
28 			     unsigned int irq,
29 			     struct clk *clk);
30 
31 void __init orion_uart3_init(void __iomem *membase,
32 			     resource_size_t mapbase,
33 			     unsigned int irq,
34 			     struct clk *clk);
35 
36 void __init orion_rtc_init(unsigned long mapbase,
37 			   unsigned long irq);
38 
39 void __init orion_ge00_init(struct mv643xx_eth_platform_data *eth_data,
40 			    unsigned long mapbase,
41 			    unsigned long irq,
42 			    unsigned long irq_err,
43 			    unsigned int tx_csum_limit);
44 
45 void __init orion_ge01_init(struct mv643xx_eth_platform_data *eth_data,
46 			    unsigned long mapbase,
47 			    unsigned long irq,
48 			    unsigned long irq_err,
49 			    unsigned int tx_csum_limit);
50 
51 void __init orion_ge10_init(struct mv643xx_eth_platform_data *eth_data,
52 			    unsigned long mapbase,
53 			    unsigned long irq,
54 			    unsigned long irq_err);
55 
56 void __init orion_ge11_init(struct mv643xx_eth_platform_data *eth_data,
57 			    unsigned long mapbase,
58 			    unsigned long irq,
59 			    unsigned long irq_err);
60 
61 void __init orion_ge00_switch_init(struct dsa_platform_data *d,
62 				   int irq);
63 
64 void __init orion_i2c_init(unsigned long mapbase,
65 			   unsigned long irq,
66 			   unsigned long freq_m);
67 
68 void __init orion_i2c_1_init(unsigned long mapbase,
69 			     unsigned long irq,
70 			     unsigned long freq_m);
71 
72 void __init orion_spi_init(unsigned long mapbase);
73 
74 void __init orion_spi_1_init(unsigned long mapbase);
75 
76 void __init orion_wdt_init(void);
77 
78 void __init orion_xor0_init(unsigned long mapbase_low,
79 			    unsigned long mapbase_high,
80 			    unsigned long irq_0,
81 			    unsigned long irq_1);
82 
83 void __init orion_xor1_init(unsigned long mapbase_low,
84 			    unsigned long mapbase_high,
85 			    unsigned long irq_0,
86 			    unsigned long irq_1);
87 
88 void __init orion_ehci_init(unsigned long mapbase,
89 			    unsigned long irq,
90 			    enum orion_ehci_phy_ver phy_version);
91 
92 void __init orion_ehci_1_init(unsigned long mapbase,
93 			      unsigned long irq);
94 
95 void __init orion_ehci_2_init(unsigned long mapbase,
96 			      unsigned long irq);
97 
98 void __init orion_sata_init(struct mv_sata_platform_data *sata_data,
99 			    unsigned long mapbase,
100 			    unsigned long irq);
101 
102 void __init orion_crypto_init(unsigned long mapbase,
103 			      unsigned long srambase,
104 			      unsigned long sram_size,
105 			      unsigned long irq);
106 
107 void __init orion_clkdev_add(const char *con_id, const char *dev_id,
108 			     struct clk *clk);
109 
110 void __init orion_clkdev_init(struct clk *tclk);
111 #endif
112