common.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. * (C) Copyright 2014 CompuLab, Ltd. <www.compulab.co.il>
  3. *
  4. * Authors: Igor Grinberg <grinberg@compulab.co.il>
  5. *
  6. * SPDX-License-Identifier: GPL-2.0+
  7. */
  8. #ifndef _CL_COMMON_
  9. #define _CL_COMMON_
  10. #include <asm/errno.h>
  11. void cl_print_pcb_info(void);
  12. #ifdef CONFIG_CMD_USB
  13. int cl_usb_hub_init(int gpio, const char *label);
  14. void cl_usb_hub_deinit(int gpio);
  15. #else /* !CONFIG_CMD_USB */
  16. static inline int cl_usb_hub_init(int gpio, const char *label)
  17. {
  18. return -ENOSYS;
  19. }
  20. static inline void cl_usb_hub_deinit(int gpio) {}
  21. #endif /* CONFIG_CMD_USB */
  22. #ifdef CONFIG_SPLASH_SCREEN
  23. int cl_splash_screen_prepare(int nand_offset);
  24. #else /* !CONFIG_SPLASH_SCREEN */
  25. static inline int cl_splash_screen_prepare(int nand_offset)
  26. {
  27. return -ENOSYS;
  28. }
  29. #endif /* CONFIG_SPLASH_SCREEN */
  30. #ifdef CONFIG_SMC911X
  31. int cl_omap3_smc911x_init(int id, int cs, u32 base_addr,
  32. int (*reset)(int), int rst_gpio);
  33. #else /* !CONFIG_SMC911X */
  34. static inline int cl_omap3_smc911x_init(int id, int cs, u32 base_addr,
  35. int (*reset)(int), int rst_gpio)
  36. {
  37. return -ENOSYS;
  38. }
  39. #endif /* CONFIG_SMC911X */
  40. #endif /* _CL_COMMON_ */