common.h 2.1 KB

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