blob: e00fdb2136090154ea930c9f224365677644444e [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,
Andrew Lunn74c33572011-12-24 03:06:34 +010019 struct clk *clk);
Andrew Lunn28a2b452011-05-15 13:32:41 +020020
21void __init orion_uart1_init(unsigned int membase,
22 resource_size_t mapbase,
23 unsigned int irq,
Andrew Lunn74c33572011-12-24 03:06:34 +010024 struct clk *clk);
Andrew Lunn28a2b452011-05-15 13:32:41 +020025
26void __init orion_uart2_init(unsigned int membase,
27 resource_size_t mapbase,
28 unsigned int irq,
Andrew Lunn74c33572011-12-24 03:06:34 +010029 struct clk *clk);
Andrew Lunn28a2b452011-05-15 13:32:41 +020030
31void __init orion_uart3_init(unsigned int membase,
32 resource_size_t mapbase,
33 unsigned int irq,
Andrew Lunn74c33572011-12-24 03:06:34 +010034 struct clk *clk);
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,
Andrew Lunn452503e2011-12-24 01:24:24 +010042 unsigned long irq_err);
Andrew Lunn7e3819d2011-05-15 13:32:44 +020043
44void __init orion_ge01_init(struct mv643xx_eth_platform_data *eth_data,
Andrew Lunn7e3819d2011-05-15 13:32:44 +020045 unsigned long mapbase,
46 unsigned long irq,
Andrew Lunn452503e2011-12-24 01:24:24 +010047 unsigned long irq_err);
Andrew Lunn7e3819d2011-05-15 13:32:44 +020048
49void __init orion_ge10_init(struct mv643xx_eth_platform_data *eth_data,
Andrew Lunn7e3819d2011-05-15 13:32:44 +020050 unsigned long mapbase,
51 unsigned long irq,
Andrew Lunn452503e2011-12-24 01:24:24 +010052 unsigned long irq_err);
Andrew Lunn7e3819d2011-05-15 13:32:44 +020053
54void __init orion_ge11_init(struct mv643xx_eth_platform_data *eth_data,
Andrew Lunn7e3819d2011-05-15 13:32:44 +020055 unsigned long mapbase,
56 unsigned long irq,
Andrew Lunn452503e2011-12-24 01:24:24 +010057 unsigned long irq_err);
Andrew Lunn7e3819d2011-05-15 13:32:44 +020058
59void __init orion_ge00_switch_init(struct dsa_platform_data *d,
60 int irq);
Andrew Lunn452503e2011-12-24 01:24:24 +010061
Andrew Lunnaac7ffa2011-05-15 13:32:45 +020062void __init orion_i2c_init(unsigned long mapbase,
63 unsigned long irq,
64 unsigned long freq_m);
Andrew Lunn7e3819d2011-05-15 13:32:44 +020065
Andrew Lunnaac7ffa2011-05-15 13:32:45 +020066void __init orion_i2c_1_init(unsigned long mapbase,
67 unsigned long irq,
68 unsigned long freq_m);
Andrew Lunn980f9f62011-05-15 13:32:46 +020069
Andrew Lunn4574b882012-04-06 17:17:26 +020070void __init orion_spi_init(unsigned long mapbase);
Andrew Lunn980f9f62011-05-15 13:32:46 +020071
Andrew Lunn4574b882012-04-06 17:17:26 +020072void __init orion_spi_1_init(unsigned long mapbase);
Andrew Lunn5e00d372011-05-15 13:32:47 +020073
Andrew Lunn4f04be62012-03-04 16:57:31 +010074void __init orion_wdt_init(void);
Andrew Lunnee962722011-05-15 13:32:48 +020075
Andrew Lunndb33f4d2011-12-07 21:48:08 +010076void __init orion_xor0_init(unsigned long mapbase_low,
Andrew Lunnee962722011-05-15 13:32:48 +020077 unsigned long mapbase_high,
78 unsigned long irq_0,
79 unsigned long irq_1);
80
81void __init orion_xor1_init(unsigned long mapbase_low,
82 unsigned long mapbase_high,
83 unsigned long irq_0,
84 unsigned long irq_1);
Andrew Lunn4fcd3f32011-05-15 13:32:49 +020085
Andrew Lunndb33f4d2011-12-07 21:48:08 +010086void __init orion_ehci_init(unsigned long mapbase,
Andrew Lunn72053352012-02-08 15:52:47 +010087 unsigned long irq,
88 enum orion_ehci_phy_ver phy_version);
Andrew Lunn4fcd3f32011-05-15 13:32:49 +020089
Andrew Lunndb33f4d2011-12-07 21:48:08 +010090void __init orion_ehci_1_init(unsigned long mapbase,
Andrew Lunn4fcd3f32011-05-15 13:32:49 +020091 unsigned long irq);
92
Andrew Lunndb33f4d2011-12-07 21:48:08 +010093void __init orion_ehci_2_init(unsigned long mapbase,
Andrew Lunn4fcd3f32011-05-15 13:32:49 +020094 unsigned long irq);
Andrew Lunn9e613f82011-05-15 13:32:50 +020095
96void __init orion_sata_init(struct mv_sata_platform_data *sata_data,
Andrew Lunn9e613f82011-05-15 13:32:50 +020097 unsigned long mapbase,
98 unsigned long irq);
Andrew Lunn44350062011-05-15 13:32:51 +020099
100void __init orion_crypto_init(unsigned long mapbase,
101 unsigned long srambase,
102 unsigned long sram_size,
103 unsigned long irq);
Andrew Lunn4574b882012-04-06 17:17:26 +0200104
105void __init orion_clkdev_add(const char *con_id, const char *dev_id,
106 struct clk *clk);
107
108void __init orion_clkdev_init(struct clk *tclk);
Andrew Lunn28a2b452011-05-15 13:32:41 +0200109#endif