exports.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. #ifndef __EXPORTS_H__
  2. #define __EXPORTS_H__
  3. #include <irq_func.h>
  4. #include <linux/delay.h>
  5. #ifndef __ASSEMBLY__
  6. #ifdef CONFIG_PHY_AQUANTIA
  7. #include <env.h>
  8. #include <phy_interface.h>
  9. #endif
  10. #include <irq_func.h>
  11. struct cmd_tbl;
  12. struct spi_slave;
  13. /* Set up the jump table for use by the API */
  14. void jumptable_init(void);
  15. /* These are declarations of exported functions available in C code */
  16. unsigned long get_version(void);
  17. int getc(void);
  18. int tstc(void);
  19. void putc(const char);
  20. void puts(const char*);
  21. int printf(const char* fmt, ...);
  22. void install_hdlr(int, interrupt_handler_t, void*);
  23. void free_hdlr(int);
  24. void *malloc(size_t);
  25. #if !CONFIG_IS_ENABLED(SYS_MALLOC_SIMPLE)
  26. void free(void*);
  27. #endif
  28. void __udelay(unsigned long);
  29. unsigned long get_timer(unsigned long);
  30. int vprintf(const char *, va_list);
  31. unsigned long simple_strtoul(const char *cp, char **endp, unsigned int base);
  32. int strict_strtoul(const char *cp, unsigned int base, unsigned long *res);
  33. char *env_get(const char *name);
  34. int env_set(const char *varname, const char *value);
  35. long simple_strtol(const char *cp, char **endp, unsigned int base);
  36. int strcmp(const char *cs, const char *ct);
  37. unsigned long ustrtoul(const char *cp, char **endp, unsigned int base);
  38. unsigned long long ustrtoull(const char *cp, char **endp, unsigned int base);
  39. #if defined(CONFIG_CMD_I2C) && !defined(CONFIG_DM_I2C)
  40. int i2c_write (uchar, uint, int , uchar* , int);
  41. int i2c_read (uchar, uint, int , uchar* , int);
  42. #endif
  43. #ifdef CONFIG_PHY_AQUANTIA
  44. struct mii_dev *mdio_get_current_dev(void);
  45. struct phy_device *phy_find_by_mask(struct mii_dev *bus, unsigned phy_mask,
  46. phy_interface_t interface);
  47. struct phy_device *mdio_phydev_for_ethname(const char *ethname);
  48. int miiphy_set_current_dev(const char *devname);
  49. #endif
  50. void app_startup(char * const *);
  51. #endif /* ifndef __ASSEMBLY__ */
  52. struct jt_funcs {
  53. #define EXPORT_FUNC(impl, res, func, ...) res(*func)(__VA_ARGS__);
  54. #include <_exports.h>
  55. #undef EXPORT_FUNC
  56. };
  57. #define XF_VERSION 9
  58. #if defined(CONFIG_X86)
  59. extern gd_t *global_data;
  60. #endif
  61. #endif /* __EXPORTS_H__ */