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 9 #ifndef _CL_COMMON_ 10 #define _CL_COMMON_ 11 12 #include <asm/errno.h> 13 14 void cl_print_pcb_info(void); 15 16 #ifdef CONFIG_CMD_USB 17 int cl_usb_hub_init(int gpio, const char *label); 18 void cl_usb_hub_deinit(int gpio); 19 #else /* !CONFIG_CMD_USB */ 20 static inline int cl_usb_hub_init(int gpio, const char *label) 21 { 22 return -ENOSYS; 23 } 24 static inline void cl_usb_hub_deinit(int gpio) {} 25 #endif /* CONFIG_CMD_USB */ 26 27 enum splash_storage { 28 SPLASH_STORAGE_NAND, 29 }; 30 31 struct splash_location { 32 char *name; 33 enum splash_storage storage; 34 u32 offset; /* offset from start of storage */ 35 }; 36 37 #ifdef CONFIG_SPLASH_SCREEN 38 int cl_splash_screen_prepare(struct splash_location *locations, uint size); 39 #else /* !CONFIG_SPLASH_SCREEN */ 40 static inline int cl_splash_screen_prepare(struct splash_location *locations, 41 uint size) 42 { 43 return -ENOSYS; 44 } 45 #endif /* CONFIG_SPLASH_SCREEN */ 46 47 #ifdef CONFIG_SMC911X 48 int cl_omap3_smc911x_init(int id, int cs, u32 base_addr, 49 int (*reset)(int), int rst_gpio); 50 #else /* !CONFIG_SMC911X */ 51 static inline int cl_omap3_smc911x_init(int id, int cs, u32 base_addr, 52 int (*reset)(int), int rst_gpio) 53 { 54 return -ENOSYS; 55 } 56 #endif /* CONFIG_SMC911X */ 57 58 #endif /* _CL_COMMON_ */ 59