brcmstb.h 614 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef __BRCMSTB_SOC_H
  3. #define __BRCMSTB_SOC_H
  4. #include <linux/kconfig.h>
  5. static inline u32 BRCM_ID(u32 reg)
  6. {
  7. return reg >> 28 ? reg >> 16 : reg >> 8;
  8. }
  9. static inline u32 BRCM_REV(u32 reg)
  10. {
  11. return reg & 0xff;
  12. }
  13. #if IS_ENABLED(CONFIG_SOC_BRCMSTB)
  14. /*
  15. * Helper functions for getting family or product id from the
  16. * SoC driver.
  17. */
  18. u32 brcmstb_get_family_id(void);
  19. u32 brcmstb_get_product_id(void);
  20. #else
  21. static inline u32 brcmstb_get_family_id(void)
  22. {
  23. return 0;
  24. }
  25. static inline u32 brcmstb_get_product_id(void)
  26. {
  27. return 0;
  28. }
  29. #endif
  30. #endif /* __BRCMSTB_SOC_H */