blob: 9a5afefac4dce9d3b0156a16013c0a378cc40781 [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);
11
12/*
13 * Enumerations and functions for Orion windows mapping. Used by Orion core
14 * functions to map its interfaces and by the machine-setup to map its on-
15 * board devices. Details in /mach-orion/addr-map.c
16 */
17
18enum orion_target {
19 ORION_DEV_BOOT = 0,
20 ORION_DEV0,
21 ORION_DEV1,
22 ORION_DEV2,
23 ORION_PCIE_MEM,
24 ORION_PCIE_IO,
25 ORION_PCI_MEM,
26 ORION_PCI_IO,
27 ORION_DDR,
28 ORION_REGS,
29 ORION_MAX_TARGETS
30};
31
Lennert Buytenhek83b6d822008-03-27 14:51:39 -040032extern struct mbus_dram_target_info orion_mbus_dram_info;
Tzachi Perelsteinc67de5b2007-10-23 15:14:42 -040033void orion_setup_cpu_win(enum orion_target target, u32 base, u32 size, int remap);
34void orion_setup_cpu_wins(void);
35void orion_setup_eth_wins(void);
Tzachi Perelstein585cf172007-10-23 15:14:41 -040036
Tzachi Perelstein038ee082007-10-23 15:14:42 -040037/*
38 * Shared code used internally by other Orion core functions.
39 * (/mach-orion/pci.c)
40 */
41
42struct pci_sys_data;
43struct pci_bus;
44
45void orion_pcie_id(u32 *dev, u32 *rev);
Lennert Buytenhekabc01972008-03-27 14:51:40 -040046int orion_pcie_local_bus_nr(void);
47int orion_pci_local_bus_nr(void);
Tzachi Perelstein038ee082007-10-23 15:14:42 -040048int orion_pci_sys_setup(int nr, struct pci_sys_data *sys);
49struct pci_bus *orion_pci_sys_scan_bus(int nr, struct pci_sys_data *sys);
Tzachi Perelstein038ee082007-10-23 15:14:42 -040050
Tzachi Perelstein01af72e2007-10-23 15:14:42 -040051/*
52 * Valid GPIO pins according to MPP setup, used by machine-setup.
53 * (/mach-orion/gpio.c).
54 */
55
56void __init orion_gpio_set_valid_pins(u32 pins);
57void gpio_display(void); /* debug */
58
Tzachi Perelstein51cbff12007-10-23 15:14:42 -040059/*
60 * Orion system timer (clocksource + clockevnt, /mach-orion/time.c)
61 */
62extern struct sys_timer orion_timer;
63
Tzachi Perelsteine07c9d82007-10-31 12:42:41 +020064/*
65 * Pull in Orion Ethernet platform_data, used by machine-setup
66 */
67
68struct mv643xx_eth_platform_data;
69
70void __init orion_eth_init(struct mv643xx_eth_platform_data *eth_data);
71
Saeed Bisharaf244baa2008-01-29 11:33:32 -110072/*
73 * Orion Sata platform_data, used by machine-setup
74 */
75
76struct mv_sata_platform_data;
77
78void __init orion_sata_init(struct mv_sata_platform_data *sata_data);
79
Guennadi Liakhovetskibe73a342008-02-29 21:12:57 +010080struct machine_desc;
81struct meminfo;
82struct tag;
83extern void __init tag_fixup_mem32(struct machine_desc *, struct tag *,
84 char **, struct meminfo *);
85
Tzachi Perelstein585cf172007-10-23 15:14:41 -040086#endif /* __ARCH_ORION_COMMON_H__ */