common.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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_usb_wins(void);
  32. void orion_setup_pci_wins(void);
  33. void orion_setup_pcie_wins(void);
  34. void orion_setup_sata_wins(void);
  35. /*
  36. * Shared code used internally by other Orion core functions.
  37. * (/mach-orion/pci.c)
  38. */
  39. struct pci_sys_data;
  40. struct pci_bus;
  41. void orion_pcie_id(u32 *dev, u32 *rev);
  42. u32 orion_pcie_local_bus_nr(void);
  43. u32 orion_pci_local_bus_nr(void);
  44. u32 orion_pci_local_dev_nr(void);
  45. int orion_pci_sys_setup(int nr, struct pci_sys_data *sys);
  46. struct pci_bus *orion_pci_sys_scan_bus(int nr, struct pci_sys_data *sys);
  47. int orion_pci_hw_rd_conf(u32 bus, u32 dev, u32 func, u32 where, u32 size, u32 *val);
  48. int orion_pci_hw_wr_conf(u32 bus, u32 dev, u32 func, u32 where, u32 size, u32 val);
  49. /*
  50. * Valid GPIO pins according to MPP setup, used by machine-setup.
  51. * (/mach-orion/gpio.c).
  52. */
  53. void __init orion_gpio_set_valid_pins(u32 pins);
  54. void gpio_display(void); /* debug */
  55. /*
  56. * Orion system timer (clocksource + clockevnt, /mach-orion/time.c)
  57. */
  58. extern struct sys_timer orion_timer;
  59. /*
  60. * Pull in Orion Ethernet platform_data, used by machine-setup
  61. */
  62. struct mv643xx_eth_platform_data;
  63. void __init orion_eth_init(struct mv643xx_eth_platform_data *eth_data);
  64. /*
  65. * Orion Sata platform_data, used by machine-setup
  66. */
  67. struct mv_sata_platform_data;
  68. void __init orion_sata_init(struct mv_sata_platform_data *sata_data);
  69. struct machine_desc;
  70. struct meminfo;
  71. struct tag;
  72. extern void __init tag_fixup_mem32(struct machine_desc *, struct tag *,
  73. char **, struct meminfo *);
  74. #endif /* __ARCH_ORION_COMMON_H__ */