blob: d188a1aa6f56a0fe2cc691e82d0a486d5dbf549f [file] [log] [blame]
Andrew Lunn28a2b452011-05-15 13:32:41 +02001/*
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
Andrew Lunn7e3819d2011-05-15 13:32:44 +020012#include <linux/mv643xx_eth.h>
Andrew Lunn28a2b452011-05-15 13:32:41 +020013
Andrew Lunn7e3819d2011-05-15 13:32:44 +020014struct dsa_platform_data;
Andrew Lunn28a2b452011-05-15 13:32:41 +020015
16void __init orion_uart0_init(unsigned int membase,
17 resource_size_t mapbase,
18 unsigned int irq,
19 unsigned int uartclk);
20
21void __init orion_uart1_init(unsigned int membase,
22 resource_size_t mapbase,
23 unsigned int irq,
24 unsigned int uartclk);
25
26void __init orion_uart2_init(unsigned int membase,
27 resource_size_t mapbase,
28 unsigned int irq,
29 unsigned int uartclk);
30
31void __init orion_uart3_init(unsigned int membase,
32 resource_size_t mapbase,
33 unsigned int irq,
34 unsigned int uartclk);
Andrew Lunnf6eaccb2011-05-15 13:32:42 +020035
36void __init orion_rtc_init(unsigned long mapbase,
37 unsigned long irq);
Andrew Lunn7e3819d2011-05-15 13:32:44 +020038
39void __init orion_ge00_init(struct mv643xx_eth_platform_data *eth_data,
Andrew Lunn7e3819d2011-05-15 13:32:44 +020040 unsigned long mapbase,
41 unsigned long irq,
42 unsigned long irq_err,
43 int tclk);
44
45void __init orion_ge01_init(struct mv643xx_eth_platform_data *eth_data,
Andrew Lunn7e3819d2011-05-15 13:32:44 +020046 unsigned long mapbase,
47 unsigned long irq,
48 unsigned long irq_err,
49 int tclk);
50
51void __init orion_ge10_init(struct mv643xx_eth_platform_data *eth_data,
Andrew Lunn7e3819d2011-05-15 13:32:44 +020052 unsigned long mapbase,
53 unsigned long irq,
54 unsigned long irq_err,
55 int tclk);
56
57void __init orion_ge11_init(struct mv643xx_eth_platform_data *eth_data,
Andrew Lunn7e3819d2011-05-15 13:32:44 +020058 unsigned long mapbase,
59 unsigned long irq,
60 unsigned long irq_err,
61 int tclk);
62
63void __init orion_ge00_switch_init(struct dsa_platform_data *d,
64 int irq);
Andrew Lunnaac7ffa2011-05-15 13:32:45 +020065void __init orion_i2c_init(unsigned long mapbase,
66 unsigned long irq,
67 unsigned long freq_m);
Andrew Lunn7e3819d2011-05-15 13:32:44 +020068
Andrew Lunnaac7ffa2011-05-15 13:32:45 +020069void __init orion_i2c_1_init(unsigned long mapbase,
70 unsigned long irq,
71 unsigned long freq_m);
Andrew Lunn980f9f62011-05-15 13:32:46 +020072
Andrew Lunn4574b882012-04-06 17:17:26 +020073void __init orion_spi_init(unsigned long mapbase);
Andrew Lunn980f9f62011-05-15 13:32:46 +020074
Andrew Lunn4574b882012-04-06 17:17:26 +020075void __init orion_spi_1_init(unsigned long mapbase);
Andrew Lunn5e00d372011-05-15 13:32:47 +020076
77void __init orion_wdt_init(unsigned long tclk);
Andrew Lunnee962722011-05-15 13:32:48 +020078
Andrew Lunndb33f4d2011-12-07 21:48:08 +010079void __init orion_xor0_init(unsigned long mapbase_low,
Andrew Lunnee962722011-05-15 13:32:48 +020080 unsigned long mapbase_high,
81 unsigned long irq_0,
82 unsigned long irq_1);
83
84void __init orion_xor1_init(unsigned long mapbase_low,
85 unsigned long mapbase_high,
86 unsigned long irq_0,
87 unsigned long irq_1);
Andrew Lunn4fcd3f32011-05-15 13:32:49 +020088
Andrew Lunndb33f4d2011-12-07 21:48:08 +010089void __init orion_ehci_init(unsigned long mapbase,
Andrew Lunn72053352012-02-08 15:52:47 +010090 unsigned long irq,
91 enum orion_ehci_phy_ver phy_version);
Andrew Lunn4fcd3f32011-05-15 13:32:49 +020092
Andrew Lunndb33f4d2011-12-07 21:48:08 +010093void __init orion_ehci_1_init(unsigned long mapbase,
Andrew Lunn4fcd3f32011-05-15 13:32:49 +020094 unsigned long irq);
95
Andrew Lunndb33f4d2011-12-07 21:48:08 +010096void __init orion_ehci_2_init(unsigned long mapbase,
Andrew Lunn4fcd3f32011-05-15 13:32:49 +020097 unsigned long irq);
Andrew Lunn9e613f82011-05-15 13:32:50 +020098
99void __init orion_sata_init(struct mv_sata_platform_data *sata_data,
Andrew Lunn9e613f82011-05-15 13:32:50 +0200100 unsigned long mapbase,
101 unsigned long irq);
Andrew Lunn44350062011-05-15 13:32:51 +0200102
103void __init orion_crypto_init(unsigned long mapbase,
104 unsigned long srambase,
105 unsigned long sram_size,
106 unsigned long irq);
Andrew Lunn4574b882012-04-06 17:17:26 +0200107
108void __init orion_clkdev_add(const char *con_id, const char *dev_id,
109 struct clk *clk);
110
111void __init orion_clkdev_init(struct clk *tclk);
Andrew Lunn28a2b452011-05-15 13:32:41 +0200112#endif