common.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. #ifndef __ARCH_ORION_COMMON_H__
  2. #define __ARCH_ORION_COMMON_H__
  3. /*
  4. * Basic Orion init functions used early by machine-setup.
  5. */
  6. void __init orion_map_io(void);
  7. void __init orion_init_irq(void);
  8. void __init orion_init(void);
  9. /*
  10. * Enumerations and functions for Orion windows mapping. Used by Orion core
  11. * functions to map its interfaces and by the machine-setup to map its on-
  12. * board devices. Details in /mach-orion/addr-map.c
  13. */
  14. enum orion_target {
  15. ORION_DEV_BOOT = 0,
  16. ORION_DEV0,
  17. ORION_DEV1,
  18. ORION_DEV2,
  19. ORION_PCIE_MEM,
  20. ORION_PCIE_IO,
  21. ORION_PCI_MEM,
  22. ORION_PCI_IO,
  23. ORION_DDR,
  24. ORION_REGS,
  25. ORION_MAX_TARGETS
  26. };
  27. extern struct mbus_dram_target_info orion_mbus_dram_info;
  28. void orion_setup_cpu_win(enum orion_target target, u32 base, u32 size, int remap);
  29. void orion_setup_cpu_wins(void);
  30. void orion_setup_eth_wins(void);
  31. void orion_setup_sata_wins(void);
  32. /*
  33. * Shared code used internally by other Orion core functions.
  34. * (/mach-orion/pci.c)
  35. */
  36. struct pci_sys_data;
  37. struct pci_bus;
  38. void orion_pcie_id(u32 *dev, u32 *rev);
  39. u32 orion_pcie_local_bus_nr(void);
  40. u32 orion_pci_local_bus_nr(void);
  41. int orion_pci_sys_setup(int nr, struct pci_sys_data *sys);
  42. struct pci_bus *orion_pci_sys_scan_bus(int nr, struct pci_sys_data *sys);
  43. /*
  44. * Valid GPIO pins according to MPP setup, used by machine-setup.
  45. * (/mach-orion/gpio.c).
  46. */
  47. void __init orion_gpio_set_valid_pins(u32 pins);
  48. void gpio_display(void); /* debug */
  49. /*
  50. * Orion system timer (clocksource + clockevnt, /mach-orion/time.c)
  51. */
  52. extern struct sys_timer orion_timer;
  53. /*
  54. * Pull in Orion Ethernet platform_data, used by machine-setup
  55. */
  56. struct mv643xx_eth_platform_data;
  57. void __init orion_eth_init(struct mv643xx_eth_platform_data *eth_data);
  58. /*
  59. * Orion Sata platform_data, used by machine-setup
  60. */
  61. struct mv_sata_platform_data;
  62. void __init orion_sata_init(struct mv_sata_platform_data *sata_data);
  63. struct machine_desc;
  64. struct meminfo;
  65. struct tag;
  66. extern void __init tag_fixup_mem32(struct machine_desc *, struct tag *,
  67. char **, struct meminfo *);
  68. #endif /* __ARCH_ORION_COMMON_H__ */