bcma_private.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. #ifndef LINUX_BCMA_PRIVATE_H_
  2. #define LINUX_BCMA_PRIVATE_H_
  3. #ifndef pr_fmt
  4. #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
  5. #endif
  6. #include <linux/bcma/bcma.h>
  7. #include <linux/delay.h>
  8. #define BCMA_CORE_SIZE 0x1000
  9. #define bcma_err(bus, fmt, ...) \
  10. pr_err("bus%d: " fmt, (bus)->num, ##__VA_ARGS__)
  11. #define bcma_warn(bus, fmt, ...) \
  12. pr_warn("bus%d: " fmt, (bus)->num, ##__VA_ARGS__)
  13. #define bcma_info(bus, fmt, ...) \
  14. pr_info("bus%d: " fmt, (bus)->num, ##__VA_ARGS__)
  15. #define bcma_debug(bus, fmt, ...) \
  16. pr_debug("bus%d: " fmt, (bus)->num, ##__VA_ARGS__)
  17. struct bcma_bus;
  18. /* main.c */
  19. int __devinit bcma_bus_register(struct bcma_bus *bus);
  20. void bcma_bus_unregister(struct bcma_bus *bus);
  21. int __init bcma_bus_early_register(struct bcma_bus *bus,
  22. struct bcma_device *core_cc,
  23. struct bcma_device *core_mips);
  24. #ifdef CONFIG_PM
  25. int bcma_bus_suspend(struct bcma_bus *bus);
  26. int bcma_bus_resume(struct bcma_bus *bus);
  27. #endif
  28. /* scan.c */
  29. int bcma_bus_scan(struct bcma_bus *bus);
  30. int __init bcma_bus_scan_early(struct bcma_bus *bus,
  31. struct bcma_device_id *match,
  32. struct bcma_device *core);
  33. void bcma_init_bus(struct bcma_bus *bus);
  34. /* sprom.c */
  35. int bcma_sprom_get(struct bcma_bus *bus);
  36. /* driver_chipcommon.c */
  37. #ifdef CONFIG_BCMA_DRIVER_MIPS
  38. void bcma_chipco_serial_init(struct bcma_drv_cc *cc);
  39. #endif /* CONFIG_BCMA_DRIVER_MIPS */
  40. /* driver_chipcommon_pmu.c */
  41. u32 bcma_pmu_alp_clock(struct bcma_drv_cc *cc);
  42. u32 bcma_pmu_get_clockcpu(struct bcma_drv_cc *cc);
  43. #ifdef CONFIG_BCMA_HOST_PCI
  44. /* host_pci.c */
  45. extern int __init bcma_host_pci_init(void);
  46. extern void __exit bcma_host_pci_exit(void);
  47. #endif /* CONFIG_BCMA_HOST_PCI */
  48. /* driver_pci.c */
  49. u32 bcma_pcie_read(struct bcma_drv_pci *pc, u32 address);
  50. #ifdef CONFIG_BCMA_DRIVER_PCI_HOSTMODE
  51. bool __devinit bcma_core_pci_is_in_hostmode(struct bcma_drv_pci *pc);
  52. void __devinit bcma_core_pci_hostmode_init(struct bcma_drv_pci *pc);
  53. #endif /* CONFIG_BCMA_DRIVER_PCI_HOSTMODE */
  54. #endif