common.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. enum splash_storage {
  23. SPLASH_STORAGE_NAND,
  24. SPLASH_STORAGE_SF,
  25. };
  26. struct splash_location {
  27. char *name;
  28. enum splash_storage storage;
  29. u32 offset; /* offset from start of storage */
  30. };
  31. #ifdef CONFIG_SPLASH_SCREEN
  32. int cl_splash_screen_prepare(struct splash_location *locations, uint size);
  33. #else /* !CONFIG_SPLASH_SCREEN */
  34. static inline int cl_splash_screen_prepare(struct splash_location *locations,
  35. uint size)
  36. {
  37. return -ENOSYS;
  38. }
  39. #endif /* CONFIG_SPLASH_SCREEN */
  40. #ifdef CONFIG_SMC911X
  41. int cl_omap3_smc911x_init(int id, int cs, u32 base_addr,
  42. int (*reset)(int), int rst_gpio);
  43. #else /* !CONFIG_SMC911X */
  44. static inline int cl_omap3_smc911x_init(int id, int cs, u32 base_addr,
  45. int (*reset)(int), int rst_gpio)
  46. {
  47. return -ENOSYS;
  48. }
  49. #endif /* CONFIG_SMC911X */
  50. #endif /* _CL_COMMON_ */