blob: 3898e1b78ee4f39440107af918c0fc10ed304167 [file] [log] [blame]
Tzachi Perelstein585cf172007-10-23 15:14:41 -04001#ifndef __ARCH_ORION_COMMON_H__
2#define __ARCH_ORION_COMMON_H__
3
4/*
5 * Basic Orion init functions used early by machine-setup.
6 */
Tzachi Perelsteinc67de5b2007-10-23 15:14:42 -04007
Tzachi Perelstein585cf172007-10-23 15:14:41 -04008void __init orion_map_io(void);
Tzachi Perelstein3085de62007-10-23 15:14:42 -04009void __init orion_init_irq(void);
Tzachi Perelsteinc67de5b2007-10-23 15:14:42 -040010void __init orion_init(void);
Lennert Buytenhek2bac1de2008-03-27 14:51:40 -040011extern struct sys_timer orion_timer;
Tzachi Perelsteinc67de5b2007-10-23 15:14:42 -040012
13/*
14 * Enumerations and functions for Orion windows mapping. Used by Orion core
15 * functions to map its interfaces and by the machine-setup to map its on-
16 * board devices. Details in /mach-orion/addr-map.c
17 */
18
19enum orion_target {
20 ORION_DEV_BOOT = 0,
21 ORION_DEV0,
22 ORION_DEV1,
23 ORION_DEV2,
24 ORION_PCIE_MEM,
25 ORION_PCIE_IO,
26 ORION_PCI_MEM,
27 ORION_PCI_IO,
28 ORION_DDR,
29 ORION_REGS,
30 ORION_MAX_TARGETS
31};
32
Lennert Buytenhek83b6d822008-03-27 14:51:39 -040033extern struct mbus_dram_target_info orion_mbus_dram_info;
Tzachi Perelsteinc67de5b2007-10-23 15:14:42 -040034void orion_setup_cpu_win(enum orion_target target, u32 base, u32 size, int remap);
35void orion_setup_cpu_wins(void);
36void orion_setup_eth_wins(void);
Tzachi Perelstein585cf172007-10-23 15:14:41 -040037
Tzachi Perelstein038ee082007-10-23 15:14:42 -040038/*
39 * Shared code used internally by other Orion core functions.
40 * (/mach-orion/pci.c)
41 */
42
43struct pci_sys_data;
44struct pci_bus;
45
46void orion_pcie_id(u32 *dev, u32 *rev);
Lennert Buytenhekabc01972008-03-27 14:51:40 -040047int orion_pcie_local_bus_nr(void);
48int orion_pci_local_bus_nr(void);
Tzachi Perelstein038ee082007-10-23 15:14:42 -040049int orion_pci_sys_setup(int nr, struct pci_sys_data *sys);
50struct pci_bus *orion_pci_sys_scan_bus(int nr, struct pci_sys_data *sys);
Tzachi Perelstein038ee082007-10-23 15:14:42 -040051
Tzachi Perelstein01af72e2007-10-23 15:14:42 -040052/*
53 * Valid GPIO pins according to MPP setup, used by machine-setup.
54 * (/mach-orion/gpio.c).
55 */
56
57void __init orion_gpio_set_valid_pins(u32 pins);
58void gpio_display(void); /* debug */
59
Tzachi Perelstein51cbff12007-10-23 15:14:42 -040060/*
Tzachi Perelsteine07c9d82007-10-31 12:42:41 +020061 * Pull in Orion Ethernet platform_data, used by machine-setup
62 */
63
64struct mv643xx_eth_platform_data;
65
66void __init orion_eth_init(struct mv643xx_eth_platform_data *eth_data);
67
Saeed Bisharaf244baa2008-01-29 11:33:32 -110068/*
69 * Orion Sata platform_data, used by machine-setup
70 */
71
72struct mv_sata_platform_data;
73
74void __init orion_sata_init(struct mv_sata_platform_data *sata_data);
75
Guennadi Liakhovetskibe73a342008-02-29 21:12:57 +010076struct machine_desc;
77struct meminfo;
78struct tag;
79extern void __init tag_fixup_mem32(struct machine_desc *, struct tag *,
80 char **, struct meminfo *);
81
Tzachi Perelstein585cf172007-10-23 15:14:41 -040082#endif /* __ARCH_ORION_COMMON_H__ */